Skip to content

Commit 772a7b1

Browse files
Merge pull request #1332 from creative-commoners/pulls/6.0/linting
MNT Linting
2 parents 27dbf74 + 5869028 commit 772a7b1

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

src/ORM/Search/ElementalSiteTreeSearchContext.php

+10-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ class ElementalSiteTreeSearchContext extends SiteTreeSearchContext
2727
*/
2828
private static bool $render_elements = true;
2929

30-
protected function generalSearchAcrossFields(string|array $searchPhrase, DataQuery $subGroup, array $searchableFields): void
31-
{
30+
protected function generalSearchAcrossFields(
31+
string|array $searchPhrase,
32+
DataQuery $subGroup,
33+
array $searchableFields
34+
): void {
3235
parent::generalSearchAcrossFields($searchPhrase, $subGroup, $searchableFields);
3336

3437
if (static::config()->get('search_for_term_in_content') === false) {
@@ -42,7 +45,11 @@ protected function generalSearchAcrossFields(string|array $searchPhrase, DataQue
4245
$pageIDs = [];
4346
// The same extension can't be applied to the multiple classes in the same hierarchy
4447
// without causing a host of problems, so we can be confident that we're not getting any double ups here.
45-
$pageClassesWithExtension = ClassInfo::classesWithExtension(ElementalPageExtension::class, SiteTree::class, true);
48+
$pageClassesWithExtension = ClassInfo::classesWithExtension(
49+
ElementalPageExtension::class,
50+
SiteTree::class,
51+
true
52+
);
4653
// Get a list of classes that can't have elemental blocks despite having the extension to reduce the amount of
4754
// records we're filtering through needlessly
4855
$ignoredClasses = Config::forClass(ElementalPageExtension::class)->get('ignored_classes');

tests/ORM/Search/ElementalSiteTreeSearchContextTest.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ class ElementalSiteTreeSearchContextTest extends SapphireTest
3030
];
3131

3232
#[DataProvider('searchProvider')]
33-
public function testElementalPageDataMatchesInCmsSearch(bool $renderElements, string $searchTerm, array $expected): void
34-
{
33+
public function testElementalPageDataMatchesInCmsSearch(
34+
bool $renderElements,
35+
string $searchTerm,
36+
array $expected
37+
): void {
3538
Config::modify()->set(ElementalSiteTreeSearchContext::class, 'render_elements', $renderElements);
3639
$page = new SiteTree();
3740
$context = new ElementalSiteTreeSearchContext(

0 commit comments

Comments
 (0)