Skip to content

Commit

Permalink
Issue #3403634 by SV: Fix PHPCS check
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-sydor committed Feb 9, 2024
1 parent b76c4e1 commit aae8c28
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Drupal\group\Plugin\Group\RelationHandler\EntityReferenceTrait;

/**
* Configures the entity reference for the group_membership_request relation plugin.
* Configures entity reference for the group_membership_request relation plugin.
*/
class GroupMembershipRequestEntityReference implements EntityReferenceInterface {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function buildPermissions() {
* Get request membership permission.
*
* @return string
* Permission name.
* Permission name.
*/
public function getRequestGroupMembershipPermission() {
return 'request group membership';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
/**
* Provides a content enabler for users.
*
* @deprecated and should be removed.
* @deprecated and should be removed,
* and should be used Drupal\grequest\Plugin\Group\Relation\GroupMembershipRequest.
*
* @see https://www.drupal.org/docs/extending-drupal/contributed-modules/contributed-module-documentation/group/updating-your-modules-to-group-20-api
*
* @GroupContentEnabler(
* id = "group_membership_request",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Drupal\Core\Session\AccountInterface;
use Drupal\group\Plugin\Group\RelationHandler\AccessControlInterface;
use Drupal\group\Plugin\Group\RelationHandler\AccessControlTrait;
use Drupal\group\Plugin\Group\RelationHandlerDefault\AccessControl;
use Drupal\social_event_managers\SocialEventManagersAccessHelper;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function social_group_invite_block_access(Block $block, $operation, AccountInter
// will allow users to go back.
if (in_array($route_name, $routes_to_check)) {
$block_id = $block->getPluginId();
/** @var GroupRelationshipInterface $group_content */
/** @var \Drupal\group\Entity\GroupRelationshipInterface $group_content */
$group_content = \Drupal::routeMatch()->getParameter('group_content');

// Only if we are sure it's a group invitation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class SocialBulkGroupInvitation extends BulkGroupInvitation {
protected $token;

/**
* The group relation type manager
* The group relation type manager.
*
* @var \Drupal\group\Plugin\Group\Relation\GroupRelationTypeManagerInterface
*/
Expand Down
4 changes: 2 additions & 2 deletions modules/social_features/social_group/social_group.module
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ function social_group_form_alter(&$form, FormStateInterface $form_state, $form_i
$gc_manager = \Drupal::service('group_relation_type.manager');

if (!$gc_manager->getRelationshipTypeIds('group_node:' . $entity->bundle())) {
unset($form['groups']);
unset($form['groups']);
}
}
}
Expand Down Expand Up @@ -2677,7 +2677,7 @@ function social_group_can_view_groups_of_type(string $type, AccountInterface $ac
// If members can see it, we also need to show group types because
// we are not calculation memberships.
$id = $group_type->id() . '-member';
$member = \Drupal::entityTypeManager()->getStorage('group_role')->load($id);
$member = \Drupal::entityTypeManager()->getStorage('group_role')->load($id);
if (NULL !== $member && $member->hasPermission('view group')) {
return TRUE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Mod
*/
public static function batchUpdateGroupContentVisibility(GroupInterface $group, $new_type) {
// Set it up as a batch. We need to update visibility.
// Load all the GroupRelationshipEntities from Post to Memberships to content.
// Load all GroupRelationshipEntities from Post to Memberships to content.
$entities = $group->getRelatedEntities();

$posts = self::getPostsFromGroup($group);
Expand Down
4 changes: 2 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ parameters:
class: Drupal\social_group\Entity\Group
storage: Drupal\group\Entity\Storage\GroupStorage
group_content:
class: Drupal\group\Entity\GroupContent
storage: Drupal\group\Entity\Storage\GroupContentStorage
class: Drupal\group\Entity\GroupRelationship
storage: Drupal\group\Entity\Storage\GroupRelationshipStorage
mentions:
class: Drupal\mentions\Entity\Mentions
storage: Drupal\Core\Entity\ContentEntityStorageBase
Expand Down

0 comments on commit aae8c28

Please sign in to comment.