public static function args($object) : array
    {
        if (!is_object($object)) {
            throw new InvalidArgumentException('Argument must be'
                . ' an object ' . gettype($object) . ' found.');
        }

        $reflector = new ReflectionClass($object);

        $constructor = $reflector->getConstructor();

        if ($constructor instanceof ReflectionMethod) {
            $args = array_column($constructor->getParameters(), 'name');
        } else {
            $args = [];
        }

        return $args;
    }
public static function args($object) : array
    {
        if (!is_object($object)) {
            throw new InvalidArgumentException('Argument must be'
                . ' an object ' . gettype($object) . ' found.');
        }

        $reflector = new ReflectionClass($object);

        $constructor = $reflector->getConstructor();

        if ($constructor instanceof ReflectionMethod) {
            $args = array_column($constructor->getParameters(), 'name');
        } else {
            $args = [];
        }

        return $args;
    }
public static function args ( $ object ) : array { if ( ! is_object ( $ object ) ) { throw new InvalidArgumentException ( 'Argument must be' . ' an object ' . gettype ( $ object ) . ' found.' ) ; } $ reflector = new ReflectionClass ( $ object ) ; $ constructor = $ reflector -> getConstructor ( ) ; if ( $ constructor instanceof ReflectionMethod ) { $ args = array_column ( $ constructor -> getParameters ( ) , 'name' ) ; } else { $ args = [ ] ; } return $ args ; }
Extract the arguments from the model constructor for display.

@param object $object
@throws \InvalidArgumentException
@return string[]
Extract the arguments from the model constructor for display .