Browse Source

Merge pull request #15925 from cakephp/5.0-stan

Make static analyzers happy.
ADmad 4 years ago
parent
commit
5735c66be6

+ 0 - 10
phpstan-baseline.neon

@@ -461,16 +461,6 @@ parameters:
 			path: src/TestSuite/Fixture/TestFixture.php
 
 		-
-			message: "#^Parameter \\#1 \\$separator of function explode expects non\\-empty\\-string, string given\\.$#"
-			count: 1
-			path: src/Utility/Hash.php
-
-		-
-			message: "#^Parameter \\#1 \\$separator of function explode expects non\\-empty\\-string, string given\\.$#"
-			count: 1
-			path: src/Utility/Text.php
-
-		-
 			message: "#^Unsafe usage of new static\\(\\)\\.$#"
 			count: 1
 			path: src/View/Form/ContextFactory.php

+ 3 - 1
src/Database/PostgresCompiler.php

@@ -36,7 +36,9 @@ class PostgresCompiler extends QueryCompiler
     protected bool $_quotedSelectAliases = true;
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
+     *
+     * @var array<string, string>
      */
     protected array $_templates = [
         'delete' => 'DELETE',

+ 6 - 2
src/Database/SqlserverCompiler.php

@@ -35,7 +35,9 @@ class SqlserverCompiler extends QueryCompiler
     protected bool $_orderedUnion = false;
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
+     *
+     * @var array<string, string>
      */
     protected array $_templates = [
         'delete' => 'DELETE',
@@ -47,7 +49,9 @@ class SqlserverCompiler extends QueryCompiler
     ];
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
+     *
+     * @var array<string>
      */
     protected array $_selectParts = [
         'with', 'select', 'from', 'join', 'where', 'group', 'having', 'window', 'order',

+ 3 - 1
src/Database/Type/DateTimeFractionalType.php

@@ -27,7 +27,9 @@ class DateTimeFractionalType extends DateTimeType
     protected string $_format = 'Y-m-d H:i:s.u';
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
+     *
+     * @var array<string>
      */
     protected array $_marshalFormats = [
         'Y-m-d H:i',

+ 4 - 1
src/Database/Type/DateTimeTimezoneType.php

@@ -27,8 +27,11 @@ class DateTimeTimezoneType extends DateTimeType
     protected string $_format = 'Y-m-d H:i:s.uP';
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
+     *
+     * @var array<string>
      */
+
     protected array $_marshalFormats = [
         'Y-m-d H:i',
         'Y-m-d H:i:s',

+ 3 - 1
src/Database/Type/DateType.php

@@ -32,7 +32,9 @@ class DateType extends DateTimeType
     protected string $_format = 'Y-m-d';
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
+     *
+     * @var array<string>
      */
     protected array $_marshalFormats = [
         'Y-m-d',

+ 3 - 1
src/Database/Type/TimeType.php

@@ -31,7 +31,9 @@ class TimeType extends DateTimeType
     protected string $_format = 'H:i:s';
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
+     *
+     * @var array<string>
      */
     protected array $_marshalFormats = [
         'H:i:s',