Browse Source

Fix type hints.

mark_story 8 years ago
parent
commit
a56daa0a5f
2 changed files with 11 additions and 11 deletions
  1. 3 3
      src/Console/Arguments.php
  2. 8 8
      tests/TestCase/Console/ArgumentsTest.php

+ 3 - 3
src/Console/Arguments.php

@@ -23,21 +23,21 @@ class Arguments
     /**
      * Positional arguments.
      *
-     * @var array
+     * @var string[]
      */
     protected $args;
 
     /**
      * Named options
      *
-     * @var array
+     * @var string[]
      */
     protected $options;
 
     /**
      * Constructor
      *
-     * @param array $args Positional arguments
+     * @param string[] $args Positional arguments
      * @param array $options Named arguments
      */
     public function __construct(array $args, array $options)

+ 8 - 8
tests/TestCase/Console/ArgumentsTest.php

@@ -40,13 +40,13 @@ class ArgumentsTest extends TestCase
      *
      * @return void
      */
-    public function testGetArgument()
+    public function testGetArgumentAt()
     {
         $values = ['big', 'brown', 'bear'];
         $args = new Arguments($values, []);
-        $this->assertSame($values[0], $args->getArgument(0));
-        $this->assertSame($values[1], $args->getArgument(1));
-        $this->assertNull($args->getArgument(3));
+        $this->assertSame($values[0], $args->getArgumentAt(0));
+        $this->assertSame($values[1], $args->getArgumentAt(1));
+        $this->assertNull($args->getArgumentAt(3));
     }
 
     /**
@@ -54,12 +54,12 @@ class ArgumentsTest extends TestCase
      *
      * @return void
      */
-    public function testHasArgument()
+    public function testHasArgumentAt()
     {
         $values = ['big', 'brown', 'bear'];
         $args = new Arguments($values, []);
-        $this->assertTrue($args->hasArgument(0));
-        $this->assertTrue($args->hasArgument(1));
-        $this->assertFalse($args->hasArgument(3));
+        $this->assertTrue($args->hasArgumentAt(0));
+        $this->assertTrue($args->hasArgumentAt(1));
+        $this->assertFalse($args->hasArgumentAt(3));
     }
 }