diff --git a/modules/localgov_services_landing/src/Plugin/Field/FieldFormatter/ButtonsInsideWell.php b/modules/localgov_services_landing/src/Plugin/Field/FieldFormatter/ButtonsInsideWell.php index d1388e9..9e28b59 100644 --- a/modules/localgov_services_landing/src/Plugin/Field/FieldFormatter/ButtonsInsideWell.php +++ b/modules/localgov_services_landing/src/Plugin/Field/FieldFormatter/ButtonsInsideWell.php @@ -1,5 +1,7 @@ $item) { diff --git a/modules/localgov_services_landing/src/Plugin/Field/FieldFormatter/TaxonomyVerticalList.php b/modules/localgov_services_landing/src/Plugin/Field/FieldFormatter/TaxonomyVerticalList.php index b91035a..1c2be00 100644 --- a/modules/localgov_services_landing/src/Plugin/Field/FieldFormatter/TaxonomyVerticalList.php +++ b/modules/localgov_services_landing/src/Plugin/Field/FieldFormatter/TaxonomyVerticalList.php @@ -1,5 +1,7 @@ 'textfield', '#title' => $this->t('Title'), @@ -47,7 +49,7 @@ public function settingsForm(array $form, FormStateInterface $form_state) { /** * {@inheritdoc} */ - public function settingsSummary() { + public function settingsSummary(): array { $summary = []; if ($this->getSetting('title')) { @@ -63,7 +65,7 @@ public function settingsSummary() { /** * {@inheritdoc} */ - public function viewElements(FieldItemListInterface $items, $langcode) { + public function viewElements(FieldItemListInterface $items, $langcode): array { return [ '#theme' => 'taxonomy_vertical_list', '#title' => $this->getSetting('title'), diff --git a/modules/localgov_services_landing/src/Plugin/Field/FieldFormatter/TwitterFeed.php b/modules/localgov_services_landing/src/Plugin/Field/FieldFormatter/TwitterFeed.php index 92a7737..19826cb 100644 --- a/modules/localgov_services_landing/src/Plugin/Field/FieldFormatter/TwitterFeed.php +++ b/modules/localgov_services_landing/src/Plugin/Field/FieldFormatter/TwitterFeed.php @@ -1,5 +1,7 @@ $item) { diff --git a/modules/localgov_services_landing/tests/src/Functional/ServicesLandingPageTest.php b/modules/localgov_services_landing/tests/src/Functional/ServicesLandingPageTest.php index 0ed1df5..7299a8c 100644 --- a/modules/localgov_services_landing/tests/src/Functional/ServicesLandingPageTest.php +++ b/modules/localgov_services_landing/tests/src/Functional/ServicesLandingPageTest.php @@ -1,5 +1,7 @@ 'node', 'target_bundles' => [], @@ -125,7 +127,7 @@ public function defaultConfiguration() { /** * {@inheritdoc} */ - public function buildConfigurationForm(array $form, FormStateInterface $form_state) { + public function buildConfigurationForm(array $form, FormStateInterface $form_state): array { $form = parent::buildConfigurationForm($form, $form_state); $configuration = $this->getConfiguration(); @@ -165,7 +167,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta /** * {@inheritdoc} */ - public function getReferenceableEntities($match = NULL, $match_operator = 'CONTAINS', $limit = 0) { + public function getReferenceableEntities($match = NULL, $match_operator = 'CONTAINS', $limit = 0): array { $entities = []; $query = $this->buildEntityQuery($match, $match_operator) ->accessCheck(TRUE); @@ -249,7 +251,7 @@ protected function buildEntityQuery($match = NULL, $match_operator = 'CONTAINS') /** * {@inheritdoc} */ - public function countReferenceableEntities($match = NULL, $match_operator = 'CONTAINS') { + public function countReferenceableEntities($match = NULL, $match_operator = 'CONTAINS'): int { $query = $this->buildEntityQuery($match, $match_operator); return $query ->count() @@ -260,7 +262,7 @@ public function countReferenceableEntities($match = NULL, $match_operator = 'CON /** * {@inheritdoc} */ - public function validateReferenceableEntities(array $ids) { + public function validateReferenceableEntities(array $ids): array { $result = []; if ($ids) { $entity_type = $this->entityTypeManager->getDefinition('node'); diff --git a/modules/localgov_services_navigation/tests/src/FunctionalJavascript/EntityReferenceServicesAutocompleteTest.php b/modules/localgov_services_navigation/tests/src/FunctionalJavascript/EntityReferenceServicesAutocompleteTest.php index 4bcac1e..d61d49d 100644 --- a/modules/localgov_services_navigation/tests/src/FunctionalJavascript/EntityReferenceServicesAutocompleteTest.php +++ b/modules/localgov_services_navigation/tests/src/FunctionalJavascript/EntityReferenceServicesAutocompleteTest.php @@ -1,5 +1,7 @@ getPath($request->getPathInfo()); if (substr($request_path, -7) == '/status') { @@ -68,7 +70,7 @@ public function processInbound($path, Request $request) { /** * {@inheritdoc} */ - public function processOutbound($path, &$options = [], ?Request $request = NULL, ?BubbleableMetadata $bubbleableMetadata = NULL) { + public function processOutbound($path, &$options = [], ?Request $request = NULL, ?BubbleableMetadata $bubbleableMetadata = NULL): string { assert($this->pathProcessor instanceof OutboundPathProcessorInterface); // This is the inverse of inbound. Maybe less all-encompassing to swap this diff --git a/modules/localgov_services_status/src/Plugin/Block/ServiceStatusMessage.php b/modules/localgov_services_status/src/Plugin/Block/ServiceStatusMessage.php index 3b5264a..a66c8a3 100644 --- a/modules/localgov_services_status/src/Plugin/Block/ServiceStatusMessage.php +++ b/modules/localgov_services_status/src/Plugin/Block/ServiceStatusMessage.php @@ -1,5 +1,7 @@ cacheContexts); } /** * {@inheritdoc} */ - public function getCacheTags() { + public function getCacheTags(): array { // Invalidate cache on changes to localgov_services_status nodes. return Cache::mergeTags(parent::getCacheTags(), $this->cacheTags, ['node_list:localgov_services_status']); } diff --git a/modules/localgov_services_status/src/Plugin/views/style/ServiceStatus.php b/modules/localgov_services_status/src/Plugin/views/style/ServiceStatus.php index 1ec121b..ddff73e 100644 --- a/modules/localgov_services_status/src/Plugin/views/style/ServiceStatus.php +++ b/modules/localgov_services_status/src/Plugin/views/style/ServiceStatus.php @@ -1,5 +1,7 @@ getStatusUpdates($node, 2, FALSE, TRUE); } @@ -73,7 +75,7 @@ public function getStatusForBlock(Node $node) { * @throws \Drupal\Core\Entity\EntityMalformedException * @throws \Drupal\Core\TypedData\Exception\MissingDataException */ - public function getStatusForPage(Node $node) { + public function getStatusForPage(Node $node): array { return $this->getStatusUpdates($node, 10, TRUE, FALSE); } @@ -97,7 +99,7 @@ public function getStatusForPage(Node $node) { * @throws \Drupal\Core\Entity\EntityMalformedException * @throws \Drupal\Core\TypedData\Exception\MissingDataException */ - public function getStatusUpdates(NodeInterface $landing_node, $n, $hide_from_list = FALSE, $hide_from_landing = FALSE) { + public function getStatusUpdates(NodeInterface $landing_node, $n, $hide_from_list = FALSE, $hide_from_landing = FALSE): array { $query = $this->statusUpdatesQuery($landing_node->id(), $hide_from_list, $hide_from_landing); $result = $query->sort('created', 'DESC') ->range(0, $n) diff --git a/modules/localgov_services_status/tests/src/Functional/ServiceStatusMessageVisibilityTest.php b/modules/localgov_services_status/tests/src/Functional/ServiceStatusMessageVisibilityTest.php index f67536d..b1bf017 100644 --- a/modules/localgov_services_status/tests/src/Functional/ServiceStatusMessageVisibilityTest.php +++ b/modules/localgov_services_status/tests/src/Functional/ServiceStatusMessageVisibilityTest.php @@ -1,5 +1,7 @@ $this->t('View Mode'), '#type' => 'select', diff --git a/modules/localgov_services_sublanding/tests/src/Functional/ServiceSublandingTest.php b/modules/localgov_services_sublanding/tests/src/Functional/ServiceSublandingTest.php index 4df4b2b..a2dd232 100644 --- a/modules/localgov_services_sublanding/tests/src/Functional/ServiceSublandingTest.php +++ b/modules/localgov_services_sublanding/tests/src/Functional/ServiceSublandingTest.php @@ -1,5 +1,7 @@ node->id()]); } /** * {@inheritdoc} */ - public function getCacheContexts() { + public function getCacheContexts(): array { return Cache::mergeContexts(parent::getCacheContexts(), ['route']); } diff --git a/src/Plugin/Block/ServicesCtaBlock.php b/src/Plugin/Block/ServicesCtaBlock.php index af102ac..5fe5996 100644 --- a/src/Plugin/Block/ServicesCtaBlock.php +++ b/src/Plugin/Block/ServicesCtaBlock.php @@ -1,5 +1,7 @@ node->get('localgov_common_tasks')->getValue() as $call_to_action) { diff --git a/src/Plugin/Field/FieldWidget/LinkWithType.php b/src/Plugin/Field/FieldWidget/LinkWithType.php index ab8cb69..da5548a 100644 --- a/src/Plugin/Field/FieldWidget/LinkWithType.php +++ b/src/Plugin/Field/FieldWidget/LinkWithType.php @@ -1,5 +1,7 @@