Skip to content

Commit c9fe642

Browse files
authored
Merge pull request #152 from localgovdrupal/fix/2.x/144-strict-types
fix: strict types support
2 parents 8a77a19 + 08c589d commit c9fe642

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

localgov_subsites.module

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function localgov_subsites_preprocess_page(&$variables) {
132132
if (in_array($node->bundle(), [
133133
'localgov_subsites_overview',
134134
'localgov_subsites_page',
135-
])) {
135+
], TRUE)) {
136136
$subsite = \Drupal::service('class_resolver')
137137
->getInstanceFromDefinition(Subsite::class)
138138
->getSubsite($node);

src/Plugin/Block/SubsitesHierarchyTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ protected function getRootId(EntityInterface $entity): ?int {
113113
in_array($entity->bundle(), [
114114
'localgov_subsites_overview',
115115
'localgov_subsites_page',
116-
])
116+
], TRUE)
117117
) {
118118
if ($root_node = $this->getNestedSetStorage('localgov_subsites')->findRoot($this->getNestedSetNodeKeyFactory()->fromEntity($entity))) {
119119
return $root_node->getId();

src/Plugin/Block/SubsitesNavigationBlock.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ protected function nestTree($tree, $ancestors, $entities, &$index = 0, $depth =
123123
if ($entities->contains($node) && $entities[$node]->isDefaultRevision()) {
124124
$item = $this->formatItem(
125125
$entities[$node],
126-
in_array($node, $ancestors)
126+
in_array($node, $ancestors, TRUE)
127127
);
128128
}
129129
}

0 commit comments

Comments
 (0)