Skip to content

Commit be10b81

Browse files
fix(framework-bundle): use standalone phpstan bootstrap
1 parent e4a6c36 commit be10b81

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

phpstan.neon.dist

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,9 @@ parameters:
88
- dropin
99
- tests
1010
bootstrapFiles:
11-
- ../../vendor/autoload.php
11+
- vendor/autoload.php
1212
- tests/phpunit/bootstrap.php
13+
scanFiles:
14+
- stubs/wp-cli.stub.php
15+
stubFiles:
16+
- stubs/wp-cli.stub.php

stubs/wp-cli.stub.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
final class WP_CLI
6+
{
7+
/**
8+
* @param array<string, mixed>|callable|object|string $callable
9+
*/
10+
public static function add_command(string $name, array|callable|object|string $callable): void
11+
{
12+
}
13+
14+
public static function error(string $message): void
15+
{
16+
}
17+
18+
public static function halt(int $returnCode): void
19+
{
20+
}
21+
22+
public static function success(string $message): void
23+
{
24+
}
25+
26+
public static function warning(string $message): void
27+
{
28+
}
29+
}

0 commit comments

Comments
 (0)