src/Console/HCScanRolePermissionsCommand.php
private function extractAllActions(array $aclData): array
    {
        $allRolesActions = [];

        // get all role actions available
        foreach ($aclData as $acl) {
            if (isset($acl['acl']['rolesActions']) && !empty ($acl['acl']['rolesActions'])) {
                foreach ($acl['acl']['rolesActions'] as $role => $actions) {
                    if (array_key_exists($role, $allRolesActions)) {
                        $allRolesActions[$role] = array_merge($allRolesActions[$role], $actions);
                    } else {
                        $allRolesActions[$role] = array_merge([], $actions);
                    }
                }
            }
        }

        return $allRolesActions;
    }
private function extractAllActions(array $aclData): array
    {
        $allRolesActions = [];

        // get all role actions available
        foreach ($aclData as $acl) {
            if (isset($acl['acl']['rolesActions']) && !empty ($acl['acl']['rolesActions'])) {
                foreach ($acl['acl']['rolesActions'] as $role => $actions) {
                    if (array_key_exists($role, $allRolesActions)) {
                        $allRolesActions[$role] = array_merge($allRolesActions[$role], $actions);
                    } else {
                        $allRolesActions[$role] = array_merge([], $actions);
                    }
                }
            }
        }

        return $allRolesActions;
    }
private function extractAllActions ( array $ aclData ) : array { $ allRolesActions = [ ] ; // get all role actions available foreach ( $ aclData as $ acl ) { if ( isset ( $ acl [ 'acl' ] [ 'rolesActions' ] ) && ! empty ( $ acl [ 'acl' ] [ 'rolesActions' ] ) ) { foreach ( $ acl [ 'acl' ] [ 'rolesActions' ] as $ role => $ actions ) { if ( array_key_exists ( $ role , $ allRolesActions ) ) { $ allRolesActions [ $ role ] = array_merge ( $ allRolesActions [ $ role ] , $ actions ) ; } else { $ allRolesActions [ $ role ] = array_merge ( [ ] , $ actions ) ; } } } } return $ allRolesActions ; }
Extract all actions from roles config

@param array $aclData
@return array
Extract all actions from roles config