diff --git a/src/Asset/AssetCollector.php b/src/Asset/AssetCollector.php index 6624347..5a4692b 100644 --- a/src/Asset/AssetCollector.php +++ b/src/Asset/AssetCollector.php @@ -86,7 +86,7 @@ class AssetCollector implements AssetCollectorInterface { * @param array $libraries * A list of CSS libraries. */ - protected function buildCssForEntity(EntityInterface $entity, array $theme_info, &$libraries) { + protected function buildCssForEntity(EntityInterface $entity, array $theme_info, array &$libraries) { foreach ($theme_info as $key => $value) { // If the entity type doesn't match just skip. if ($key !== $entity->getEntityTypeId()) { diff --git a/src/Asset/AssetRendererInterface.php b/src/Asset/AssetRendererInterface.php index 0202036..fe4b5c9 100644 --- a/src/Asset/AssetRendererInterface.php +++ b/src/Asset/AssetRendererInterface.php @@ -20,6 +20,6 @@ interface AssetRendererInterface { * @return array * The renderable array for the assets. */ - public function render($entities, $use_default_css = TRUE, $optimize_css = TRUE); + public function render(array $entities, $use_default_css = TRUE, $optimize_css = TRUE); } diff --git a/src/Event/PrintCssAlterEvent.php b/src/Event/PrintCssAlterEvent.php index c8cc584..9d638b8 100644 --- a/src/Event/PrintCssAlterEvent.php +++ b/src/Event/PrintCssAlterEvent.php @@ -31,7 +31,7 @@ class PrintCssAlterEvent extends Event { * @param array $entities * An array of entities we're rendering. */ - public function __construct(array &$build, $entities) { + public function __construct(array &$build, array $entities) { $this->build = &$build; $this->entities = $entities; } diff --git a/src/Event/PrintHtmlAlterEvent.php b/src/Event/PrintHtmlAlterEvent.php index 131c93b..3d4b1e0 100644 --- a/src/Event/PrintHtmlAlterEvent.php +++ b/src/Event/PrintHtmlAlterEvent.php @@ -31,7 +31,7 @@ class PrintHtmlAlterEvent extends Event { * @param array $entities * An array of entities we're rendering. */ - public function __construct(&$html, $entities) { + public function __construct(&$html, array $entities) { $this->html = &$html; $this->entities = $entities; } diff --git a/src/Plugin/Block/PrintLinks.php b/src/Plugin/Block/PrintLinks.php index 8ad7e61..0848892 100644 --- a/src/Plugin/Block/PrintLinks.php +++ b/src/Plugin/Block/PrintLinks.php @@ -42,7 +42,7 @@ class PrintLinks extends BlockBase implements ContainerFactoryPluginInterface { * @param \Drupal\entity_print\Plugin\ExportTypeManagerInterface $exportTypeManager * The export type manager. */ - public function __construct(array $configuration, $plugin_id, $plugin_definition, ExportTypeManagerInterface $exportTypeManager) { + public function __construct(array $configuration, $plugin_id, array $plugin_definition, ExportTypeManagerInterface $exportTypeManager) { $this->exportTypeManager = $exportTypeManager; parent::__construct($configuration, $plugin_id, $plugin_definition); } diff --git a/src/PrintEngineException.php b/src/PrintEngineException.php index 065738f..4226e73 100644 --- a/src/PrintEngineException.php +++ b/src/PrintEngineException.php @@ -83,7 +83,7 @@ class PrintEngineException extends \Exception { * @return bool * TRUE if anyone of the patterns match otherwise FALSE. */ - protected function evalulateRegex($patterns, $subject) { + protected function evalulateRegex(array $patterns, $subject) { foreach ($patterns as $pattern) { if (preg_match($pattern, $subject, $matches)) { return TRUE; diff --git a/tests/src/Kernel/PrintLinkTest.php b/tests/src/Kernel/PrintLinkTest.php index 12dd247..7dd5f64 100644 --- a/tests/src/Kernel/PrintLinkTest.php +++ b/tests/src/Kernel/PrintLinkTest.php @@ -58,7 +58,7 @@ class PrintLinkTest extends KernelTestBase { * @return \Drupal\entity_print\Plugin\Block\PrintLinks * The loaded block. */ - protected function getBlock($config = []) { + protected function getBlock(array $config = []) { $manager = $this->container->get('plugin.manager.block'); $entity = $this->getMock('Drupal\Core\Entity\EntityInterface'); $context = new Context(ContextDefinition::create(), $entity); diff --git a/tests/themes/entity_print_test_theme/css/entityprint-all.css b/tests/themes/entity_print_test_theme/css/entityprint-all.css index e69de29..d461309 100644 --- a/tests/themes/entity_print_test_theme/css/entityprint-all.css +++ b/tests/themes/entity_print_test_theme/css/entityprint-all.css @@ -0,0 +1,3 @@ +body { + background: #fff; +} diff --git a/tests/themes/entity_print_test_theme/css/entityprint-module.css b/tests/themes/entity_print_test_theme/css/entityprint-module.css index e69de29..d461309 100644 --- a/tests/themes/entity_print_test_theme/css/entityprint-module.css +++ b/tests/themes/entity_print_test_theme/css/entityprint-module.css @@ -0,0 +1,3 @@ +body { + background: #fff; +} diff --git a/tests/themes/entity_print_test_theme/css/entityprint-node.css b/tests/themes/entity_print_test_theme/css/entityprint-node.css index e69de29..d461309 100644 --- a/tests/themes/entity_print_test_theme/css/entityprint-node.css +++ b/tests/themes/entity_print_test_theme/css/entityprint-node.css @@ -0,0 +1,3 @@ +body { + background: #fff; +} diff --git a/tests/themes/entity_print_test_theme/css/entityprint-page.css b/tests/themes/entity_print_test_theme/css/entityprint-page.css index e69de29..d461309 100644 --- a/tests/themes/entity_print_test_theme/css/entityprint-page.css +++ b/tests/themes/entity_print_test_theme/css/entityprint-page.css @@ -0,0 +1,3 @@ +body { + background: #fff; +}