From a2ae665dd2f18c0511402896d321711ce1c64d51 Mon Sep 17 00:00:00 2001 From: Andrey Savchenko Date: Sun, 16 Jun 2019 00:24:03 +0300 Subject: [PATCH] Disabled Mixed Psalm errors because I quit. --- psalm.xml | 9 +-------- src/Formatter/Backtrace_Formatter.php | 1 - src/Manager/Toolbar_Manager.php | 2 -- src/Plugin.php | 5 ----- src/Provider/Record_Provider.php | 7 ------- src/Record/Collector/Sql_Collector.php | 3 --- 6 files changed, 1 insertion(+), 26 deletions(-) diff --git a/psalm.xml b/psalm.xml index dc113ad..a7e6106 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,6 +1,6 @@ - - - - - - - diff --git a/src/Formatter/Backtrace_Formatter.php b/src/Formatter/Backtrace_Formatter.php index d4ab16d..b89738d 100644 --- a/src/Formatter/Backtrace_Formatter.php +++ b/src/Formatter/Backtrace_Formatter.php @@ -82,7 +82,6 @@ protected function filter( string $item ): bool { * @return string * * @psalm-suppress PossiblyFalseOperand - * @psalm-suppress MixedInferredReturnType */ protected function shorten_include( string $item ): string { diff --git a/src/Manager/Toolbar_Manager.php b/src/Manager/Toolbar_Manager.php index a7b74c5..a340244 100644 --- a/src/Manager/Toolbar_Manager.php +++ b/src/Manager/Toolbar_Manager.php @@ -36,8 +36,6 @@ public function __construct( Record_Collector_Interface $collector, Mustache_Eng * Render interface and add to the toolbar. * * @param \WP_Admin_Bar $wp_admin_bar WordPress core toolbar object. - * - * @psalm-suppress MixedArgument */ public function admin_bar_menu( \WP_Admin_Bar $wp_admin_bar ): void { diff --git a/src/Plugin.php b/src/Plugin.php index 5280cdf..17ecf23 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -21,9 +21,6 @@ class Plugin extends Container { /** * @param array $values Configuration values to apply. * @psalm-param array $values - * - * @psalm-suppress MixedArgument - * @psalm-suppress MixedAssignment */ public function __construct( array $values = [] ) { @@ -64,8 +61,6 @@ public function register( ServiceProviderInterface $provider, array $values = [] /** * Start Stopwatch and timing plugin load immediately, then set up core events and needed hooks. - * - * @psalm-suppress MixedAssignment */ public function run(): void { diff --git a/src/Provider/Record_Provider.php b/src/Provider/Record_Provider.php index c29eaeb..fbaeb32 100644 --- a/src/Provider/Record_Provider.php +++ b/src/Provider/Record_Provider.php @@ -42,14 +42,7 @@ public function register( Container $pimple ): void { return new Lazy_Proxy_Collector( $laps['collectors'] ); }; - /** - * @psalm-suppress MixedInferredReturnType - */ $pimple['records'] = function ( Plugin $laps ): array { - /** - * @psalm-suppress MixedMethodCall - * @psalm-suppress MixedReturnStatement - */ return $laps['records.lazy']->get_records(); }; } diff --git a/src/Record/Collector/Sql_Collector.php b/src/Record/Collector/Sql_Collector.php index 3d6293a..f156f49 100644 --- a/src/Record/Collector/Sql_Collector.php +++ b/src/Record/Collector/Sql_Collector.php @@ -37,8 +37,6 @@ public function __construct() { * @param string $query SQL query. * * @return string - * - * @psalm-suppress MixedPropertyFetch */ public function query( $query ): string { @@ -61,7 +59,6 @@ public function get_records(): array { global $wpdb; - /** @psalm-suppress MixedPropertyFetch */ if ( empty( $wpdb->queries ) ) { return []; }