original_string: public function getModelsFromResult($modelResult)
      {
          $modelsArray = [];
  
          if (isset($modelResult['models'])) {
              foreach ($modelResult['models'] as $model) {
                  $model = new Model($model);
                  $modelsArray[] = $model;
              }
          } else {
              throw new \Exception('Models Not Found');
          }
  
          return $modelsArray;
      }
code: public function getModelsFromResult($modelResult)
      {
          $modelsArray = [];
  
          if (isset($modelResult['models'])) {
              foreach ($modelResult['models'] as $model) {
                  $model = new Model($model);
                  $modelsArray[] = $model;
              }
          } else {
              throw new \Exception('Models Not Found');
          }
  
          return $modelsArray;
      }
code_tokens: public function getModelsFromResult ( $ modelResult ) { $ modelsArray = [ ] ; if ( isset ( $ modelResult [ 'models' ] ) ) { foreach ( $ modelResult [ 'models' ] as $ model ) { $ model = new Model ( $ model ) ; $ modelsArray [ ] = $ model ; } } else { throw new \ Exception ( 'Models Not Found' ) ; } return $ modelsArray ; }
docstring: Parses Request Result and gets Models
  
  @param $modelResult
  
  @return Model[]
  
  @throws \Exception
docstring_tokens: Parses Request Result and gets Models