-
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 ExplicitRelationCollectionRector
- Loading branch information
1 parent
9b7efa4
commit ab09af5
Showing
2 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
...s/CodeQuality/Rector/Class_/ExplicitRelationCollectionRector/Fixture/odm_document.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,43 @@ | ||
<?php | ||
|
||
namespace Rector\Doctrine\Tests\CodeQuality\Rector\Class_\ExplicitRelationCollectionRector\Fixture; | ||
|
||
use Doctrine\Common\Collections\ArrayCollection; | ||
use Doctrine\ORM\Mapping\ManyToMany; | ||
|
||
/** | ||
* @\Doctrine\ODM\MongoDB\Mapping\Annotations\Document | ||
*/ | ||
class OdmDocument | ||
{ | ||
/** | ||
* @\Doctrine\ODM\MongoDB\Mapping\Annotations\ReferenceMany() | ||
*/ | ||
private $items = []; | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Doctrine\Tests\CodeQuality\Rector\Class_\ExplicitRelationCollectionRector\Fixture; | ||
|
||
use Doctrine\Common\Collections\ArrayCollection; | ||
use Doctrine\ORM\Mapping\ManyToMany; | ||
|
||
/** | ||
* @\Doctrine\ODM\MongoDB\Mapping\Annotations\Document | ||
*/ | ||
class OdmDocument | ||
{ | ||
/** | ||
* @\Doctrine\ODM\MongoDB\Mapping\Annotations\ReferenceMany() | ||
*/ | ||
private \Doctrine\Common\Collections\Collection $items; | ||
public function __construct() | ||
{ | ||
$this->items = new \Doctrine\Common\Collections\ArrayCollection(); | ||
} | ||
} | ||
|
||
?> |
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