Browse Source

Merge pull request #17411 from cakephp/5.x-cleanup-phpstan

Clean up PHPStan baseline. Fix merge issues.
ADmad 2 years ago
parent
commit
c47ae2aa00
4 changed files with 0 additions and 37 deletions
  1. 0 20
      phpstan-baseline.neon
  2. 0 6
      psalm-baseline.xml
  3. 0 8
      src/Console/CommandCollection.php
  4. 0 3
      src/Console/HelperRegistry.php

+ 0 - 20
phpstan-baseline.neon

@@ -11,26 +11,6 @@ parameters:
 			path: src/Collection/Iterator/NoChildrenIterator.php
 
 		-
-			message: "#^Call to method getOptionParser\\(\\) on an unknown class Cake\\\\Console\\\\Shell\\.$#"
-			count: 1
-			path: src/Command/CompletionCommand.php
-
-		-
-			message: "#^Method Cake\\\\Console\\\\CommandCollection\\:\\:get\\(\\) has invalid return type Cake\\\\Console\\\\Shell\\.$#"
-			count: 1
-			path: src/Console/CommandCollection.php
-
-		-
-			message: "#^Method Cake\\\\Console\\\\CommandCollection\\:\\:getIterator\\(\\) has invalid return type Cake\\\\Console\\\\Shell\\.$#"
-			count: 1
-			path: src/Console/CommandCollection.php
-
-		-
-			message: "#^PHPDoc tag @return with type Cake\\\\Console\\\\CommandInterface\\|Cake\\\\Console\\\\Shell\\|class\\-string\\<Cake\\\\Console\\\\CommandInterface\\> is not subtype of native type Cake\\\\Console\\\\CommandInterface\\|string\\.$#"
-			count: 1
-			path: src/Console/CommandCollection.php
-
-		-
 			message: "#^Unsafe usage of new static\\(\\)\\.$#"
 			count: 2
 			path: src/Console/ConsoleOptionParser.php

+ 0 - 6
psalm-baseline.xml

@@ -18,12 +18,6 @@
       <code>int|false</code>
     </InvalidReturnType>
   </file>
-  <file src="src/Console/CommandCollection.php">
-    <InvalidDocblock>
-      <code>public function get(string $name): CommandInterface|string</code>
-      <code>public function getIterator(): Traversable</code>
-    </InvalidDocblock>
-  </file>
   <file src="src/Database/Query.php">
     <UnusedPsalmSuppress>
       <code>InvalidArrayOffset</code>

+ 0 - 8
src/Console/CommandCollection.php

@@ -130,11 +130,7 @@ class CommandCollection implements IteratorAggregate, Countable
      * Get the target for a command.
      *
      * @param string $name The named shell.
-<<<<<<< HEAD
      * @return \Cake\Console\CommandInterface|class-string<\Cake\Console\CommandInterface> Either the command class or an instance.
-=======
-     * @return \Cake\Console\CommandInterface|\Cake\Console\Shell|class-string<\Cake\Console\CommandInterface> Either the command class or an instance.
->>>>>>> 4.next
      * @throws \InvalidArgumentException when unknown commands are fetched.
      */
     public function get(string $name): CommandInterface|string
@@ -150,11 +146,7 @@ class CommandCollection implements IteratorAggregate, Countable
      * Implementation of IteratorAggregate.
      *
      * @return \Traversable
-<<<<<<< HEAD
      * @psalm-return \Traversable<string, \Cake\Console\CommandInterface|class-string<\Cake\Console\CommandInterface>>
-=======
-     * @psalm-return \Traversable<string, (\Cake\Console\CommandInterface|\Cake\Console\Shell|class-string<\Cake\Console\CommandInterface>)>
->>>>>>> 4.next
      */
     public function getIterator(): Traversable
     {

+ 0 - 3
src/Console/HelperRegistry.php

@@ -49,9 +49,6 @@ class HelperRegistry extends ObjectRegistry
     /**
      * Resolve a helper classname.
      *
-     * Will prefer helpers defined in Command\Helper over those
-     * defined in Shell\Helper.
-     *
      * Part of the template method for {@link \Cake\Core\ObjectRegistry::load()}.
      *
      * @param string $class Partial classname to resolve.