Skip to content

Commit

Permalink
Don't create single-use local variable for entity name
Browse files Browse the repository at this point in the history
  • Loading branch information
jrha committed Aug 15, 2019
1 parent 13035ff commit 690aa0f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Gocdb_Services/NotificationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 690aa0f

Please sign in to comment.