private static function compareParameterClasses(\ReflectionParameter $a, \ReflectionParameter $b) : int
    {
        $a = $a->getClass();
        $b = $b->getClass();

        if ($a && $b) {
            return $a->isSubclassOf($b->name) ? -1 : (int) $b->isSubclassOf($a->name);
        }

        return (int) !$a - (int) !$b;
    }
private static function compareParameterClasses(\ReflectionParameter $a, \ReflectionParameter $b) : int
    {
        $a = $a->getClass();
        $b = $b->getClass();

        if ($a && $b) {
            return $a->isSubclassOf($b->name) ? -1 : (int) $b->isSubclassOf($a->name);
        }

        return (int) !$a - (int) !$b;
    }
private static function compareParameterClasses ( \ ReflectionParameter $ a , \ ReflectionParameter $ b ) : int { $ a = $ a -> getClass ( ) ; $ b = $ b -> getClass ( ) ; if ( $ a && $ b ) { return $ a -> isSubclassOf ( $ b -> name ) ? - 1 : ( int ) $ b -> isSubclassOf ( $ a -> name ) ; } return ( int ) ! $ a - ( int ) ! $ b ; }
Compares reflection parameters by class hierarchy.

@param \ReflectionParameter $a
@param \ReflectionParameter $b

@return int
Compares reflection parameters by class hierarchy .