Skip to content

Commit 7846597

Browse files
committed
Fix linting errors
1 parent 666a992 commit 7846597

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

app/Support/helpers.php

+9-5
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function _parse_html_headings(string $html): array
6969
function ($_, $level, $anchor, $title) {
7070
return (object) [
7171
'title' => trim(_remove_anchor_from_title($title)),
72-
'anchor' => "#$anchor",
72+
'anchor' => "#{$anchor}",
7373
'level' => intval($level),
7474
];
7575
},
@@ -82,7 +82,8 @@ function _remove_anchor_from_title(string $title): string
8282
return preg_replace('/<a href="#[^"]+"[^>]*>(.*?)<\/a>/sm', '$1', $title);
8383
}
8484

85-
function _create_ancestor_landmark($previousLandmark, $header) {
85+
function _create_ancestor_landmark($previousLandmark, $header)
86+
{
8687
while ($previousLandmark->level !== $header->level) {
8788
$previousLandmark = $previousLandmark->parent;
8889
}
@@ -100,7 +101,8 @@ function _create_ancestor_landmark($previousLandmark, $header) {
100101
});
101102
}
102103

103-
function _create_descendant_landmark($previousLandmark, $header) {
104+
function _create_descendant_landmark($previousLandmark, $header)
105+
{
104106
while ($previousLandmark->level !== $header->level - 1) {
105107
$childLandmark = (object) [
106108
'level' => $previousLandmark->level + 1,
@@ -125,7 +127,8 @@ function _create_descendant_landmark($previousLandmark, $header) {
125127
});
126128
}
127129

128-
function _clean_landmark_tree($landmark) {
130+
function _clean_landmark_tree($landmark)
131+
{
129132
while ($landmark->level !== 1) {
130133
$landmark = $landmark->parent;
131134
}
@@ -135,7 +138,8 @@ function _clean_landmark_tree($landmark) {
135138
return $landmark;
136139
}
137140

138-
function _clean_landmark($landmark) {
141+
function _clean_landmark($landmark)
142+
{
139143
unset($landmark->parent);
140144

141145
if (empty($landmark->children)) {

0 commit comments

Comments
 (0)