Browse Source

Fix failing phpcs.

Mark Story 2 years ago
parent
commit
ee76b355e3

+ 1 - 2
src/Console/ConsoleOutput.php

@@ -17,7 +17,6 @@ declare(strict_types=1);
 namespace Cake\Console;
 
 use Cake\Console\Exception\ConsoleException;
-use Cake\Core\Exception\CakeException;
 use InvalidArgumentException;
 use function Cake\Core\env;
 
@@ -163,7 +162,7 @@ class ConsoleOutput
      * Checks for a pretty console environment. Ansicon and ConEmu allows
      *  pretty consoles on Windows, and is supported.
      *
-     * @param string|resource $stream The identifier of the stream to write output to.
+     * @param resource|string $stream The identifier of the stream to write output to.
      * @throws \Cake\Console\Exception\ConsoleException If the given stream is not a valid resource.
      */
     public function __construct($stream = 'php://stdout')

+ 5 - 4
tests/TestCase/Console/ConsoleOutputTest.php

@@ -19,6 +19,7 @@ declare(strict_types=1);
 namespace Cake\Test\TestCase\Console;
 
 use Cake\Console\ConsoleOutput;
+use Cake\Console\Exception\ConsoleException;
 use Cake\Console\TestSuite\StubConsoleOutput;
 use Cake\TestSuite\TestCase;
 
@@ -249,16 +250,16 @@ class ConsoleOutputTest extends TestCase
 
     public function testWithInvalidStreamNum(): void
     {
-        $this->expectException(\Cake\Console\Exception\ConsoleException::class);
+        $this->expectException(ConsoleException::class);
         $this->expectExceptionMessage('Invalid stream in constructor. It is not a valid resource.');
-        $output = new StubConsoleOutput(1);
+        new StubConsoleOutput(1);
     }
 
     public function testWithInvalidStreamArray(): void
     {
-        $this->expectException(\Cake\Console\Exception\ConsoleException::class);
+        $this->expectException(ConsoleException::class);
         $this->expectExceptionMessage('Invalid stream in constructor. It is not a valid resource.');
-        $output = new StubConsoleOutput([]);
+        new StubConsoleOutput([]);
     }
 
     public function testWorkingWithStub(): void

+ 0 - 1
tests/TestCase/ORM/EntityTest.php

@@ -23,7 +23,6 @@ use Exception;
 use InvalidArgumentException;
 use stdClass;
 use TestApp\Model\Entity\Extending;
-use TestApp\Model\Entity\ForwardsCompatHas;
 use TestApp\Model\Entity\NonExtending;
 use TestApp\Model\Entity\VirtualUser;
 

+ 0 - 14
tests/test_app/TestApp/Model/Entity/ForwardsCompatHas.php

@@ -1,14 +0,0 @@
-<?php
-declare(strict_types=1);
-
-namespace TestApp\Model\Entity;
-
-use Cake\ORM\Entity;
-
-/**
- * Tests entity class used for asserting correct loading
- */
-class ForwardsCompatHas extends Entity
-{
-    protected $_hasAllowsNull = true;
-}