diff --git a/src/Permissions/StandardPermissions.php b/src/Permissions/StandardPermissions.php index bf19407a..d67c72a2 100644 --- a/src/Permissions/StandardPermissions.php +++ b/src/Permissions/StandardPermissions.php @@ -31,16 +31,16 @@ protected function createPreparedPermissions(): array { $prepared = []; - if (! empty($this->secondaryPermissions)) { - foreach ($this->secondaryPermissions as $permissions) { + if (! empty($this->getSecondaryPermissions())) { + foreach ($this->getSecondaryPermissions() as $permissions) { $this->preparePermissions($prepared, $permissions); } } - if (! empty($this->permissions)) { + if (! empty($this->getPermissions())) { $permissions = []; - $this->preparePermissions($permissions, $this->permissions); + $this->preparePermissions($permissions, $this->getPermissions()); $prepared = array_merge($prepared, $permissions); } diff --git a/src/Permissions/StrictPermissions.php b/src/Permissions/StrictPermissions.php index 453ebf5b..5ca55f09 100644 --- a/src/Permissions/StrictPermissions.php +++ b/src/Permissions/StrictPermissions.php @@ -31,14 +31,14 @@ protected function createPreparedPermissions(): array { $prepared = []; - if (! empty($this->secondaryPermissions)) { - foreach ($this->secondaryPermissions as $permissions) { + if (! empty($this->getSecondaryPermissions())) { + foreach ($this->getSecondaryPermissions() as $permissions) { $this->preparePermissions($prepared, $permissions); } } - if (! empty($this->permissions)) { - $this->preparePermissions($prepared, $this->permissions); + if (! empty($this->getPermissions())) { + $this->preparePermissions($prepared, $this->getPermissions()); } return $prepared; diff --git a/tests/Permissions/PermissionsTraitTest.php b/tests/Permissions/PermissionsTraitTest.php index 1978eec2..47429098 100644 --- a/tests/Permissions/PermissionsTraitTest.php +++ b/tests/Permissions/PermissionsTraitTest.php @@ -118,8 +118,8 @@ protected function createPreparedPermissions() { $prepared = []; - if (! empty($this->secondaryPermissions)) { - foreach ($this->secondaryPermissions as $permissions) { + if (! empty($this->getSecondaryPermissions())) { + foreach ($this->getSecondaryPermissions() as $permissions) { $this->preparePermissions($prepared, $permissions); } }