Passed
Push — types ( 87c6e3...239346 )
by Jonathan
02:34
created
tests/Doctrine/Tests/Persistence/Mapping/PHPDriverTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         $metadata = $this->createMock(ClassMetadata::class);
18 18
         $metadata->expects(self::once())->method('getFieldNames');
19 19
 
20
-        $driver = new PHPDriver([__DIR__ . '/_files']);
20
+        $driver = new PHPDriver([__DIR__.'/_files']);
21 21
         $driver->loadMetadataForClass('TestEntity', $metadata);
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Persistence/Mapping/FileDriverTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $locator->expects(self::once())
41 41
                 ->method('findMappingFile')
42 42
                 ->with(self::equalTo('stdClass'))
43
-                ->will(self::returnValue(__DIR__ . '/_files/stdClass.yml'));
43
+                ->will(self::returnValue(__DIR__.'/_files/stdClass.yml'));
44 44
 
45 45
         $driver = $this->createTestFileDriver($locator);
46 46
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $locator->expects(self::once())
56 56
             ->method('findMappingFile')
57 57
             ->with(self::equalTo('stdClass'))
58
-            ->will(self::returnValue(__DIR__ . '/_files/stdClass.yml'));
58
+            ->will(self::returnValue(__DIR__.'/_files/stdClass.yml'));
59 59
 
60 60
         $driver = $this->createTestFileDriver($locator);
61 61
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
     public function testNonLocatorFallback() : void
140 140
     {
141
-        $driver = $this->createTestFileDriver(__DIR__ . '/_files', '.yml');
141
+        $driver = $this->createTestFileDriver(__DIR__.'/_files', '.yml');
142 142
         self::assertTrue($driver->isTransient('stdClass2'));
143 143
         self::assertFalse($driver->isTransient('stdClass'));
144 144
     }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     {
151 151
         $locator = $this->createMock(FileLocator::class);
152 152
         $locator->expects(self::any())->method('getFileExtension')->will(self::returnValue('.yml'));
153
-        $locator->expects(self::any())->method('getPaths')->will(self::returnValue([__DIR__ . '/_files']));
153
+        $locator->expects(self::any())->method('getPaths')->will(self::returnValue([__DIR__.'/_files']));
154 154
 
155 155
         return $locator;
156 156
     }
Please login to merge, or discard this patch.
lib/Doctrine/Persistence/Mapping/MappingException.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
     public static function pathRequired() : self
