src/ImmutabilityBehaviour.php
protected function getAllowedPublicMethods(): array
    {
        $allowedInterfaces = \array_unique(\array_merge($this->getAllowedInterfaces(), [ImmutabilityBehaviour::class]));
        $allowedMethods = \array_merge(
            ...\array_map(
                function (string $interface): array {
                    return (new \ReflectionClass($interface))->getMethods(\ReflectionMethod::IS_PUBLIC);
                },
                $allowedInterfaces
            )
        );

        return \array_unique(\array_filter(\array_map(
            function (\ReflectionMethod $method): string {
                return !$method->isStatic() ? $method->getName() : '';
            },
            $allowedMethods
        )));
    }
protected function getAllowedPublicMethods(): array
    {
        $allowedInterfaces = \array_unique(\array_merge($this->getAllowedInterfaces(), [ImmutabilityBehaviour::class]));
        $allowedMethods = \array_merge(
            ...\array_map(
                function (string $interface): array {
                    return (new \ReflectionClass($interface))->getMethods(\ReflectionMethod::IS_PUBLIC);
                },
                $allowedInterfaces
            )
        );

        return \array_unique(\array_filter(\array_map(
            function (\ReflectionMethod $method): string {
                return !$method->isStatic() ? $method->getName() : '';
            },
            $allowedMethods
        )));
    }
protected function getAllowedPublicMethods ( ) : array { $ allowedInterfaces = \ array_unique ( \ array_merge ( $ this -> getAllowedInterfaces ( ) , [ ImmutabilityBehaviour :: class ] ) ) ; $ allowedMethods = \ array_merge ( ... \ array_map ( function ( string $ interface ) : array { return ( new \ ReflectionClass ( $ interface ) ) -> getMethods ( \ ReflectionMethod :: IS_PUBLIC ) ; } , $ allowedInterfaces ) ) ; return \ array_unique ( \ array_filter ( \ array_map ( function ( \ ReflectionMethod $ method ) : string { return ! $ method -> isStatic ( ) ? $ method -> getName ( ) : '' ; } , $ allowedMethods ) ) ) ; }
Get list of allowed public methods.

@return string[]
Get list of allowed public methods .