Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
Adhere to coding standards.
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrenssen committed Jul 31, 2020
1 parent dd24dcf commit 2e123be
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/PermissionManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ public function getDefaultPermissions($group_entity_type_id, $group_bundle_id, a
* PermissionEvent. The default permissions that ship with Organic Groups can
* be found in OgEventSubscriber::provideDefaultOgPermissions().
*
* @see \Drupal\og\Event\PermissionEventInterface
* @see \Drupal\og\EventSubscriber\OgEventSubscriber::provideDefaultOgPermissions()
*
* @param string $group_entity_type_id
* The entity type ID of the group for which to return permissions.
* @param string $group_bundle_id
Expand All @@ -57,6 +54,9 @@ public function getDefaultPermissions($group_entity_type_id, $group_bundle_id, a
*
* @return \Drupal\og\GroupPermission[]
* An array of permissions that are enabled by default for the given role.
*
* @see \Drupal\og\Event\PermissionEventInterface
* @see \Drupal\og\EventSubscriber\OgEventSubscriber::provideDefaultOgPermissions()
*/
public function getDefaultGroupPermissions($group_entity_type_id, $group_bundle_id, $role_name = NULL);

Expand All @@ -71,10 +71,6 @@ public function getDefaultGroupPermissions($group_entity_type_id, $group_bundle_
* content operation permissions that ship with Organic Groups can be found in
* OgEventSubscriber.
*
* @see \Drupal\og\Event\PermissionEventInterface
* @see \Drupal\og\EventSubscriber\OgEventSubscriber::provideDefaultNodePermissions()
* @see \Drupal\og\EventSubscriber\OgEventSubscriber::getDefaultEntityOperationPermissions()
*
* @param string $group_entity_type_id
* The entity type ID of the group for which to return permissions.
* @param string $group_bundle_id
Expand All @@ -88,6 +84,10 @@ public function getDefaultGroupPermissions($group_entity_type_id, $group_bundle_
*
* @return \Drupal\og\GroupContentOperationPermission[]
* The array of permissions.
*
* @see \Drupal\og\Event\PermissionEventInterface
* @see \Drupal\og\EventSubscriber\OgEventSubscriber::provideDefaultNodePermissions()
* @see \Drupal\og\EventSubscriber\OgEventSubscriber::getDefaultEntityOperationPermissions()
*/
public function getDefaultEntityOperationPermissions($group_entity_type_id, $group_bundle_id, array $group_content_bundle_ids, $role_name = NULL);

Expand Down
5 changes: 4 additions & 1 deletion tests/src/Kernel/Access/GroupLevelAccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ public function testGroupEntityOperationPermissions(string $user, array $access_

// Also check that the access result is correctly communicated to
// hook_entity_access().
$hook_result = \Drupal::moduleHandler()->invokeAll( 'entity_access', [$this->group, $operation, $user]);
$arguments = [$this->group, $operation, $user];
$hook_result = \Drupal::moduleHandler()->invokeAll('entity_access', $arguments);

// The hook returns an array of access results, add them all up.
if (empty($hook_result)) {
Expand All @@ -351,6 +352,7 @@ public function testGroupEntityOperationPermissions(string $user, array $access_
* Returns test users with permissions to perform group entity operations.
*
* @return \Drupal\user\UserInterface[]
* The test users.
*/
protected function setupGroupEntityOperationPermissions(): array {
// Return the users from the generic test setup.
Expand Down Expand Up @@ -444,4 +446,5 @@ public function groupEntityOperationPermissionsTestProvider(): array {
],
];
}

}

0 comments on commit 2e123be

Please sign in to comment.