@@ -124,11 +124,11 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | public function fileExists($className) |
| 126 | 126 | { |
| 127 | - $defaultFileName = str_replace('\\', $this->nsSeparator, $className) . $this->fileExtension; |
|
| 127 | + $defaultFileName = str_replace('\\', $this->nsSeparator, $className).$this->fileExtension; |
|
| 128 | 128 | foreach ($this->paths as $path) { |
| 129 | - if (! isset($this->prefixes[$path])) { |
|
| 129 | + if (!isset($this->prefixes[$path])) { |
|
| 130 | 130 | // global namespace class |
| 131 | - if (is_file($path . DIRECTORY_SEPARATOR . $defaultFileName)) { |
|
| 131 | + if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) { |
|
| 132 | 132 | return true; |
| 133 | 133 | } |
| 134 | 134 | |
@@ -137,11 +137,11 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | $prefix = $this->prefixes[$path]; |
| 139 | 139 | |
| 140 | - if (strpos($className, $prefix . '\\') !== 0) { |
|
| 140 | + if (strpos($className, $prefix.'\\') !== 0) { |
|
| 141 | 141 | continue; |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | - $filename = $path . '/' . strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator) . $this->fileExtension; |
|
| 144 | + $filename = $path.'/'.strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator).$this->fileExtension; |
|
| 145 | 145 | if (is_file($filename)) { |
| 146 | 146 | return true; |
| 147 | 147 | } |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | |
| 160 | 160 | if ($this->paths) { |
| 161 | 161 | foreach ((array) $this->paths as $path) { |
| 162 | - if (! is_dir($path)) { |
|
| 162 | + if (!is_dir($path)) { |
|
| 163 | 163 | throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); |
| 164 | 164 | } |
| 165 | 165 | |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | '\\' |
| 185 | 185 | ); |
| 186 | 186 | |
| 187 | - $classes[] = $this->prefixes[$path] . str_replace(DIRECTORY_SEPARATOR, '\\', $nsSuffix) . '\\' . str_replace($this->nsSeparator, '\\', $fileName); |
|
| 187 | + $classes[] = $this->prefixes[$path].str_replace(DIRECTORY_SEPARATOR, '\\', $nsSuffix).'\\'.str_replace($this->nsSeparator, '\\', $fileName); |
|
| 188 | 188 | } else { |
| 189 | 189 | $classes[] = str_replace($this->nsSeparator, '\\', $fileName); |
| 190 | 190 | } |
@@ -200,11 +200,11 @@ discard block |
||
| 200 | 200 | */ |
| 201 | 201 | public function findMappingFile($className) |
| 202 | 202 | { |
| 203 | - $defaultFileName = str_replace('\\', $this->nsSeparator, $className) . $this->fileExtension; |
|
| 203 | + $defaultFileName = str_replace('\\', $this->nsSeparator, $className).$this->fileExtension; |
|
| 204 | 204 | foreach ($this->paths as $path) { |
| 205 | - if (! isset($this->prefixes[$path])) { |
|
| 206 | - if (is_file($path . DIRECTORY_SEPARATOR . $defaultFileName)) { |
|
| 207 | - return $path . DIRECTORY_SEPARATOR . $defaultFileName; |
|
| 205 | + if (!isset($this->prefixes[$path])) { |
|
| 206 | + if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) { |
|
| 207 | + return $path.DIRECTORY_SEPARATOR.$defaultFileName; |
|
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | continue; |
@@ -212,16 +212,16 @@ discard block |
||
| 212 | 212 | |
| 213 | 213 | $prefix = $this->prefixes[$path]; |
| 214 | 214 | |
| 215 | - if (strpos($className, $prefix . '\\') !== 0) { |
|
| 215 | + if (strpos($className, $prefix.'\\') !== 0) { |
|
| 216 | 216 | continue; |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - $filename = $path . '/' . strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator) . $this->fileExtension; |
|
| 219 | + $filename = $path.'/'.strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator).$this->fileExtension; |
|
| 220 | 220 | if (is_file($filename)) { |
| 221 | 221 | return $filename; |
| 222 | 222 | } |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | - throw MappingException::mappingFileNotFound($className, substr($className, strrpos($className, '\\') + 1) . $this->fileExtension); |
|
| 225 | + throw MappingException::mappingFileNotFound($className, substr($className, strrpos($className, '\\') + 1).$this->fileExtension); |
|
| 226 | 226 | } |
| 227 | 227 | } |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | */ |
| 102 | 102 | private function assertValidField($field) |
| 103 | 103 | { |
| 104 | - if (! isset($this->entityChangeSet[$field])) { |
|
| 104 | + if (!isset($this->entityChangeSet[$field])) { |
|
| 105 | 105 | throw new \InvalidArgumentException(sprintf( |
| 106 | 106 | 'Field "%s" is not a valid field of the entity "%s" in PreUpdateEventArgs.', |
| 107 | 107 | $field, |
@@ -16,12 +16,12 @@ |
||
| 16 | 16 | error_reporting(E_ALL | E_STRICT); |
| 17 | 17 | |
| 18 | 18 | // register silently failing autoloader |
| 19 | -spl_autoload_register(function ($class) { |
|
| 19 | +spl_autoload_register(function($class) { |
|
| 20 | 20 | if (strpos($class, 'Doctrine\Tests\\') !== 0) { |
| 21 | 21 | return; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | - $path = __DIR__ . '/../../' . strtr($class, '\\', '/') . '.php'; |
|
| 24 | + $path = __DIR__.'/../../'.strtr($class, '\\', '/').'.php'; |
|
| 25 | 25 | if (is_file($path) && is_readable($path)) { |
| 26 | 26 | require_once $path; |
| 27 | 27 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | public function getAllMetadata() |
| 81 | 81 | { |
| 82 | - if (! $this->initialized) { |
|
| 82 | + if (!$this->initialized) { |
|
| 83 | 83 | $this->initialize(); |
| 84 | 84 | } |
| 85 | 85 | |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | |
| 175 | 175 | try { |
| 176 | 176 | if ($this->cacheDriver) { |
| 177 | - $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt); |
|
| 177 | + $cached = $this->cacheDriver->fetch($realClassName.$this->cacheSalt); |
|
| 178 | 178 | if ($cached instanceof ClassMetadata) { |
| 179 | 179 | $this->loadedMetadata[$realClassName] = $cached; |
| 180 | 180 | |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | } else { |
| 183 | 183 | foreach ($this->loadMetadata($realClassName) as $loadedClassName) { |
| 184 | 184 | $this->cacheDriver->save( |
| 185 | - $loadedClassName . $this->cacheSalt, |
|
| 185 | + $loadedClassName.$this->cacheSalt, |
|
| 186 | 186 | $this->loadedMetadata[$loadedClassName], |
| 187 | 187 | null |
| 188 | 188 | ); |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | } catch (MappingException $loadingException) { |
| 195 | 195 | $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName); |
| 196 | 196 | |
| 197 | - if (! $fallbackMetadataResponse) { |
|
| 197 | + if (!$fallbackMetadataResponse) { |
|
| 198 | 198 | throw $loadingException; |
| 199 | 199 | } |
| 200 | 200 | |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | */ |
| 276 | 276 | protected function loadMetadata($name) |
| 277 | 277 | { |
| 278 | - if (! $this->initialized) { |
|
| 278 | + if (!$this->initialized) { |
|
| 279 | 279 | $this->initialize(); |
| 280 | 280 | } |
| 281 | 281 | |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | */ |
| 362 | 362 | public function isTransient($class) |
| 363 | 363 | { |
| 364 | - if (! $this->initialized) { |
|
| 364 | + if (!$this->initialized) { |
|
| 365 | 365 | $this->initialize(); |
| 366 | 366 | } |
| 367 | 367 | |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | */ |
| 407 | 407 | private function getRealClass($class) |
| 408 | 408 | { |
| 409 | - $pos = strrpos($class, '\\' . Proxy::MARKER . '\\'); |
|
| 409 | + $pos = strrpos($class, '\\'.Proxy::MARKER.'\\'); |
|
| 410 | 410 | |
| 411 | 411 | if ($pos === false) { |
| 412 | 412 | return $class; |