Skip to content

Commit

Permalink
fix phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
zlzleking committed Nov 24, 2024
1 parent b872683 commit 4952517
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions LibertyTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ protected function parseNavbar() {
foreach ( $split as $key => $value ) {
$valueArr = explode( '=', trim( $value ) );
if ( isset( $valueArr[1] ) ) {
$newValue = implode( '=', array_slice($valueArr, 1));
$newValue = implode( '=', array_slice( $valueArr, 1 ) );
$data[$valueArr[0]] = $newValue;
} else {
$data[$types[$key]] = trim( $value );
Expand All @@ -947,7 +947,9 @@ protected function parseNavbar() {
if ( isset( $data['display'] ) ) {
$textObj = $skin->msg( $data['display'] );
if ( $textObj->isDisabled() ) {
if( array_key_exists( 'link', $data ) ) $href = $data['link'];
if ( array_key_exists( 'link', $data ) ) {
$href = $data['link'];
}
} else {
$text = $textObj->text();
}
Expand All @@ -969,7 +971,9 @@ protected function parseNavbar() {
$title = $titleObj->text();
}
} else {
if( isset( $text ) ) $title = $text;
if ( isset( $text ) ) {
$title = $text;
}
}

// Link href
Expand Down Expand Up @@ -1001,7 +1005,7 @@ protected function parseNavbar() {
} else {
$classes = [];
}

// @codingStandardsIgnoreStart
$item = [
'access' => $access,
'classes' => $classes,
Expand All @@ -1012,6 +1016,7 @@ protected function parseNavbar() {
'group' => $group,
'right' => $right
];
// @codingStandardsIgnoreEnd
$level2Children = &$item['children'];
$headings[] = $item;
continue;
Expand Down Expand Up @@ -1248,7 +1253,7 @@ protected function buildAd( $position ) {
* @param Content|null $content
* @return string|null Textual form of the content, if available.
*/
private function getContentText( Content $content = null ) {
private function getContentText( ?Content $content = null ) {
if ( $content === null ) {
return '';
}
Expand Down

0 comments on commit 4952517

Please sign in to comment.