Skip to content

Commit

Permalink
Ignore PHPStan file checks
Browse files Browse the repository at this point in the history
  • Loading branch information
TorbenLundsgaard committed Sep 11, 2024
1 parent 7e68202 commit 9d74be8
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ parameters:
- gtm-kit.php
- src/
- uninstall.php
ignoreErrors:
- '#Path in require_once.*plugin#'
1 change: 1 addition & 0 deletions src/Common/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ private function add_shared_data( array $data, string $wp_version ): array {
public function get_active_plugins(): array {

if ( ! function_exists( 'get_plugins' ) ) {
// @phpstan-ignore-next-line
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}

Expand Down
2 changes: 1 addition & 1 deletion src/Installation/PluginDataImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ private function get_google_tag_manager(): array {
*/
private function is_plugin_active( string $plugin ): bool {
if ( ! function_exists( 'is_plugin_active' ) ) {

// @phpstan-ignore-next-line
require_once ABSPATH . 'wp-admin/includes/plugin.php';

}
Expand Down
1 change: 1 addition & 0 deletions src/Installation/Upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ protected function v122_upgrade(): void {
protected function v2_upgrade(): void {

if ( ! function_exists( 'get_plugins' ) ) {
// @phpstan-ignore-next-line
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}

Expand Down
1 change: 1 addition & 0 deletions src/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ public function pre_update_option( $new_value, $old_value ): ?array {
public static function get_defaults(): array {

if ( ! function_exists( 'is_plugin_active' ) ) {
// @phpstan-ignore-next-line
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}

Expand Down

0 comments on commit 9d74be8

Please sign in to comment.