original_string: public function pingAction()
      {
          $source = $this->getSourceById();
  
          try {
              if ($source->checkSourceActive($this->currentUser->getUserId())) {
                  $this->addMessage($this->_('This installation is active.'), 'success');
              } else {
                  $this->addMessage($this->_('Inactive installation.'), 'warning');
              }
          } catch (\Exception $e) {
              $this->addMessage($this->_('Installation error!'), 'danger');
              $this->addMessage($e->getMessage(), 'danger');
          }
          $this->_reroute(array($this->getRequest()->getActionKey() => 'show'));
      }
code: public function pingAction()
      {
          $source = $this->getSourceById();
  
          try {
              if ($source->checkSourceActive($this->currentUser->getUserId())) {
                  $this->addMessage($this->_('This installation is active.'), 'success');
              } else {
                  $this->addMessage($this->_('Inactive installation.'), 'warning');
              }
          } catch (\Exception $e) {
              $this->addMessage($this->_('Installation error!'), 'danger');
              $this->addMessage($e->getMessage(), 'danger');
          }
          $this->_reroute(array($this->getRequest()->getActionKey() => 'show'));
      }
code_tokens: public function pingAction ( ) { $ source = $ this -> getSourceById ( ) ; try { if ( $ source -> checkSourceActive ( $ this -> currentUser -> getUserId ( ) ) ) { $ this -> addMessage ( $ this -> _ ( 'This installation is active.' ) , 'success' ) ; } else { $ this -> addMessage ( $ this -> _ ( 'Inactive installation.' ) , 'warning' ) ; } } catch ( \ Exception $ e ) { $ this -> addMessage ( $ this -> _ ( 'Installation error!' ) , 'danger' ) ; $ this -> addMessage ( $ e -> getMessage ( ) , 'danger' ) ; } $ this -> _reroute ( array ( $ this -> getRequest ( ) -> getActionKey ( ) => 'show' ) ) ; }
docstring: Action to check whether the source is active
docstring_tokens: Action to check whether the source is active