Skip to content

Commit 456cce2

Browse files
committed
[TASK] Make helper methods static
1 parent 818bac3 commit 456cce2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/guides/src/Compiler/NodeTransformers/MenuNodeTransformers/GlobMenuEntryNodeTransformer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ protected function handleMenuEntry(MenuNode $currentMenu, MenuEntryNode $entryNo
6464
false,
6565
1,
6666
'',
67-
$this->isInRootline($documentEntry, $compilerContext->getDocumentNode()->getDocumentEntry()),
68-
$this->isCurrent($documentEntry, $currentPath),
67+
self::isInRootline($documentEntry, $compilerContext->getDocumentNode()->getDocumentEntry()),
68+
self::isCurrent($documentEntry, $currentPath),
6969
);
7070
if (!$currentMenu->hasOption('titlesonly')) {
7171
$this->addSubSectionsToMenuEntries($documentEntry, $newEntryNode, $maxDepth - 1);

packages/guides/src/Compiler/NodeTransformers/MenuNodeTransformers/InternalMenuEntryNodeTransformer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ protected function handleMenuEntry(MenuNode $currentMenu, MenuEntryNode $entryNo
5151
false,
5252
1,
5353
'',
54-
$this->isInRootline($documentEntry, $compilerContext->getDocumentNode()->getDocumentEntry()),
55-
$this->isCurrent($documentEntry, $currentPath),
54+
self::isInRootline($documentEntry, $compilerContext->getDocumentNode()->getDocumentEntry()),
55+
self::isCurrent($documentEntry, $currentPath),
5656
);
5757
if (!$currentMenu->hasOption('titlesonly') && $maxDepth > 1) {
5858
$this->addSubSectionsToMenuEntries($documentEntry, $newEntryNode, $maxDepth);

packages/guides/src/Compiler/NodeTransformers/MenuNodeTransformers/MenuEntryManagement.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ private function attachDocumentEntriesToParents(
4343
}
4444
}
4545

46-
private function isInRootline(DocumentEntryNode $menuEntry, DocumentEntryNode $currentDoc): bool
46+
private static function isInRootline(DocumentEntryNode $menuEntry, DocumentEntryNode $currentDoc): bool
4747
{
4848
return $menuEntry->getFile() === $currentDoc->getFile()
4949
|| ($currentDoc->getParent() !== null
5050
&& self::isInRootline($menuEntry, $currentDoc->getParent()));
5151
}
5252

53-
private function isCurrent(DocumentEntryNode $menuEntry, string $currentPath): bool
53+
private static function isCurrent(DocumentEntryNode $menuEntry, string $currentPath): bool
5454
{
5555
return $menuEntry->getFile() === $currentPath;
5656
}

0 commit comments

Comments
 (0)