-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add odm support to AddReturnDocBlockToCollectionPropertyGetterByToMan…
…yAnnotationRector (#330) * add failing fixture * add odm support to AddReturnDocBlockToCollectionPropertyGetterByToManyAnnotationRector
- Loading branch information
1 parent
f43ecb2
commit 8bcc255
Showing
5 changed files
with
75 additions
and
7 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
...rnDocBlockToCollectionPropertyGetterByToManyAnnotationRector/Fixture/Odm/orm_many.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
namespace Rector\Doctrine\Tests\CodeQuality\Rector\Class_\AddReturnDocBlockToCollectionPropertyGetterByToManyAnnotationRector\Fixture\Odm; | ||
|
||
use Doctrine\Common\Collections\Collection; | ||
use Doctrine\ORM\Mapping as ORM; | ||
use Rector\Doctrine\Tests\CodeQuality\Rector\Class_\AddReturnDocBlockToCollectionPropertyGetterByToManyAnnotationRector\Source\Training; | ||
|
||
/** | ||
* @\Doctrine\ODM\MongoDB\Mapping\Annotations\Document | ||
*/ | ||
final class OdmMany | ||
{ | ||
/** | ||
* @\Doctrine\ODM\MongoDB\Mapping\Annotations\ReferenceMany(targetDocument="\Rector\Doctrine\Tests\CodeQuality\Rector\Class_\AddReturnDocBlockToCollectionPropertyGetterByToManyAnnotationRector\Source\Training") | ||
*/ | ||
private $items = []; | ||
|
||
public function getItems() | ||
{ | ||
return $this->items; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Doctrine\Tests\CodeQuality\Rector\Class_\AddReturnDocBlockToCollectionPropertyGetterByToManyAnnotationRector\Fixture\Odm; | ||
|
||
use Doctrine\Common\Collections\Collection; | ||
use Doctrine\ORM\Mapping as ORM; | ||
use Rector\Doctrine\Tests\CodeQuality\Rector\Class_\AddReturnDocBlockToCollectionPropertyGetterByToManyAnnotationRector\Source\Training; | ||
|
||
/** | ||
* @\Doctrine\ODM\MongoDB\Mapping\Annotations\Document | ||
*/ | ||
final class OdmMany | ||
{ | ||
/** | ||
* @\Doctrine\ODM\MongoDB\Mapping\Annotations\ReferenceMany(targetDocument="\Rector\Doctrine\Tests\CodeQuality\Rector\Class_\AddReturnDocBlockToCollectionPropertyGetterByToManyAnnotationRector\Source\Training") | ||
*/ | ||
private $items = []; | ||
|
||
/** | ||
* @return \Doctrine\Common\Collections\Collection<int, \\Rector\Doctrine\Tests\CodeQuality\Rector\Class_\AddReturnDocBlockToCollectionPropertyGetterByToManyAnnotationRector\Source\Training> | ||
*/ | ||
public function getItems() | ||
{ | ||
return $this->items; | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters