diff --git a/src/TwigTweakExtension.php b/src/TwigTweakExtension.php index 23a1f08..53b11d1 100644 --- a/src/TwigTweakExtension.php +++ b/src/TwigTweakExtension.php @@ -84,6 +84,7 @@ class TwigTweakExtension extends AbstractExtension { }), new TwigFunction('drupal_breadcrumb', [self::class, 'drupalBreadcrumb']), new TwigFunction('drupal_breakpoint', [self::class, 'drupalBreakpoint'], $all_options), + // @phpcs:ignore Drupal.Arrays.Array.LongLineDeclaration new TwigFunction('drupal_contextual_links', [self::class, 'drupalContextualLinks']), ]; diff --git a/src/View/BlockViewBuilder.php b/src/View/BlockViewBuilder.php index 1e7065b..ab42b2c 100644 --- a/src/View/BlockViewBuilder.php +++ b/src/View/BlockViewBuilder.php @@ -16,7 +16,7 @@ use Drupal\Core\Session\AccountInterface; use Symfony\Component\HttpFoundation\RequestStack; /** - * BlockViewBuilder service. + * Block view builder. */ class BlockViewBuilder { diff --git a/src/View/EntityFormViewBuilder.php b/src/View/EntityFormViewBuilder.php index 77a0b40..92b0626 100644 --- a/src/View/EntityFormViewBuilder.php +++ b/src/View/EntityFormViewBuilder.php @@ -8,7 +8,7 @@ use Drupal\Core\Entity\EntityFormBuilderInterface; use Drupal\Core\Entity\EntityInterface; /** - * EntityFormViewBuilder service. + * Entity form view builder. */ class EntityFormViewBuilder { diff --git a/src/View/EntityViewBuilder.php b/src/View/EntityViewBuilder.php index 9395fac..0125768 100644 --- a/src/View/EntityViewBuilder.php +++ b/src/View/EntityViewBuilder.php @@ -8,7 +8,7 @@ use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; /** - * EntityViewBuilder service. + * Entity view builder. */ class EntityViewBuilder { diff --git a/src/View/FieldViewBuilder.php b/src/View/FieldViewBuilder.php index 49e3527..2ff87b3 100644 --- a/src/View/FieldViewBuilder.php +++ b/src/View/FieldViewBuilder.php @@ -8,7 +8,7 @@ use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityRepositoryInterface; /** - * FieldViewBuilder service. + * Field view builder. */ class FieldViewBuilder { diff --git a/src/View/ImageViewBuilder.php b/src/View/ImageViewBuilder.php index 64f8326..c45124b 100644 --- a/src/View/ImageViewBuilder.php +++ b/src/View/ImageViewBuilder.php @@ -7,7 +7,7 @@ use Drupal\Core\Cache\CacheableMetadata; use Drupal\file\FileInterface; /** - * ImageViewBuilder service. + * Image view builder. */ class ImageViewBuilder { diff --git a/src/View/MenuViewBuilder.php b/src/View/MenuViewBuilder.php index 0d439bf..8abcfe2 100644 --- a/src/View/MenuViewBuilder.php +++ b/src/View/MenuViewBuilder.php @@ -5,7 +5,7 @@ namespace Drupal\twig_tweak\View; use Drupal\Core\Menu\MenuLinkTreeInterface; /** - * MenuViewBuilder service. + * Menu view builder. */ class MenuViewBuilder { diff --git a/src/View/RegionViewBuilder.php b/src/View/RegionViewBuilder.php index d11c0a9..0c0c5ad 100644 --- a/src/View/RegionViewBuilder.php +++ b/src/View/RegionViewBuilder.php @@ -11,7 +11,7 @@ use Symfony\Cmf\Component\Routing\RouteObjectInterface; use Symfony\Component\HttpFoundation\RequestStack; /** - * RegionViewBuilder service. + * Region view builder. */ class RegionViewBuilder { @@ -83,7 +83,7 @@ class RegionViewBuilder { $cache_metadata = new CacheableMetadata(); - /* @var $blocks \Drupal\block\BlockInterface[] */ + /** @var \Drupal\block\BlockInterface[] $blocks */ foreach ($blocks as $id => $block) { $access = $block->access('view', NULL, TRUE); $cache_metadata = $cache_metadata->merge(CacheableMetadata::createFromObject($access)); diff --git a/tests/src/Kernel/EntityFormViewBuilderTest.php b/tests/src/Kernel/EntityFormViewBuilderTest.php index c088867..fe5b756 100644 --- a/tests/src/Kernel/EntityFormViewBuilderTest.php +++ b/tests/src/Kernel/EntityFormViewBuilderTest.php @@ -38,7 +38,10 @@ final class EntityFormViewBuilderTest extends KernelTestBase { $this->installConfig(['system']); $this->installEntitySchema('node'); NodeType::create(['type' => 'article'])->save(); - $this->setUpCurrentUser(['name' => 'User 1'], ['edit any article content', 'access content']); + $this->setUpCurrentUser( + ['name' => 'User 1'], + ['edit any article content', 'access content'], + ); } /**