original_string: public function getParameters($method)
      {
          //Loop through the default values for paremeters, and make the correct output string
          $params = array();
          $paramsWithDefault = array();
          foreach ($method->getParameters() as $param) {
              $paramStr = '$' . $param->getName();
              $params[] = $paramStr;
              if ($param->isOptional()) {
                  $default = $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null;
                  if (is_bool($default)) {
                      $default = $default ? 'true' : 'false';
                  } elseif (is_array($default)) {
                      $default = 'array()';
                  } elseif (is_null($default)) {
                      $default = 'null';
                  } elseif (is_int($default)) {
                      //$default = $default;
                  } elseif (is_resource($default)) {
                      //skip to not fail
                  } else {
                      $default = "'" . trim($default) . "'";
                  }
                  $paramStr .= " = $default";
              }
              $paramsWithDefault[] = $paramStr;
          }
  
          $this->params = $params;
          $this->params_with_default = $paramsWithDefault;
      }
code: public function getParameters($method)
      {
          //Loop through the default values for paremeters, and make the correct output string
          $params = array();
          $paramsWithDefault = array();
          foreach ($method->getParameters() as $param) {
              $paramStr = '$' . $param->getName();
              $params[] = $paramStr;
              if ($param->isOptional()) {
                  $default = $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null;
                  if (is_bool($default)) {
                      $default = $default ? 'true' : 'false';
                  } elseif (is_array($default)) {
                      $default = 'array()';
                  } elseif (is_null($default)) {
                      $default = 'null';
                  } elseif (is_int($default)) {
                      //$default = $default;
                  } elseif (is_resource($default)) {
                      //skip to not fail
                  } else {
                      $default = "'" . trim($default) . "'";
                  }
                  $paramStr .= " = $default";
              }
              $paramsWithDefault[] = $paramStr;
          }
  
          $this->params = $params;
          $this->params_with_default = $paramsWithDefault;
      }
code_tokens: public function getParameters ( $ method ) { //Loop through the default values for paremeters, and make the correct output string $ params = array ( ) ; $ paramsWithDefault = array ( ) ; foreach ( $ method -> getParameters ( ) as $ param ) { $ paramStr = '$' . $ param -> getName ( ) ; $ params [ ] = $ paramStr ; if ( $ param -> isOptional ( ) ) { $ default = $ param -> isDefaultValueAvailable ( ) ? $ param -> getDefaultValue ( ) : null ; if ( is_bool ( $ default ) ) { $ default = $ default ? 'true' : 'false' ; } elseif ( is_array ( $ default ) ) { $ default = 'array()' ; } elseif ( is_null ( $ default ) ) { $ default = 'null' ; } elseif ( is_int ( $ default ) ) { //$default = $default; } elseif ( is_resource ( $ default ) ) { //skip to not fail } else { $ default = "'" . trim ( $ default ) . "'" ; } $ paramStr .= " = $default" ; } $ paramsWithDefault [ ] = $ paramStr ; } $ this -> params = $ params ; $ this -> params_with_default = $ paramsWithDefault ; }
docstring: Get the parameters and format them correctly
  
  @param  \ReflectionMethod $method
  @return array
docstring_tokens: Get the parameters and format them correctly