original_string: public function execute()
      {
          $repositoryResponse = [];
          $arrayOfObjects = [];
          $resultCount    = 0;
          $responseStatus = ResponseAbstract::STATUS_SUCCESS;
  
          try {
              $this->executeDataGateway();
              if ($this->repository != null) {
                  $arrayOfObjects = $this->repository->getEntitiesFromResponse();
                  $repositoryResponse = $this->repository->getResponse();
                  $responseStatus = $this->repository->isResponseStatusSuccess() == true ?
                      ResponseAbstract::STATUS_SUCCESS :
                      ResponseAbstract::STATUS_FAIL;
              }
              else {
                  $arrayOfObjects = [];
                  $repositoryResponse = [];
              }
  
              $resultCount    = $this->getTotalResultCount();
          }
          catch (\Exception $e) {
              $responseStatus = ResponseAbstract::STATUS_FAIL;
              $this->response->setMessages(['No result was found']);
          }
  
          $this->response->setStatus($responseStatus);
          $this->response->setResult($arrayOfObjects);
          $this->response->setSourceResponse($repositoryResponse);
          $this->response->setTotalResultCount($resultCount);
      }
code: public function execute()
      {
          $repositoryResponse = [];
          $arrayOfObjects = [];
          $resultCount    = 0;
          $responseStatus = ResponseAbstract::STATUS_SUCCESS;
  
          try {
              $this->executeDataGateway();
              if ($this->repository != null) {
                  $arrayOfObjects = $this->repository->getEntitiesFromResponse();
                  $repositoryResponse = $this->repository->getResponse();
                  $responseStatus = $this->repository->isResponseStatusSuccess() == true ?
                      ResponseAbstract::STATUS_SUCCESS :
                      ResponseAbstract::STATUS_FAIL;
              }
              else {
                  $arrayOfObjects = [];
                  $repositoryResponse = [];
              }
  
              $resultCount    = $this->getTotalResultCount();
          }
          catch (\Exception $e) {
              $responseStatus = ResponseAbstract::STATUS_FAIL;
              $this->response->setMessages(['No result was found']);
          }
  
          $this->response->setStatus($responseStatus);
          $this->response->setResult($arrayOfObjects);
          $this->response->setSourceResponse($repositoryResponse);
          $this->response->setTotalResultCount($resultCount);
      }
code_tokens: public function execute ( ) { $ repositoryResponse = [ ] ; $ arrayOfObjects = [ ] ; $ resultCount = 0 ; $ responseStatus = ResponseAbstract :: STATUS_SUCCESS ; try { $ this -> executeDataGateway ( ) ; if ( $ this -> repository != null ) { $ arrayOfObjects = $ this -> repository -> getEntitiesFromResponse ( ) ; $ repositoryResponse = $ this -> repository -> getResponse ( ) ; $ responseStatus = $ this -> repository -> isResponseStatusSuccess ( ) == true ? ResponseAbstract :: STATUS_SUCCESS : ResponseAbstract :: STATUS_FAIL ; } else { $ arrayOfObjects = [ ] ; $ repositoryResponse = [ ] ; } $ resultCount = $ this -> getTotalResultCount ( ) ; } catch ( \ Exception $ e ) { $ responseStatus = ResponseAbstract :: STATUS_FAIL ; $ this -> response -> setMessages ( [ 'No result was found' ] ) ; } $ this -> response -> setStatus ( $ responseStatus ) ; $ this -> response -> setResult ( $ arrayOfObjects ) ; $ this -> response -> setSourceResponse ( $ repositoryResponse ) ; $ this -> response -> setTotalResultCount ( $ resultCount ) ; }
docstring: Execute this use case
  
  @return void
docstring_tokens: Execute this use case