31 31
     {
32
-        return new self('Specifying the paths to your entities is required ' .
32
+        return new self('Specifying the paths to your entities is required '.
33 33
             'in the AnnotationDriver to retrieve all class names.');
34 34
     }
35 35
 
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
         ?string $path = null
38 38
     ) : self {
39 39
         if ($path !== null) {
40
-            $path = '[' . $path . ']';
40
+            $path = '['.$path.']';
41 41
         }
42 42
 
43 43
         return new self(sprintf(
44
-            'File mapping drivers must have a valid directory path, ' .
44
+            'File mapping drivers must have a valid directory path, '.
45 45
             'however the given path %s seems to be incorrect!',
46 46
             $path
47 47
         ));
Please login to merge, or discard this patch.
lib/Doctrine/Persistence/Mapping/Driver/StaticPHPDriver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $includedFiles = [];
83 83
 
84 84
         foreach ($this->paths as $path) {
85
-            if (! is_dir($path)) {
85
+            if (!is_dir($path)) {
86 86
                 throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
87 87
             }
88 88
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
             $sourceFile = $rc->getFileName();
111 111
 
112
-            if (! in_array($sourceFile, $includedFiles, true) || $this->isTransient($className)) {
112
+            if (!in_array($sourceFile, $includedFiles, true) || $this->isTransient($className)) {
113 113
                 continue;
114 114
             }
115 115
 
@@ -126,6 +126,6 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function isTransient(string $className) : bool
128 128
     {
129
-        return ! method_exists($className, 'loadMetadata');
129
+        return !method_exists($className, 'loadMetadata');
130 130
     }
131 131
 }
Please login to merge, or discard this patch.
lib/Doctrine/Persistence/Mapping/Driver/SymfonyFileLocator.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -129,12 +129,12 @@  discard block
 block discarded – undo
129 129
      */
130 130
     public function fileExists(string $className) : bool
131 131
     {
132
-        $defaultFileName = str_replace('\\', $this->nsSeparator, $className) . $this->fileExtension;
132
+        $defaultFileName = str_replace('\\', $this->nsSeparator, $className).$this->fileExtension;
133 133
 
134 134
         foreach ($this->paths as $path) {
135
-            if (! isset($this->prefixes[$path])) {
135
+            if (!isset($this->prefixes[$path])) {
136 136
                 // global namespace class
137
-                if (is_file($path . DIRECTORY_SEPARATOR . $defaultFileName)) {
137
+                if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) {
138 138
                     return true;
139 139
                 }
140 140
 
@@ -143,11 +143,11 @@  discard block
 block discarded – undo
143 143
 
144 144
             $prefix = $this->prefixes[$path];
145 145
 
146
-            if (strpos($className, $prefix . '\\') !== 0) {
146
+            if (strpos($className, $prefix.'\\') !== 0) {
147 147
                 continue;
148 148
             }
149 149
 
150
-            $filename = $path . '/' . strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator) . $this->fileExtension;
150
+            $filename = $path.'/'.strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator).$this->fileExtension;
151 151
 
152 152
             if (is_file($filename)) {
153 153
                 return true;
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $classes = [];
170 170
 
171 171
         foreach ($this->paths as $path) {
172
-            if (! is_dir($path)) {
172
+            if (!is_dir($path)) {
173 173
                 throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
174 174
             }
175 175
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
                         '\\'
195 195
                     );
196 196
 
197
-                    $classes[] = $this->prefixes[$path] . str_replace(DIRECTORY_SEPARATOR, '\\', $nsSuffix) . '\\' . str_replace($this->nsSeparator, '\\', $fileName);
197
+                    $classes[] = $this->prefixes[$path].str_replace(DIRECTORY_SEPARATOR, '\\', $nsSuffix).'\\'.str_replace($this->nsSeparator, '\\', $fileName);
198 198
                 } else {
199 199
                     /** @var string $className */
200 200
                     $className = str_replace($this->nsSeparator, '\\', $fileName);
@@ -212,11 +212,11 @@  discard block
 block discarded – undo
212 212
      */
213 213
     public function findMappingFile(string $className) : string
214 214
     {
215
-        $defaultFileName = str_replace('\\', $this->nsSeparator, $className) . $this->fileExtension;
215
+        $defaultFileName = str_replace('\\', $this->nsSeparator, $className).$this->fileExtension;
216 216
         foreach ($this->paths as $path) {
217
-            if (! isset($this->prefixes[$path])) {
218
-                if (is_file($path . DIRECTORY_SEPARATOR . $defaultFileName)) {
219
-                    return $path . DIRECTORY_SEPARATOR . $defaultFileName;
217
+            if (!isset($this->prefixes[$path])) {
218
+                if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) {
219
+                    return $path.DIRECTORY_SEPARATOR.$defaultFileName;
220 220
                 }
221 221
 
222 222
                 continue;
@@ -224,11 +224,11 @@  discard block
 block discarded – undo
224 224
 
225 225
             $prefix = $this->prefixes[$path];
226 226
 
227
-            if (strpos($className, $prefix . '\\') !== 0) {
227
+            if (strpos($className, $prefix.'\\') !== 0) {
228 228
                 continue;
229 229
             }
230 230
 
231
-            $filename = $path . '/' . strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator) . $this->fileExtension;
231
+            $filename = $path.'/'.strtr(substr($className, strlen($prefix) + 1), '\\', $this->nsSeparator).$this->fileExtension;
232 232
             if (is_file($filename)) {
233 233
                 return $filename;
234 234
             }
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 
240 240
         throw MappingException::mappingFileNotFound(
241 241
             $className,
242
-            substr($className, $pos + 1) . $this->fileExtension
242
+            substr($className, $pos + 1).$this->fileExtension
243 243
         );
244 244
     }
245 245
 
Please login to merge, or discard this patch.
lib/Doctrine/Persistence/Mapping/Driver/FileDriver.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -82,10 +82,10 @@  discard block
 block discarded – undo
82 82
 
83 83
         $result = $this->loadMappingFile($this->locator->findMappingFile($className));
84 84
 
85
-        if (! isset($result[$className])) {
85
+        if (!isset($result[$className])) {
86 86
             throw MappingException::invalidMappingFile(
87 87
                 $className,
88
-                str_replace('\\', '.', $className) . $this->locator->getFileExtension()
88
+                str_replace('\\', '.', $className).$this->locator->getFileExtension()
89 89
             );
90 90
         }
91 91
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             return false;
108 108
         }
109 109
 
110
-        return ! $this->locator->fileExists($className);
110
+        return !$this->locator->fileExists($className);
111 111
     }
112 112
 
113 113
     /**
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
         }
166 166
 
167 167
         foreach ($this->locator->getPaths() as $path) {
168
-            $file = $path . '/' . $this->globalBasename . $this->locator->getFileExtension();
169
-            if (! is_file($file)) {
168
+            $file = $path.'/'.$this->globalBasename.$this->locator->getFileExtension();
169
+            if (!is_file($file)) {
170 170
                 continue;
171 171
             }
172 172
 
Please login to merge, or discard this patch.
lib/Doctrine/Persistence/Mapping/Driver/AnnotationDriver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             return;
90 90
         }
91 91
 
92
-        if (! is_array($paths)) {
92
+        if (!is_array($paths)) {
93 93
             $paths = [$paths];
94 94
         }
95 95
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         $includedFiles = [];
200 200
 
201 201
         foreach ($this->paths as $path) {
202
-            if (! is_dir($path)) {
202
+            if (!is_dir($path)) {
203 203
                 throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
204 204
             }
205 205
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
                     new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS),
209 209
                     RecursiveIteratorIterator::LEAVES_ONLY
210 210
                 ),
211
-                '/^.+' . preg_quote($this->fileExtension) . '$/i',
211
+                '/^.+'.preg_quote($this->fileExtension).'$/i',
212 212
                 RecursiveRegexIterator::GET_MATCH
213 213
             );
214 214
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 
245 245
             $sourceFile = $rc->getFileName();
246 246
 
247
-            if (! in_array($sourceFile, $includedFiles, true) || $this->isTransient($className)) {
247
+            if (!in_array($sourceFile, $includedFiles, true) || $this->isTransient($className)) {
248 248
                 continue;
249 249
             }
250 250
 
Please login to merge, or discard this patch.
lib/Doctrine/Persistence/Mapping/Driver/DefaultFileLocator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function findMappingFile(string $className) : string
96 96
     {
97
-        $fileName = str_replace('\\', '.', $className) . $this->fileExtension;
97
+        $fileName = str_replace('\\', '.', $className).$this->fileExtension;
98 98
 
99 99
         // Check whether file exists
100 100
         foreach ($this->paths as $path) {
101
-            if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) {
102
-                return $path . DIRECTORY_SEPARATOR . $fileName;
101
+            if (is_file($path.DIRECTORY_SEPARATOR.$fileName)) {
102
+                return $path.DIRECTORY_SEPARATOR.$fileName;
103 103
             }
104 104
         }
105 105
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $classes = [];
119 119
 
120 120
         foreach ($this->paths as $path) {
121
-            if (! is_dir($path)) {
121
+            if (!is_dir($path)) {
122 122
                 throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
123 123
             }
124 124
 
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
      */
152 152
     public function fileExists(string $className) : bool
153 153
     {
154
-        $fileName = str_replace('\\', '.', $className) . $this->fileExtension;
154
+        $fileName = str_replace('\\', '.', $className).$this->fileExtension;
155 155
 
156 156
         // Check whether file exists
157 157
         foreach ($this->paths as $path) {
158
-            if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) {
158
+            if (is_file($path.DIRECTORY_SEPARATOR.$fileName)) {
159 159
                 return true;
160 160
             }
161 161
         }
Please login to merge, or discard this patch.
lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function getAllMetadata() : array
79 79
     {
80
-        if (! $this->initialized) {
80
+        if (!$this->initialized) {
81 81
             $this->initialize();
82 82
         }
83 83
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
         try {
166 166
             if ($this->cacheDriver !== null) {
167
-                $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt);
167
+                $cached = $this->cacheDriver->fetch($realClassName.$this->cacheSalt);
168 168
 
169 169
                 if ($cached instanceof ClassMetadata) {
170 170
                     $this->loadedMetadata[$realClassName] = $cached;
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                 } else {
174 174
                     foreach ($this->loadMetadata($realClassName) as $loadedClassName) {
175 175
                         $this->cacheDriver->save(
176
-                            $loadedClassName . $this->cacheSalt,
176
+                            $loadedClassName.$this->cacheSalt,
177 177
                             $this->loadedMetadata[$loadedClassName],
178 178
                             0
179 179
                         );
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
      */
261 261
     protected function loadMetadata(string $name) : array
262 262
     {
263
-        if (! $this->initialized) {
263
+        if (!$this->initialized) {
264 264
             $this->initialize();
265 265
         }
266 266
 
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
      */
345 345
     public function isTransient(string $class) : bool
346 346
     {
347
-        if (! $this->initialized) {
347
+        if (!$this->initialized) {
348 348
             $this->initialize();
349 349
         }
350 350
 
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
      */
384 384
     private function getRealClass(string $class) : string
385 385
     {
386
-        $pos = strrpos($class, '\\' . Proxy::MARKER . '\\');
386
+        $pos = strrpos($class, '\\'.Proxy::MARKER.'\\');
387 387
 
388 388
         if ($pos === false) {
389 389
             return $class;
Please login to merge, or discard this patch.