Skip to content

Commit

Permalink
fixup! fixup! fixup! separate Return and Param type tests #1
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jan 20, 2019
1 parent 6de1b81 commit be6fdc2
Show file tree
Hide file tree
Showing 43 changed files with 24 additions and 1,079 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@
namespace Rector\Php\Tests\Rector\FunctionLike\ReturnTypeDeclarationRector\Fixture\ComplextArray;

/**
* @param null|Foo[] $one
* @param null|Foo[]|Bar[] $two
* @param Foo[][] $three
* @param Foo[]|Bar[][]|Baz[][][][] $four
* @param Foo[]|iterable $five
* @return Foo[][]
*/
function someFunction($one, $two, $three, $four, $five)
function someFunction()
{
}

Expand All @@ -35,14 +30,9 @@ function someFunction3()
namespace Rector\Php\Tests\Rector\FunctionLike\ReturnTypeDeclarationRector\Fixture\ComplextArray;

/**
* @param null|Foo[] $one
* @param null|Foo[]|Bar[] $two
* @param Foo[][] $three
* @param Foo[]|Bar[][]|Baz[][][][] $four
* @param Foo[]|iterable $five
* @return Foo[][]
*/
function someFunction(?array $one, ?array $two, array $three, array $four, array $five): array
function someFunction(): array
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ namespace Rector\Php\Tests\Rector\ClassMethod\ReturnTypeDeclarationRector\Fixtur
interface BarInterface
{
/**
* @param array $a
* @param int $b
*
* @return float
*/
public function baz(array $a, $b);
Expand All @@ -21,11 +18,8 @@ namespace Rector\Php\Tests\Rector\ClassMethod\ReturnTypeDeclarationRector\Fixtur
interface BarInterface
{
/**
* @param array $a
* @param int $b
*
* @return float
*/
public function baz(array $a, int $b): float;
public function baz(array $a, $b): float;
}
?>
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ namespace Rector\Php\Tests\Rector\ClassMethod\ReturnTypeDeclarationRector\Fixtur
trait BazTrait
{
/**
* @param int $a
*
* @return \DateTime
*/
protected function inTrait($a)
Expand All @@ -22,11 +20,9 @@ namespace Rector\Php\Tests\Rector\ClassMethod\ReturnTypeDeclarationRector\Fixtur
trait BazTrait
{
/**
* @param int $a
*
* @return \DateTime
*/
protected function inTrait(int $a): \DateTime
protected function inTrait($a): \DateTime
{
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ namespace Rector\Php\Tests\Rector\ClassMethod\ReturnTypeDeclarationRector\Fixtur
class Child extends Foo implements BarInterface
{
use BazTrait;
public function test(float $a)
public function test($a)
{
parent::test($a);
}
/**
* {@inheritdoc}
*/
public function baz(array $a, int $b): float
public function baz(array $a, $b): float
{
}
}
Expand All @@ -83,7 +83,7 @@ class Foo
/**
* @param float $a
*/
public function test(float $a)
public function test($a)
{
$closure = function ($a, $c) {
};
Expand All @@ -97,7 +97,7 @@ trait BazTrait
*
* @return \DateTime
*/
protected function inTrait(int $a): \DateTime
protected function inTrait($a): \DateTime
{
}
}
Expand All @@ -110,6 +110,6 @@ interface BarInterface
*
* @return float
*/
public function baz(array $a, int $b): float;
public function baz(array $a, $b): float;
}
?>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@

namespace Rector\Php\Tests\Rector\ClassMethod\ReturnTypeDeclarationRector\Fixture\Dunglas;

# Typed arrays get simply converted to array
/**
* @param int[] $ints
* @param string[] $strings
* @param Foo[] $someClasses
* @return float[]
*/
function array_no_types($ints, $strings, $someClasses) {
function array_no_types() {
}

?>
Expand All @@ -18,14 +14,10 @@ function array_no_types($ints, $strings, $someClasses) {

namespace Rector\Php\Tests\Rector\ClassMethod\ReturnTypeDeclarationRector\Fixture\Dunglas;

# Typed arrays get simply converted to array
/**
* @param int[] $ints
* @param string[] $strings
* @param Foo[] $someClasses
* @return float[]
*/
function array_no_types(array $ints, array $strings, array $someClasses): array {
function array_no_types(): array {
}

?>

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit be6fdc2

Please sign in to comment.