Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
parameters:
level: 9
paths:
- src
- maintenance-mode-command.php
scanDirectories:
- vendor/wp-cli/wp-cli/php
scanFiles:
- vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
treatPhpDocTypesAsCertain: false
ignoreErrors:
- identifier: missingType.parameter
- identifier: missingType.return
2 changes: 1 addition & 1 deletion src/MaintenanceModeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private function get_maintenance_mode_status() {
// to check if the maintenance is available.
$upgrading = 0;

$contents = $wp_filesystem->get_contents( $maintenance_file );
$contents = (string) $wp_filesystem->get_contents( $maintenance_file );
$matches = [];
if ( preg_match( '/upgrading\s*=\s*(\d+)\s*;/i', $contents, $matches ) ) {
$upgrading = (int) $matches[1];
Expand Down