public function apply(object $object, ReflectionProperty $reflectionProperty, callable $objectCopier): void
    {
        $reflectionProperty->setAccessible(true);
        /** @var Collection $oldCollection */
        $oldCollection = $reflectionProperty->getValue($object);

        $newCollection = $oldCollection->map(
            function ($item) use ($objectCopier) {
                return $objectCopier($item);
            }
        );

        $reflectionProperty->setValue($object, $newCollection);
    }
public function apply(object $object, ReflectionProperty $reflectionProperty, callable $objectCopier): void
    {
        $reflectionProperty->setAccessible(true);
        /** @var Collection $oldCollection */
        $oldCollection = $reflectionProperty->getValue($object);

        $newCollection = $oldCollection->map(
            function ($item) use ($objectCopier) {
                return $objectCopier($item);
            }
        );

        $reflectionProperty->setValue($object, $newCollection);
    }
public function apply ( object $ object , ReflectionProperty $ reflectionProperty , callable $ objectCopier ) : void { $ reflectionProperty -> setAccessible ( true ) ; /** @var Collection $oldCollection */ $ oldCollection = $ reflectionProperty -> getValue ( $ object ) ; $ newCollection = $ oldCollection -> map ( function ( $ item ) use ( $ objectCopier ) { return $ objectCopier ( $ item ) ; } ) ; $ reflectionProperty -> setValue ( $ object , $ newCollection ) ; }
Copies the object property doctrine collection.

{@inheritdoc}
Copies the object property doctrine collection .