private function getParams(\ReflectionMethod $reflectionMethod, $phpDoc = array())
    {
        $paramArray = array();
        $params = $reflectionMethod->getParameters();
        if (empty($phpDoc)) {
            $phpDoc = $this->phpDoc->getParsed($reflectionMethod);
        }
        foreach ($params as $i => $reflectionParameter) {
            $nameNoPrefix = $reflectionParameter->getName();
            $name = '$'.$nameNoPrefix;
            if (\method_exists($reflectionParameter, 'isVariadic') && $reflectionParameter->isVariadic()) {
                $name = '...'.$name;
            }
            if ($reflectionParameter->isPassedByReference()) {
                $name = '&'.$name;
            }
            $constantName = null;
            $defaultValue = $this->abstracter->UNDEFINED;
            if ($reflectionParameter->isDefaultValueAvailable()) {
                $defaultValue = $reflectionParameter->getDefaultValue();
                if (\version_compare(PHP_VERSION, '5.4.6', '>=') && $reflectionParameter->isDefaultValueConstant()) {
                    /*
                        php may return something like self::CONSTANT_NAME
                        hhvm will return WhateverTheClassNameIs::CONSTANT_NAME
                    */
                    $constantName = $reflectionParameter->getDefaultValueConstantName();
                }
            }
            $paramInfo = array(
                'constantName' => $constantName,
                'defaultValue' => $defaultValue,
                'desc' => null,
                'isOptional' => $reflectionParameter->isOptional(),
                'name' => $name,
                'type' => $this->getParamTypeHint($reflectionParameter),
            );
            /*
                Incorporate phpDoc info
            */
            if (isset($phpDoc['param'][$i])) {
                $paramInfo['desc'] = $phpDoc['param'][$i]['desc'];
                if (!isset($paramInfo['type'])) {
                    $paramInfo['type'] = $phpDoc['param'][$i]['type'];
                }
            }
            $paramArray[$nameNoPrefix] = $paramInfo;
        }
        return $paramArray;
    }
private function getParams(\ReflectionMethod $reflectionMethod, $phpDoc = array())
    {
        $paramArray = array();
        $params = $reflectionMethod->getParameters();
        if (empty($phpDoc)) {
            $phpDoc = $this->phpDoc->getParsed($reflectionMethod);
        }
        foreach ($params as $i => $reflectionParameter) {
            $nameNoPrefix = $reflectionParameter->getName();
            $name = '$'.$nameNoPrefix;
            if (\method_exists($reflectionParameter, 'isVariadic') && $reflectionParameter->isVariadic()) {
                $name = '...'.$name;
            }
            if ($reflectionParameter->isPassedByReference()) {
                $name = '&'.$name;
            }
            $constantName = null;
            $defaultValue = $this->abstracter->UNDEFINED;
            if ($reflectionParameter->isDefaultValueAvailable()) {
                $defaultValue = $reflectionParameter->getDefaultValue();
                if (\version_compare(PHP_VERSION, '5.4.6', '>=') && $reflectionParameter->isDefaultValueConstant()) {
                    /*
                        php may return something like self::CONSTANT_NAME
                        hhvm will return WhateverTheClassNameIs::CONSTANT_NAME
                    */
                    $constantName = $reflectionParameter->getDefaultValueConstantName();
                }
            }
            $paramInfo = array(
                'constantName' => $constantName,
                'defaultValue' => $defaultValue,
                'desc' => null,
                'isOptional' => $reflectionParameter->isOptional(),
                'name' => $name,
                'type' => $this->getParamTypeHint($reflectionParameter),
            );
            /*
                Incorporate phpDoc info
            */
            if (isset($phpDoc['param'][$i])) {
                $paramInfo['desc'] = $phpDoc['param'][$i]['desc'];
                if (!isset($paramInfo['type'])) {
                    $paramInfo['type'] = $phpDoc['param'][$i]['type'];
                }
            }
            $paramArray[$nameNoPrefix] = $paramInfo;
        }
        return $paramArray;
    }
private function getParams ( \ ReflectionMethod $ reflectionMethod , $ phpDoc = array ( ) ) { $ paramArray = array ( ) ; $ params = $ reflectionMethod -> getParameters ( ) ; if ( empty ( $ phpDoc ) ) { $ phpDoc = $ this -> phpDoc -> getParsed ( $ reflectionMethod ) ; } foreach ( $ params as $ i => $ reflectionParameter ) { $ nameNoPrefix = $ reflectionParameter -> getName ( ) ; $ name = '$' . $ nameNoPrefix ; if ( \ method_exists ( $ reflectionParameter , 'isVariadic' ) && $ reflectionParameter -> isVariadic ( ) ) { $ name = '...' . $ name ; } if ( $ reflectionParameter -> isPassedByReference ( ) ) { $ name = '&' . $ name ; } $ constantName = null ; $ defaultValue = $ this -> abstracter -> UNDEFINED ; if ( $ reflectionParameter -> isDefaultValueAvailable ( ) ) { $ defaultValue = $ reflectionParameter -> getDefaultValue ( ) ; if ( \ version_compare ( PHP_VERSION , '5.4.6' , '>=' ) && $ reflectionParameter -> isDefaultValueConstant ( ) ) { /*
                        php may return something like self::CONSTANT_NAME
                        hhvm will return WhateverTheClassNameIs::CONSTANT_NAME
                    */ $ constantName = $ reflectionParameter -> getDefaultValueConstantName ( ) ; } } $ paramInfo = array ( 'constantName' => $ constantName , 'defaultValue' => $ defaultValue , 'desc' => null , 'isOptional' => $ reflectionParameter -> isOptional ( ) , 'name' => $ name , 'type' => $ this -> getParamTypeHint ( $ reflectionParameter ) , ) ; /*
                Incorporate phpDoc info
            */ if ( isset ( $ phpDoc [ 'param' ] [ $ i ] ) ) { $ paramInfo [ 'desc' ] = $ phpDoc [ 'param' ] [ $ i ] [ 'desc' ] ; if ( ! isset ( $ paramInfo [ 'type' ] ) ) { $ paramInfo [ 'type' ] = $ phpDoc [ 'param' ] [ $ i ] [ 'type' ] ; } } $ paramArray [ $ nameNoPrefix ] = $ paramInfo ; } return $ paramArray ; }
Get parameter details

returns array of
[
'constantName'   populated only if php >= 5.4.6 & default is a constant
'defaultValue'   value or UNDEFINED
'desc'           description (from phpDoc)
'isOptional'
'name'           name
'type'           type hint
]

@param \ReflectionMethod $reflectionMethod method object
@param array             $phpDoc           method's parsed phpDoc comment

@return array
Get parameter details