diff --git a/src/Security/InheritedPermissionFlusher.php b/src/Security/InheritedPermissionFlusher.php index fd5c257d1..bd784fa3b 100644 --- a/src/Security/InheritedPermissionFlusher.php +++ b/src/Security/InheritedPermissionFlusher.php @@ -42,6 +42,8 @@ class InheritedPermissionFlusher extends DataExtension implements Flushable /** * @param CacheFlusher[] + * @throws InvalidArgumentException + * @return $this */ public function setServices($services) { @@ -57,6 +59,8 @@ class InheritedPermissionFlusher extends DataExtension implements Flushable } $this->services = $services; + + return $this; } /** @@ -85,11 +89,7 @@ class InheritedPermissionFlusher extends DataExtension implements Flushable */ protected function getMemberIDList() { - if (!$this->owner) { - return null; - } - - if (!$this->owner->exists()) { + if (!$this->owner || !$this->owner->exists()) { return null; } diff --git a/tests/php/Security/InheritedPermissionsFlusherTest.php b/tests/php/Security/InheritedPermissionsFlusherTest.php index e940405b3..716234b72 100644 --- a/tests/php/Security/InheritedPermissionsFlusherTest.php +++ b/tests/php/Security/InheritedPermissionsFlusherTest.php @@ -16,7 +16,7 @@ class InheritedPermissionsFlusherTest extends SapphireTest { protected static $fixture_file = 'InheritedPermissionsFlusherTest.yml'; - public function setUp() + protected function setUp() { parent::setUp();