Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,3 @@ class Entity
*/
private $slug;
}

?>
-----
<?php

namespace Rector\CodingStyle\Tests\Rector\Use_\RemoveUnusedAliasRector\Fixture;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
use Vich\UploaderBundle\Mapping\Annotation as Vich;

/**
* @ORM\Table()
* @ORM\Entity()
* @UniqueEntity("slug")
* @Vich\Uploadable
*/
class Entity
{
/**
* @var string
*
* @ORM\Column(name="slug", type="string", length=50, unique=true)
* @Assert\NotBlank()
* @Assert\Length(max="50")
*/
private $slug;
}

?>
Comment thread
gnutix marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

declare(strict_types=1);

namespace Rector\Symfony\Tests\Rector\New_\StringToArrayArgumentProcessRector\Fixture;

final class TraversableClass implements \IteratorAggregate
{
public function someMethod($arg1, $arg2)
{
}

public function getIterator()
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Rector\Symfony\Tests\Rector\New_\StringToArrayArgumentProcessRector\Fixture;

class TestClass
{
public function foo(): void
{
(new TraversableClass())->someMethod('some string that should remain a string', ['test_key' => 'test value']);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public function provideDataForTest(): Iterator
yield [__DIR__ . '/Fixture/fixture4.php.inc'];
yield [__DIR__ . '/Fixture/with_sprintf.php.inc'];
yield [__DIR__ . '/Fixture/skip_anonymous_class.php.inc'];
yield [__DIR__ . '/Fixture/skip_class_extending_traversable.php.inc'];
}

protected function getRectorClass(): string
Expand Down