@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use Bankiru\Api\Doctrine\Proxy\ApiCollection; |
| 8 | 8 | use Bankiru\Api\Doctrine\Proxy\ProxyFactory; |
| 9 | 9 | use Bankiru\Api\Doctrine\Utility\IdentifierFixer; |
| 10 | -use Doctrine\Common\Collections\AbstractLazyCollection; |
|
| 11 | 10 | use Doctrine\Common\Persistence\ObjectRepository; |
| 12 | 11 | use Doctrine\Common\Proxy\Proxy; |
| 13 | 12 | |
@@ -3,8 +3,6 @@ |
||
| 3 | 3 | namespace Bankiru\Api\Doctrine; |
| 4 | 4 | |
| 5 | 5 | use Bankiru\Api\Doctrine\Mapping\ApiMetadata; |
| 6 | -use Bankiru\Api\Doctrine\Proxy\ApiCollection; |
|
| 7 | -use Doctrine\Common\Collections\Collection; |
|
| 8 | 6 | use Doctrine\Common\Persistence\ObjectRepository; |
| 9 | 7 | use ScayTrase\Api\Rpc\RpcClientInterface; |
| 10 | 8 | |
@@ -3,8 +3,6 @@ |
||
| 3 | 3 | namespace Bankiru\Api\Doctrine\Rpc; |
| 4 | 4 | |
| 5 | 5 | use Bankiru\Api\Doctrine\EntityDataCacheInterface; |
| 6 | -use Bankiru\Api\Doctrine\Mapping\ApiMetadata; |
|
| 7 | -use ScayTrase\Api\Rpc\RpcClientInterface; |
|
| 8 | 6 | |
| 9 | 7 | final class CachedFinder implements Finder |
| 10 | 8 | { |
@@ -24,5 +24,5 @@ |
||
| 24 | 24 | * |
| 25 | 25 | * @return string |
| 26 | 26 | */ |
| 27 | - public function getEntityKey(ApiMetadata $metadata,array $identifier); |
|
| 27 | + public function getEntityKey(ApiMetadata $metadata, array $identifier); |
|
| 28 | 28 | } |
@@ -155,9 +155,9 @@ |
||
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | if ($property->isProtected()) { |
| 158 | - return "\0*\0".$propertyName; |
|
| 158 | + return "\0*\0" . $propertyName; |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - return "\0".$property->getDeclaringClass()->getName()."\0".$propertyName; |
|
| 161 | + return "\0" . $property->getDeclaringClass()->getName() . "\0" . $propertyName; |
|
| 162 | 162 | } |
| 163 | 163 | } |
@@ -87,8 +87,7 @@ |
||
| 87 | 87 | if (array_key_exists('entityPath', $element['client'])) { |
| 88 | 88 | $pathSeparator = |
| 89 | 89 | array_key_exists('entityPathSeparator', $element['client']) ? |
| 90 | - $element['client']['entityPathSeparator'] : |
|
| 91 | - null; |
|
| 90 | + $element['client']['entityPathSeparator'] : null; |
|
| 92 | 91 | $methodProvider = new EntityMethodProvider($element['client']['entityPath'], $pathSeparator); |
| 93 | 92 | } |
| 94 | 93 | |
@@ -491,7 +491,7 @@ |
||
| 491 | 491 | } |
| 492 | 492 | |
| 493 | 493 | // Fetch mode. Default fetch mode to LAZY, if not set. |
| 494 | - if ( ! isset($mapping['fetch'])) { |
|
| 494 | + if (!isset($mapping['fetch'])) { |
|
| 495 | 495 | $mapping['fetch'] = self::FETCH_LAZY; |
| 496 | 496 | } |
| 497 | 497 | |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | return array_udiff_assoc( |
| 205 | 205 | $this->snapshot, |
| 206 | 206 | $this->collection->toArray(), |
| 207 | - function ($a, $b) { |
|
| 207 | + function($a, $b) { |
|
| 208 | 208 | return $a === $b ? 0 : 1; |
| 209 | 209 | } |
| 210 | 210 | ); |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | return array_udiff_assoc( |
| 222 | 222 | $this->collection->toArray(), |
| 223 | 223 | $this->snapshot, |
| 224 | - function ($a, $b) { |
|
| 224 | + function($a, $b) { |
|
| 225 | 225 | return $a === $b ? 0 : 1; |
| 226 | 226 | } |
| 227 | 227 | ); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | { |
| 90 | 90 | $wakeupProxy = $classMetadata->getReflectionClass()->hasMethod('__wakeup'); |
| 91 | 91 | |
| 92 | - return function (Proxy $proxy) use ($classMetadata, $wakeupProxy, $persister) { |
|
| 92 | + return function(Proxy $proxy) use ($classMetadata, $wakeupProxy, $persister) { |
|
| 93 | 93 | $initializer = $proxy->__getInitializer(); |
| 94 | 94 | $cloner = $proxy->__getCloner(); |
| 95 | 95 | |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | */ |
| 131 | 131 | private function createCloner(ApiMetadata $classMetadata, ApiPersister $persister) |
| 132 | 132 | { |
| 133 | - return function (Proxy $proxy) use ($classMetadata, $persister) { |
|
| 133 | + return function(Proxy $proxy) use ($classMetadata, $persister) { |
|
| 134 | 134 | if ($proxy->__isInitialized()) { |
| 135 | 135 | return; |
| 136 | 136 | } |