mirror of
https://fast.feibisi.com/https://github.com/wp-cli/scaffold-command.git
synced 2025-08-18 05:21:29 +08:00
PHPStan level 9
This commit is contained in:
parent
aa2d899159
commit
1dc0d16a35
2 changed files with 15 additions and 2 deletions
13
phpstan.neon.dist
Normal file
13
phpstan.neon.dist
Normal file
|
@ -0,0 +1,13 @@
|
|||
parameters:
|
||||
level: 9
|
||||
paths:
|
||||
- src
|
||||
- scaffold-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
|
|
@ -875,7 +875,7 @@ class Scaffold_Command extends WP_CLI_Command {
|
|||
$wp_versions_to_test = [];
|
||||
// Parse plugin readme.txt
|
||||
if ( file_exists( "{$target_dir}/readme.txt" ) ) {
|
||||
$readme_content = file_get_contents( "{$target_dir}/readme.txt" );
|
||||
$readme_content = (string) file_get_contents( "{$target_dir}/readme.txt" );
|
||||
|
||||
preg_match( '/Requires at least\:(.*)\n/m', $readme_content, $matches );
|
||||
if ( isset( $matches[1] ) && $matches[1] ) {
|
||||
|
@ -1045,7 +1045,7 @@ class Scaffold_Command extends WP_CLI_Command {
|
|||
/**
|
||||
* Extracts dashicon name when provided or return null otherwise.
|
||||
*
|
||||
* @param array $assoc_args
|
||||
* @param array{dashicon?: string} $assoc_args
|
||||
* @return string|null
|
||||
*/
|
||||
private function extract_dashicon( $assoc_args ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue