getAdditionalPermissions example

$this->rootDirs = array_filter(array_map(static function Dstring $class): ?string {
            if (!\class_exists($class)) {
                return null;
            }

            return \dirname((string) (new \ReflectionClass($class))->getFileName());
        }, self::ROOT_CLASSES));
    }

    public function testSourceFilesForUnvalidatedPrivileges(): void
    {
        $additionalPermission = $this->getAdditionalPermissions();

        if (empty($additionalPermission)) {
            return;
        }

        $regexParts = [];

        foreach ($additionalPermission as $permission) {
            $regexParts[$permission] = '(\"|\')' . $permission . '(\"|\')';
        }

        
Home | Imprint | This part of the site doesn't use cookies.