Browse Source

Use a class constant instead of a string.

Mark Story 8 years ago
parent
commit
9fcef63e67
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/Console/CommandCollection.php

+ 2 - 1
src/Console/CommandCollection.php

@@ -15,6 +15,7 @@
 namespace Cake\Console;
 
 use ArrayIterator;
+use Cake\Console\Shell;
 use Countable;
 use InvalidArgumentException;
 use IteratorAggregate;
@@ -58,7 +59,7 @@ class CommandCollection implements IteratorAggregate, Countable
     {
         // Once we have a new Command class this should check
         // against that interface.
-        if (!is_subclass_of($command, 'Cake\Console\Shell')) {
+        if (!is_subclass_of($command, Shell::class)) {
             throw new InvalidArgumentException(
                 "'$name' is not a subclass of Cake\Console\Shell or a valid command."
             );