Skip to content

Commit

Permalink
Fix Psalm issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nielslange committed Oct 14, 2024
1 parent b33f01b commit 6aa9680
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=7.3"
"php": ">=8.1.2"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "1.0.0",
Expand Down
2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
<psalm errorLevel="5" resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd">

<projectFiles>
<file name="smntcs-custom-logo-link.php"/>
<ignoreFiles>
<directory name="vendor"/>
</ignoreFiles>
</projectFiles>

<plugins>
<pluginClass class="PsalmWordPress\Plugin"/>
</plugins>
Expand Down
7 changes: 4 additions & 3 deletions smntcs-custom-logo-link.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ function smntcs_custom_logo_link_register_customize( $wp_customize ) {
$wp_customize->add_setting(
'smntcs_custom_logo_link_target',
array(
'default' => false,
'type' => 'option',
'default' => '',
'type' => 'option',
'sanitize_callback' => 'wp_validate_boolean',
)
);

Expand Down Expand Up @@ -133,4 +134,4 @@ function smntcs_custom_logo_link_enqueue() {
break;
}
}
add_action( 'wp_head', 'smntcs_custom_logo_link_enqueue' );
add_action( 'wp_head', 'smntcs_custom_logo_link_enqueue', 10, 0 );

0 comments on commit 6aa9680

Please sign in to comment.