Browse Source

Merge branch '1.12'

Dariusz Ruminski 8 years ago
parent
commit
a00c775824

+ 1 - 0
src/Fixer/Phpdoc/PhpdocTypesFixer.php

@@ -34,6 +34,7 @@ final class PhpdocTypesFixer extends AbstractPhpdocTypesFixer
         'float',
         'int',
         'integer',
+        'iterable',
         'mixed',
         'null',
         'object',

+ 24 - 0
tests/Fixer/Phpdoc/PhpdocTypesFixerTest.php

@@ -89,6 +89,30 @@ EOF;
      * @return Void
      */
 
+EOF;
+        $this->doTest($expected, $input);
+    }
+
+    public function testIterableFix()
+    {
+        $expected = <<<'EOF'
+<?php
+    /**
+     * @param iterable $foo
+     *
+     * @return Itter
+     */
+
+EOF;
+
+        $input = <<<'EOF'
+<?php
+    /**
+     * @param Iterable $foo
+     *
+     * @return Itter
+     */
+
 EOF;
         $this->doTest($expected, $input);
     }

+ 21 - 0
tests/Fixtures/Integration/misc/PHP7_1.test

@@ -0,0 +1,21 @@
+--TEST--
+PHP 7.1 test.
+--CONFIG--
+{
+    "@Symfony": true
+}
+--SETTINGS--
+checkPriority=false
+--REQUIREMENTS--
+php=7.1
+--EXPECT--
+<?php
+
+function iterable_foo(iterable $foo)
+{
+}
+
+--INPUT--
+<?php
+
+function iterable_foo(iterable$foo) {}