@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | return $this->classNames; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - if ( ! $this->paths) { |
|
| 74 | + if (!$this->paths) { |
|
| 75 | 75 | throw MappingException::pathRequired(); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $includedFiles = []; |
| 80 | 80 | |
| 81 | 81 | foreach ($this->paths as $path) { |
| 82 | - if ( ! is_dir($path)) { |
|
| 82 | + if (!is_dir($path)) { |
|
| 83 | 83 | throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); |
| 84 | 84 | } |
| 85 | 85 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | foreach ($declared as $className) { |
| 105 | 105 | $rc = new \ReflectionClass($className); |
| 106 | 106 | $sourceFile = $rc->getFileName(); |
| 107 | - if (in_array($sourceFile, $includedFiles) && ! $this->isTransient($className)) { |
|
| 107 | + if (in_array($sourceFile, $includedFiles) && !$this->isTransient($className)) { |
|
| 108 | 108 | $classes[] = $className; |
| 109 | 109 | } |
| 110 | 110 | } |
@@ -119,6 +119,6 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | public function isTransient($className) |
| 121 | 121 | { |
| 122 | - return ! method_exists($className, 'loadMetadata'); |
|
| 122 | + return !method_exists($className, 'loadMetadata'); |
|
| 123 | 123 | } |
| 124 | 124 | } |
@@ -95,8 +95,8 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | $result = $this->loadMappingFile($this->locator->findMappingFile($className)); |
| 98 | - if ( ! isset($result[$className])) { |
|
| 99 | - throw MappingException::invalidMappingFile($className, str_replace('\\', '.', $className) . $this->locator->getFileExtension()); |
|
| 98 | + if (!isset($result[$className])) { |
|
| 99 | + throw MappingException::invalidMappingFile($className, str_replace('\\', '.', $className).$this->locator->getFileExtension()); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | $this->classCache[$className] = $result[$className]; |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | return false; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - return ! $this->locator->fileExists($className); |
|
| 120 | + return !$this->locator->fileExists($className); |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | /** |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | $this->initialize(); |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | - if ( ! $this->classCache) { |
|
| 132 | + if (!$this->classCache) { |
|
| 133 | 133 | return (array) $this->locator->getAllClassNames($this->globalBasename); |
| 134 | 134 | } |
| 135 | 135 | |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | $this->classCache = []; |
| 166 | 166 | if (null !== $this->globalBasename) { |
| 167 | 167 | foreach ($this->locator->getPaths() as $path) { |
| 168 | - $file = $path . '/' . $this->globalBasename . $this->locator->getFileExtension(); |
|
| 168 | + $file = $path.'/'.$this->globalBasename.$this->locator->getFileExtension(); |
|
| 169 | 169 | if (is_file($file)) { |
| 170 | 170 | $this->classCache = array_merge( |
| 171 | 171 | $this->classCache, |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | */ |
| 88 | 88 | public function getAllMetadata() |
| 89 | 89 | { |
| 90 | - if ( ! $this->initialized) { |
|
| 90 | + if (!$this->initialized) { |
|
| 91 | 91 | $this->initialize(); |
| 92 | 92 | } |
| 93 | 93 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | |
| 191 | 191 | try { |
| 192 | 192 | if ($this->cacheDriver) { |
| 193 | - $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt); |
|
| 193 | + $cached = $this->cacheDriver->fetch($realClassName.$this->cacheSalt); |
|
| 194 | 194 | if ($cached instanceof ClassMetadata) { |
| 195 | 195 | $this->loadedMetadata[$realClassName] = $cached; |
| 196 | 196 | |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | } else { |
| 199 | 199 | foreach ($this->loadMetadata($realClassName) as $loadedClassName) { |
| 200 | 200 | $this->cacheDriver->save( |
| 201 | - $loadedClassName . $this->cacheSalt, |
|
| 201 | + $loadedClassName.$this->cacheSalt, |
|
| 202 | 202 | $this->loadedMetadata[$loadedClassName], |
| 203 | 203 | null |
| 204 | 204 | ); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | $this->loadMetadata($realClassName); |
| 209 | 209 | } |
| 210 | 210 | } catch (MappingException $loadingException) { |
| 211 | - if ( ! $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName)) { |
|
| 211 | + if (!$fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName)) { |
|
| 212 | 212 | throw $loadingException; |
| 213 | 213 | } |
| 214 | 214 | |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | // Collect parent classes, ignoring transient (not-mapped) classes. |
| 263 | 263 | $parentClasses = []; |
| 264 | 264 | foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) { |
| 265 | - if ( ! $this->getDriver()->isTransient($parentClass)) { |
|
| 265 | + if (!$this->getDriver()->isTransient($parentClass)) { |
|
| 266 | 266 | $parentClasses[] = $parentClass; |
| 267 | 267 | } |
| 268 | 268 | } |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | */ |
| 286 | 286 | protected function loadMetadata($name) |
| 287 | 287 | { |
| 288 | - if ( ! $this->initialized) { |
|
| 288 | + if (!$this->initialized) { |
|
| 289 | 289 | $this->initialize(); |
| 290 | 290 | } |
| 291 | 291 | |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | */ |
| 373 | 373 | public function isTransient($class) |
| 374 | 374 | { |
| 375 | - if ( ! $this->initialized) { |
|
| 375 | + if (!$this->initialized) { |
|
| 376 | 376 | $this->initialize(); |
| 377 | 377 | } |
| 378 | 378 | |