From 4857816c9e319e3d261afa013990dec4b3cd8618 Mon Sep 17 00:00:00 2001 From: Aaron Carlino Date: Wed, 6 Dec 2017 22:03:05 +1300 Subject: [PATCH] Revisions per robbieaverill --- src/Security/InheritedPermissionFlusher.php | 10 +++++----- tests/php/Security/InheritedPermissionsFlusherTest.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) 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();