From b4d9057d6ca1d784c75acbb8b5e2c4fd9ed2ff40 Mon Sep 17 00:00:00 2001 From: James Adams Date: Thu, 15 Aug 2019 12:32:31 +0100 Subject: [PATCH] Don't create single-use local variable for entity name --- lib/Gocdb_Services/NotificationService.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Gocdb_Services/NotificationService.php b/lib/Gocdb_Services/NotificationService.php index 4c1137096..3544fd150 100644 --- a/lib/Gocdb_Services/NotificationService.php +++ b/lib/Gocdb_Services/NotificationService.php @@ -32,7 +32,6 @@ public function roleRequest ($role_requested, $requesting_user, $entity) { $project = null; $authorising_user_ids = null; $projectIds = null; - $entity_name = $entity->getName(); // Get the roles from the entity foreach ( $entity->getRoles () as $role ) { @@ -94,7 +93,7 @@ public function roleRequest ($role_requested, $requesting_user, $entity) { if ($authorising_user_ids != null) { foreach ( $authorising_user_ids as $user_id ) { $approving_user = \Factory::getUserService()->getUser($user_id); - $this->send_email($role_requested, $requesting_user, $entity_name, $approving_user); + $this->send_email($role_requested, $requesting_user, $entity->getName(), $approving_user); } } }