Failed Conditions
Pull Request — master (#1)
by Jonathan
03:48
created
tests/Doctrine/Tests/Common/Persistence/ManagerRegistryTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
     private function getManagerFactory()
82 82
     {
83
-        return function () {
83
+        return function() {
84 84
             $mock     = $this->createMock(ObjectManager::class);
85 85
             $driver   = $this->createMock(MappingDriver::class);
86 86
             $metadata = $this->createMock(ClassMetadata::class);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
     protected function getService($name)
108 108
     {
109
-        if ( ! isset($this->services[$name])) {
109
+        if (!isset($this->services[$name])) {
110 110
             $this->services[$name] = call_user_func($this->managerFactory);
111 111
         }
112 112
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Common/Persistence/ObjectManagerDecoratorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      */
62 62
     public function testAllMethodCallsAreDelegatedToTheWrappedInstance($method, array $parameters, $isVoidMethod)
63 63
     {
64
-        $returnedValue = $isVoidMethod ? null : 'INNER VALUE FROM ' . $method;
64
+        $returnedValue = $isVoidMethod ? null : 'INNER VALUE FROM '.$method;
65 65
         $stub          = $this->wrapped
66 66
             ->expects($this->once())
67 67
             ->method($method)
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Common/Persistence/PersistentObjectTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         $this->cm = new TestObjectMetadata;
25 25
         $this->om = $this->createMock(ObjectManager::class);
26 26
         $this->om->expects($this->any())->method('getClassMetadata')
27
-                 ->will($this->returnValue($this->cm));
27
+                    ->will($this->returnValue($this->cm));
28 28
         $this->object = new TestObject;
29 29
         PersistentObject::setObjectManager($this->om);
30 30
         $this->object->injectObjectManager($this->om, $this->cm);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
     public function getAssociationTargetClass($assocName)
179 179
     {
180
-        return __NAMESPACE__ . '\TestObject';
180
+        return __NAMESPACE__.'\TestObject';
181 181
     }
182 182
 
183 183
     public function getFieldNames()
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
     public function getName()
194 194
     {
195
-        return __NAMESPACE__ . '\TestObject';
195
+        return __NAMESPACE__.'\TestObject';
196 196
     }
197 197
 
198 198
     public function getReflectionClass()
Please login to merge, or discard this patch.
Doctrine/Tests/Common/Persistence/Mapping/ClassMetadataFactoryTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function testGetMetadataForAbsentClass()
48 48
     {
49 49
         $this->expectException(MappingException::class);
50
-        $this->cmf->getMetadataFor(__NAMESPACE__ . '\AbsentClass');
50
+        $this->cmf->getMetadataFor(__NAMESPACE__.'\AbsentClass');
51 51
     }
52 52
 
53 53
     public function testGetParentMetadata()
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     {
64 64
         $metadata = $this->createMock(ClassMetadata::class);
65 65
         $cache    = new ArrayCache();
66
-        $cache->save(ChildEntity::class . '$CLASSMETADATA', $metadata);
66
+        $cache->save(ChildEntity::class.'$CLASSMETADATA', $metadata);
67 67
 
68 68
         $this->cmf->setCacheDriver($cache);
69 69
 
@@ -77,14 +77,14 @@  discard block
 block discarded – undo
77 77
 
78 78
         $loadedMetadata = $this->cmf->getMetadataFor(ChildEntity::class);
79 79
 
80
-        self::assertSame($loadedMetadata, $cache->fetch(ChildEntity::class . '$CLASSMETADATA'));
80
+        self::assertSame($loadedMetadata, $cache->fetch(ChildEntity::class.'$CLASSMETADATA'));
81 81
     }
82 82
 
83 83
     public function testGetAliasedMetadata()
84 84
     {
85 85
         $this->cmf->getMetadataFor('prefix:ChildEntity');
86 86
 
87
-        self::assertTrue($this->cmf->hasMetadataFor(__NAMESPACE__ . '\ChildEntity'));
87
+        self::assertTrue($this->cmf->hasMetadataFor(__NAMESPACE__.'\ChildEntity'));
88 88
         self::assertTrue($this->cmf->hasMetadataFor('prefix:ChildEntity'));
89 89
     }
90 90
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     {
114 114
         $classMetadata = $this->createMock(ClassMetadata::class);
115 115
 
116
-        $this->cmf->fallbackCallback = function () use ($classMetadata) {
116
+        $this->cmf->fallbackCallback = function() use ($classMetadata) {
117 117
             return $classMetadata;
118 118
         };
119 119
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
     public function testWillFailOnFallbackFailureWithNotLoadedMetadata()
126 126
     {
127
-        $this->cmf->fallbackCallback = function () {
127
+        $this->cmf->fallbackCallback = function() {
128 128
             return null;
129 129
         };
130 130
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
     protected function getFqcnFromAlias($namespaceAlias, $simpleClassName)
183 183
     {
184
-        return __NAMESPACE__ . '\\' . $simpleClassName;
184
+        return __NAMESPACE__.'\\'.$simpleClassName;
185 185
     }
186 186
 
187 187
     protected function initialize()
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
     protected function onNotFoundMetadata($className)
214 214
     {
215
-        if ( ! $fallback = $this->fallbackCallback) {
215
+        if (!$fallback = $this->fallbackCallback) {
216 216
             return null;
217 217
         }
218 218
 
Please login to merge, or discard this patch.
Doctrine/Tests/Common/Persistence/Mapping/StaticReflectionServiceTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public function testGetParentClasses()
33 33
     {
34 34
         $classes = $this->reflectionService->getParentClasses(__CLASS__);
35
-        self::assertTrue(count($classes) == 0, "The test class " . __CLASS__ . " should have no parents according to static reflection.");
35
+        self::assertTrue(count($classes) == 0, "The test class ".__CLASS__." should have no parents according to static reflection.");
36 36
     }
37 37
 
38 38
     public function testGetReflectionClass()
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Common/Persistence/Mapping/FileDriverTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         $locator->expects($this->once())
36 36
                 ->method('findMappingFile')
37 37
                 ->with($this->equalTo('stdClass'))
38
-                ->will($this->returnValue(__DIR__ . '/_files/stdClass.yml'));
38
+                ->will($this->returnValue(__DIR__.'/_files/stdClass.yml'));
39 39
 
40 40
         $driver = new TestFileDriver($locator);
41 41
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $locator->expects($this->once())
51 51
             ->method('findMappingFile')
52 52
             ->with($this->equalTo('stdClass'))
53
-            ->will($this->returnValue(__DIR__ . '/_files/stdClass.yml'));
53
+            ->will($this->returnValue(__DIR__.'/_files/stdClass.yml'));
54 54
 
55 55
         $driver = new TestFileDriver($locator);
56 56
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
     public function testNonLocatorFallback()
133 133
     {
134
-        $driver = new TestFileDriver(__DIR__ . '/_files', '.yml');
134
+        $driver = new TestFileDriver(__DIR__.'/_files', '.yml');
135 135
         self::assertTrue($driver->isTransient('stdClass2'));
136 136
         self::assertFalse($driver->isTransient('stdClass'));
137 137
     }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     {
141 141
         $locator = $this->createMock(FileLocator::class);
142 142
         $locator->expects($this->any())->method('getFileExtension')->will($this->returnValue('.yml'));
143
-        $locator->expects($this->any())->method('getPaths')->will($this->returnValue([__DIR__ . "/_files"]));
143
+        $locator->expects($this->any())->method('getPaths')->will($this->returnValue([__DIR__."/_files"]));
144 144
         return $locator;
145 145
     }
146 146
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Common/Persistence/Mapping/SymfonyFileLocatorTest.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 {
11 11
     public function testGetPaths()
12 12
     {
13
-        $path   = __DIR__ . "/_files";
13
+        $path   = __DIR__."/_files";
14 14
         $prefix = "Foo";
15 15
 
16 16
         $locator = new SymfonyFileLocator([$path => $prefix]);
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
     public function testGetPrefixes()
24 24
     {
25
-        $path   = __DIR__ . "/_files";
25
+        $path   = __DIR__."/_files";
26 26
         $prefix = "Foo";
27 27
 
28 28
         $locator = new SymfonyFileLocator([$path => $prefix]);
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
     public function testFileExists()
41 41
     {
42
-        $path   = __DIR__ . "/_files";
42
+        $path   = __DIR__."/_files";
43 43
         $prefix = "Foo";
44 44
 
45 45
         $locator = new SymfonyFileLocator([$path => $prefix], ".yml");
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
     public function testGetAllClassNames()
54 54
     {
55
-        $path   = __DIR__ . "/_files";
55
+        $path   = __DIR__."/_files";
56 56
         $prefix = "Foo";
57 57
 
58 58
         $locator       = new SymfonyFileLocator([$path => $prefix], ".yml");
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function testInvalidCustomNamespaceSeparator()
79 79
     {
80
-        $path   = __DIR__ . "/_files";
80
+        $path   = __DIR__."/_files";
81 81
         $prefix = "Foo";
82 82
 
83 83
         new SymfonyFileLocator([$path => $prefix], ".yml", null);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function testGetClassNamesWithCustomNsSeparator($separator, $dir)
103 103
     {
104
-        $path   = __DIR__ . $dir;
104
+        $path   = __DIR__.$dir;
105 105
         $prefix = "Foo";
106 106
 
107 107
         $locator = new SymfonyFileLocator([$path => $prefix], ".yml", $separator);
@@ -144,30 +144,30 @@  discard block
 block discarded – undo
144 144
      */
145 145
     public function testFindMappingFileWithCustomNsSeparator($separator, $dir, $files)
146 146
     {
147
-        $path   = __DIR__ . $dir;
147
+        $path   = __DIR__.$dir;
148 148
         $prefix = "Foo";
149 149
 
150 150
         $locator = new SymfonyFileLocator([$path => $prefix], ".yml", $separator);
151 151
 
152 152
         foreach ($files as $filePath => $className) {
153
-            self::assertEquals(realpath($path . '/' . $filePath), realpath($locator->findMappingFile($className)));
153
+            self::assertEquals(realpath($path.'/'.$filePath), realpath($locator->findMappingFile($className)));
154 154
         }
155 155
     }
156 156
 
157 157
 
158 158
     public function testFindMappingFile()
159 159
     {
160
-        $path   = __DIR__ . "/_files";
160
+        $path   = __DIR__."/_files";
161 161
         $prefix = "Foo";
162 162
 
163 163
         $locator = new SymfonyFileLocator([$path => $prefix], ".yml");
164 164
 
165
-        self::assertEquals(__DIR__ . "/_files/stdClass.yml", $locator->findMappingFile("Foo\\stdClass"));
165
+        self::assertEquals(__DIR__."/_files/stdClass.yml", $locator->findMappingFile("Foo\\stdClass"));
166 166
     }
167 167
 
168 168
     public function testFindMappingFileNotFound()
169 169
     {
170
-        $path   = __DIR__ . "/_files";
170
+        $path   = __DIR__."/_files";
171 171
         $prefix = "Foo";
172 172
 
173 173
         $locator = new SymfonyFileLocator([$path => $prefix], ".yml");
@@ -181,13 +181,13 @@  discard block
 block discarded – undo
181 181
     {
182 182
         // Low -> High
183 183
         $prefixes                             = array();
184
-        $prefixes[__DIR__ . "/_match_ns"]     = "Foo";
185
-        $prefixes[__DIR__ . "/_match_ns/Bar"] = "Foo\\Bar";
184
+        $prefixes[__DIR__."/_match_ns"]     = "Foo";
185
+        $prefixes[__DIR__."/_match_ns/Bar"] = "Foo\\Bar";
186 186
 
187 187
         $locator = new SymfonyFileLocator($prefixes, ".yml");
188 188
 
189 189
         self::assertEquals(
190
-            __DIR__ . "/_match_ns/Bar/barEntity.yml",
190
+            __DIR__."/_match_ns/Bar/barEntity.yml",
191 191
             $locator->findMappingFile("Foo\\Bar\\barEntity")
192 192
         );
193 193
     }
@@ -195,13 +195,13 @@  discard block
 block discarded – undo
195 195
     public function testFindMappingFileMostSpecificNamespaceFirst()
196 196
     {
197 197
         $prefixes                             = array();
198
-        $prefixes[__DIR__ . "/_match_ns/Bar"] = "Foo\\Bar";
199
-        $prefixes[__DIR__ . "/_match_ns"]     = "Foo";
198
+        $prefixes[__DIR__."/_match_ns/Bar"] = "Foo\\Bar";
199
+        $prefixes[__DIR__."/_match_ns"]     = "Foo";
200 200
 
201 201
         $locator = new SymfonyFileLocator($prefixes, ".yml");
202 202
 
203 203
         self::assertEquals(
204
-            __DIR__ . "/_match_ns/Bar/barEntity.yml",
204
+            __DIR__."/_match_ns/Bar/barEntity.yml",
205 205
             $locator->findMappingFile("Foo\\Bar\\barEntity")
206 206
         );
207 207
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Common/Persistence/Mapping/AnnotationDriverTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     public function testGetAllClassNames()
14 14
     {
15 15
         $reader = new AnnotationReader();
16
-        $driver = new SimpleAnnotationDriver($reader, [__DIR__ . '/_files/annotation']);
16
+        $driver = new SimpleAnnotationDriver($reader, [__DIR__.'/_files/annotation']);
17 17
 
18 18
         $classes = $driver->getAllClassNames();
19 19
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Common/Persistence/Mapping/DefaultFileLocatorTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 {
11 11
     public function testGetPaths()
12 12
     {
13
-        $path = __DIR__ . "/_files";
13
+        $path = __DIR__."/_files";
14 14
 
15 15
         $locator = new DefaultFileLocator([$path]);
16 16
         self::assertEquals([$path], $locator->getPaths());
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
     public function testUniquePaths()
31 31
     {
32
-        $path = __DIR__ . "/_files";
32
+        $path = __DIR__."/_files";
33 33
 
34 34
         $locator = new DefaultFileLocator([$path, $path]);
35 35
         self::assertEquals([$path], $locator->getPaths());
@@ -37,16 +37,16 @@  discard block
 block discarded – undo
37 37
 
38 38
     public function testFindMappingFile()
39 39
     {
40
-        $path = __DIR__ . "/_files";
40
+        $path = __DIR__."/_files";
41 41
 
42 42
         $locator = new DefaultFileLocator([$path], ".yml");
43 43
 
44
-        self::assertEquals(__DIR__ . '/_files' . DIRECTORY_SEPARATOR . 'stdClass.yml', $locator->findMappingFile('stdClass'));
44
+        self::assertEquals(__DIR__.'/_files'.DIRECTORY_SEPARATOR.'stdClass.yml', $locator->findMappingFile('stdClass'));
45 45
     }
46 46
 
47 47
     public function testFindMappingFileNotFound()
48 48
     {
49
-        $path = __DIR__ . "/_files";
49
+        $path = __DIR__."/_files";
50 50
 
51 51
         $locator = new DefaultFileLocator([$path], ".yml");
52 52
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     public function testGetAllClassNames()
59 59
     {
60
-        $path = __DIR__ . "/_files";
60
+        $path = __DIR__."/_files";
61 61
 
62 62
         $locator       = new DefaultFileLocator([$path], ".yml");
63 63
         $allClasses    = $locator->getAllClassNames(null);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
     public function testGetAllClassNamesNonMatchingFileExtension()
79 79
     {
80
-        $path = __DIR__ . "/_files";
80
+        $path = __DIR__."/_files";
81 81
 
82 82
         $locator = new DefaultFileLocator([$path], ".xml");
83 83
         self::assertEquals([], $locator->getAllClassNames("global"));
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
     public function testFileExists()
87 87
     {
88
-        $path = __DIR__ . "/_files";
88
+        $path = __DIR__."/_files";
89 89
 
90 90
         $locator = new DefaultFileLocator([$path], ".yml");
91 91
 
Please login to merge, or discard this patch.