original_string: private function parseParameter(ReflectionParameter $reflectionParameter, &$data, $labels)
      {
          // get the principal properties
          $name = $reflectionParameter->getName();
          $value = null;
          if ($reflectionParameter->isOptional()) {
              $value = $reflectionParameter->getDefaultValue();
          }
  
          // parse data using labels
          if ($labels) {
              if (isset($data[$name])) {
                  $value = off($data, $name, $value);
                  unset($data[$name]);
              }
              return $value;
          }
  
          // parse data without labels
          if (isset($data[0])) {
              $value = $data[0];
              array_shift($data);
              reset($data);
          }
          return $value;
      }
code: private function parseParameter(ReflectionParameter $reflectionParameter, &$data, $labels)
      {
          // get the principal properties
          $name = $reflectionParameter->getName();
          $value = null;
          if ($reflectionParameter->isOptional()) {
              $value = $reflectionParameter->getDefaultValue();
          }
  
          // parse data using labels
          if ($labels) {
              if (isset($data[$name])) {
                  $value = off($data, $name, $value);
                  unset($data[$name]);
              }
              return $value;
          }
  
          // parse data without labels
          if (isset($data[0])) {
              $value = $data[0];
              array_shift($data);
              reset($data);
          }
          return $value;
      }
code_tokens: private function parseParameter ( ReflectionParameter $ reflectionParameter , & $ data , $ labels ) { // get the principal properties $ name = $ reflectionParameter -> getName ( ) ; $ value = null ; if ( $ reflectionParameter -> isOptional ( ) ) { $ value = $ reflectionParameter -> getDefaultValue ( ) ; } // parse data using labels if ( $ labels ) { if ( isset ( $ data [ $ name ] ) ) { $ value = off ( $ data , $ name , $ value ) ; unset ( $ data [ $ name ] ) ; } return $ value ; } // parse data without labels if ( isset ( $ data [ 0 ] ) ) { $ value = $ data [ 0 ] ; array_shift ( $ data ) ; reset ( $ data ) ; } return $ value ; }
docstring: Configure the beste resource to each parameter of one method or function
  
  @param ReflectionParameter $reflectionParameter
  @param array $data
  @param bool $labels
  @return mixed
docstring_tokens: Configure the beste resource to each parameter of one method or function