original_string: protected function extractPayload($model, $comments = '')
      {
          $payload = [];
          preg_match('/@payload\ (.*)\n/i', $comments, $doc);
          $isArray = false;
          if (count($doc)) {
              $namespace = str_replace('{__API__}', $model, $doc[1]);
              if (false !== strpos($namespace, '[') && false !== strpos($namespace, ']')) {
                  $namespace = str_replace(']', '', str_replace('[', '', $namespace));
                  $isArray = true;
              }
              $payload = $this->extractModelFields($namespace);
              $reflector = new \ReflectionClass($namespace);
              $shortName = $reflector->getShortName();
          } else {
              $namespace = $model;
              $shortName = $model;
          }
  
          return [$namespace, $shortName, $payload, $isArray];
      }
code: protected function extractPayload($model, $comments = '')
      {
          $payload = [];
          preg_match('/@payload\ (.*)\n/i', $comments, $doc);
          $isArray = false;
          if (count($doc)) {
              $namespace = str_replace('{__API__}', $model, $doc[1]);
              if (false !== strpos($namespace, '[') && false !== strpos($namespace, ']')) {
                  $namespace = str_replace(']', '', str_replace('[', '', $namespace));
                  $isArray = true;
              }
              $payload = $this->extractModelFields($namespace);
              $reflector = new \ReflectionClass($namespace);
              $shortName = $reflector->getShortName();
          } else {
              $namespace = $model;
              $shortName = $model;
          }
  
          return [$namespace, $shortName, $payload, $isArray];
      }
code_tokens: protected function extractPayload ( $ model , $ comments = '' ) { $ payload = [ ] ; preg_match ( '/@payload\ (.*)\n/i' , $ comments , $ doc ) ; $ isArray = false ; if ( count ( $ doc ) ) { $ namespace = str_replace ( '{__API__}' , $ model , $ doc [ 1 ] ) ; if ( false !== strpos ( $ namespace , '[' ) && false !== strpos ( $ namespace , ']' ) ) { $ namespace = str_replace ( ']' , '' , str_replace ( '[' , '' , $ namespace ) ) ; $ isArray = true ; } $ payload = $ this -> extractModelFields ( $ namespace ) ; $ reflector = new \ ReflectionClass ( $ namespace ) ; $ shortName = $ reflector -> getShortName ( ) ; } else { $ namespace = $ model ; $ shortName = $ model ; } return [ $ namespace , $ shortName , $ payload , $ isArray ] ; }
docstring: Method that extract the payload for the endpoint
  
  @param string $model
  @param string $comments
  
  @return array
docstring_tokens: Method that extract the payload for the endpoint