Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Commit

Permalink
Removed useless casts
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-perri committed Aug 7, 2019
1 parent 2b81ac7 commit f64fd2e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Observer/Model/CustomerGroupModelObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected function handle(AbstractModel $entity, string $action)
'context' => [
'group' => [
'text' => trim($entity->getData('code')),
'id' => (string)$entity->getId(),
'id' => $entity->getId(),
],
'action' => $action,
],
Expand Down
2 changes: 1 addition & 1 deletion Observer/Model/CustomerModelObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected function handle(AbstractModel $entity, string $action)
'context' => [
'customer' => [
'text' => trim(sprintf('%s %s', $entity->getData('firstname'), $entity->getData('lastname'))),
'id' => (string)$entity->getId(),
'id' => $entity->getId(),
],
'action' => $action,
'store-view' => $this->getActiveStoreView(),
Expand Down
4 changes: 2 additions & 2 deletions Plugin/AdminRolePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function aroundSave(Role $subject, callable $proceed)
'context' => [
'role' => [
'text' => $subject->getData('name'),
'id' => (string)$subject->getId(),
'id' => $subject->getId(),
],
'action' => $subject->isObjectNew() ? 'created' : 'modified',
],
Expand All @@ -64,7 +64,7 @@ public function beforeDelete(Role $subject): array
'context' => [
'role' => [
'text' => $subject->getData('role_name'),
'id' => (string)$subject->getId(),
'id' => $subject->getId(),
],
'action' => 'deleted',
],
Expand Down
4 changes: 2 additions & 2 deletions Plugin/AdminUserPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function aroundSave(User $subject, callable $proceed)
'context' => [
'user' => [
'text' => $subject->getUserName(),
'id' => (string)$subject->getId(),
'id' => $subject->getId(),
],
'action' => $subject->isObjectNew() ? 'created' : 'modified',
],
Expand Down Expand Up @@ -100,7 +100,7 @@ public function beforeDelete(User $subject): array
'context' => [
'user' => [
'text' => $user->getUserName(),
'id' => (string)$subject->getId(),
'id' => $user->getId(),
],
'action' => 'deleted',
],
Expand Down

0 comments on commit f64fd2e

Please sign in to comment.