private function detectBindingName(\ReflectionParameter $param, $default = null)
    {
        $annotations = annotationsOf($param);
        if ($annotations->contain('List')) {
            return $annotations->firstNamed('List')->getValue();
        }

        if ($annotations->contain('Map')) {
            return $annotations->firstNamed('Map')->getValue();
        }

        if ($annotations->contain('Named')) {
            return $annotations->firstNamed('Named')->getName();
        }

        if ($annotations->contain('Property')) {
            return $annotations->firstNamed('Property')->getValue();
        }

        return $default;
    }
private function detectBindingName(\ReflectionParameter $param, $default = null)
    {
        $annotations = annotationsOf($param);
        if ($annotations->contain('List')) {
            return $annotations->firstNamed('List')->getValue();
        }

        if ($annotations->contain('Map')) {
            return $annotations->firstNamed('Map')->getValue();
        }

        if ($annotations->contain('Named')) {
            return $annotations->firstNamed('Named')->getName();
        }

        if ($annotations->contain('Property')) {
            return $annotations->firstNamed('Property')->getValue();
        }

        return $default;
    }
private function detectBindingName ( \ ReflectionParameter $ param , $ default = null ) { $ annotations = annotationsOf ( $ param ) ; if ( $ annotations -> contain ( 'List' ) ) { return $ annotations -> firstNamed ( 'List' ) -> getValue ( ) ; } if ( $ annotations -> contain ( 'Map' ) ) { return $ annotations -> firstNamed ( 'Map' ) -> getValue ( ) ; } if ( $ annotations -> contain ( 'Named' ) ) { return $ annotations -> firstNamed ( 'Named' ) -> getName ( ) ; } if ( $ annotations -> contain ( 'Property' ) ) { return $ annotations -> firstNamed ( 'Property' ) -> getValue ( ) ; } return $ default ; }
detects name for binding

@param   \ReflectionParameter     $param
@param   string|\ReflectionClass  $default
@return  string|\ReflectionClass
detects name for binding