Skip to content

Commit 2c8df9f

Browse files
committed
Renamed "CollectionFilter" to "DoctrineCollectionFilter"
1 parent a937b0e commit 2c8df9f

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ Install with Composer:
1111

1212
```json
1313
{
14-
"require": {
15-
"myclabs/deep-copy": "*"
16-
}
14+
"require": {
15+
"myclabs/deep-copy": "*"
16+
}
1717
}
1818
```
1919

@@ -131,13 +131,13 @@ $myCopy = $deepCopy->copy($myObject);
131131
// $myCopy->category has not been touched
132132
```
133133

134-
#### Doctrine `CollectionFilter`
134+
#### `DoctrineCollectionFilter`
135135

136-
If you use Doctrine and want to copy an entity, you will need to use the `CollectionFilter`:
136+
If you use Doctrine and want to copy an entity, you will need to use the `DoctrineCollectionFilter`:
137137

138138
```php
139139
$deepCopy = new DeepCopy();
140-
$deepCopy->addFilter(new CollectionFilter(), new PropertyTypeMatcher('Doctrine\Common\Collections\Collection'));
140+
$deepCopy->addFilter(new DoctrineCollectionFilter(), new PropertyTypeMatcher('Doctrine\Common\Collections\Collection'));
141141
$myCopy = $deepCopy->copy($myObject);
142142
```
143143

src/DeepCopy/Filter/Doctrine/CollectionFilter.php renamed to src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* Set a null value for a property
1010
*/
11-
class CollectionFilter implements Filter
11+
class DoctrineCollectionFilter implements Filter
1212
{
1313
/**
1414
* {@inheritdoc}

tests/DeepCopyTest/Filter/Doctrine/CollectionFilterTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace DeepCopyTest\Filter\Doctrine;
44

55
use DeepCopy\DeepCopy;
6-
use DeepCopy\Filter\Doctrine\CollectionFilter;
6+
use DeepCopy\Filter\Doctrine\DoctrineCollectionFilter;
77
use DeepCopy\Matcher\PropertyMatcher;
88
use Doctrine\Common\Collections\ArrayCollection;
99
use Doctrine\Common\Collections\Collection;
@@ -20,7 +20,7 @@ public function testApply()
2020
$oldCollection->add(new \stdClass());
2121
$object->foo = $oldCollection;
2222

23-
$filter = new CollectionFilter();
23+
$filter = new DoctrineCollectionFilter();
2424
$filter->apply($object, 'foo', function($item) {
2525
return null;
2626
});
@@ -39,7 +39,7 @@ public function testIntegration()
3939
$o->property1 = $oldCollection;
4040

4141
$deepCopy = new DeepCopy();
42-
$deepCopy->addFilter(new CollectionFilter(), new PropertyMatcher(get_class($o), 'property1'));
42+
$deepCopy->addFilter(new DoctrineCollectionFilter(), new PropertyMatcher(get_class($o), 'property1'));
4343
/** @var CollectionFilterTestFixture $new */
4444
$new = $deepCopy->copy($o);
4545

0 commit comments

Comments
 (0)