@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $alias = AbstractQueryFactory::getColumnAlias($tableName, $columnName); |
216 | 216 | $astColumn = [ |
217 | 217 | 'expr_type' => 'colref', |
218 | - 'base_expr' => $connection->quoteIdentifier($tableName) . '.' . $connection->quoteIdentifier($columnName), |
|
218 | + 'base_expr' => $connection->quoteIdentifier($tableName).'.'.$connection->quoteIdentifier($columnName), |
|
219 | 219 | 'no_quotes' => [ |
220 | 220 | 'delim' => '.', |
221 | 221 | 'parts' => [ |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | return $this->generateWrappedSqlCount($parsedSql); |
304 | 304 | } |
305 | 305 | |
306 | - $countSubExpr = array_map(function (array $item) { |
|
306 | + $countSubExpr = array_map(function(array $item) { |
|
307 | 307 | unset($item['alias']); |
308 | 308 | return $item; |
309 | 309 | }, $parsedSql['SELECT']); |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | $item['delim'] = ','; |
381 | 381 | $innerColumns[] = $item; |
382 | 382 | } |
383 | - $innerColumns[count($innerColumns)-1]['delim'] = false; |
|
383 | + $innerColumns[count($innerColumns) - 1]['delim'] = false; |
|
384 | 384 | $parsedSql['SELECT'] = $innerColumns; |
385 | 385 | |
386 | 386 | $parsedSql = [ |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $schemaLockFileDumper = new SchemaLockFileDumper($this->tdbmService->getConnection(), new ArrayCache(), Configuration::getDefaultLockFilePath()); |
111 | 111 | $tdbmSchemaAnalyzer = new TDBMSchemaAnalyzer($this->tdbmService->getConnection(), new ArrayCache(), $schemaAnalyzer, $schemaLockFileDumper); |
112 | 112 | $this->tdbmDaoGenerator = new TDBMDaoGenerator($this->getConfiguration(), $tdbmSchemaAnalyzer); |
113 | - $this->rootPath = __DIR__ . '/../'; |
|
113 | + $this->rootPath = __DIR__.'/../'; |
|
114 | 114 | //$this->tdbmDaoGenerator->setComposerFile($this->rootPath.'composer.json'); |
115 | 115 | } |
116 | 116 | |
@@ -132,10 +132,10 @@ discard block |
||
132 | 132 | public function testDaoGeneration(): void |
133 | 133 | { |
134 | 134 | // Remove all previously generated files. |
135 | - $this->recursiveDelete($this->rootPath . 'src/Test/Dao/'); |
|
136 | - mkdir($this->rootPath . 'src/Test/Dao/Generated', 0755, true); |
|
135 | + $this->recursiveDelete($this->rootPath.'src/Test/Dao/'); |
|
136 | + mkdir($this->rootPath.'src/Test/Dao/Generated', 0755, true); |
|
137 | 137 | // Let's generate a dummy file to see it is indeed removed. |
138 | - $dummyFile = $this->rootPath . 'src/Test/Dao/Generated/foobar.php'; |
|
138 | + $dummyFile = $this->rootPath.'src/Test/Dao/Generated/foobar.php'; |
|
139 | 139 | touch($dummyFile); |
140 | 140 | $this->assertFileExists($dummyFile); |
141 | 141 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | |
155 | 155 | // Let's require all files to check they are valid PHP! |
156 | 156 | // Test the daoFactory |
157 | - require_once $this->rootPath . 'src/Test/Dao/Generated/DaoFactory.php'; |
|
157 | + require_once $this->rootPath.'src/Test/Dao/Generated/DaoFactory.php'; |
|
158 | 158 | // Test the others |
159 | 159 | |
160 | 160 | $beanDescriptors = $this->getDummyGeneratorListener()->getBeanDescriptors(); |
@@ -164,10 +164,10 @@ discard block |
||
164 | 164 | $daoBaseName = $beanDescriptor->getBaseDaoClassName(); |
165 | 165 | $beanName = $beanDescriptor->getBeanClassName(); |
166 | 166 | $baseBeanName = $beanDescriptor->getBaseBeanClassName(); |
167 | - require_once $this->rootPath . 'src/Test/Dao/Bean/Generated/' . $baseBeanName . '.php'; |
|
168 | - require_once $this->rootPath . 'src/Test/Dao/Bean/' . $beanName . '.php'; |
|
169 | - require_once $this->rootPath . 'src/Test/Dao/Generated/' . $daoBaseName . '.php'; |
|
170 | - require_once $this->rootPath . 'src/Test/Dao/' . $daoName . '.php'; |
|
167 | + require_once $this->rootPath.'src/Test/Dao/Bean/Generated/'.$baseBeanName.'.php'; |
|
168 | + require_once $this->rootPath.'src/Test/Dao/Bean/'.$beanName.'.php'; |
|
169 | + require_once $this->rootPath.'src/Test/Dao/Generated/'.$daoBaseName.'.php'; |
|
170 | + require_once $this->rootPath.'src/Test/Dao/'.$daoName.'.php'; |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | // Check that pivot tables do not generate DAOs or beans. |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $schemaLockFileDumper = new SchemaLockFileDumper($this->tdbmService->getConnection(), new ArrayCache(), Configuration::getDefaultLockFilePath()); |
184 | 184 | $tdbmSchemaAnalyzer = new TDBMSchemaAnalyzer($this->tdbmService->getConnection(), new ArrayCache(), $schemaAnalyzer, $schemaLockFileDumper); |
185 | 185 | $tdbmDaoGenerator = new TDBMDaoGenerator($configuration, $tdbmSchemaAnalyzer); |
186 | - $this->rootPath = __DIR__ . '/../../../../'; |
|
186 | + $this->rootPath = __DIR__.'/../../../../'; |
|
187 | 187 | //$tdbmDaoGenerator->setComposerFile($this->rootPath.'composer.json'); |
188 | 188 | |
189 | 189 | $this->expectException(NoPathFoundException::class); |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | if (is_file($str)) { |
202 | 202 | return @unlink($str); |
203 | 203 | } elseif (is_dir($str)) { |
204 | - $scan = glob(rtrim($str, '/') . '/*'); |
|
204 | + $scan = glob(rtrim($str, '/').'/*'); |
|
205 | 205 | foreach ($scan as $index => $path) { |
206 | 206 | $this->recursiveDelete($path); |
207 | 207 | } |
@@ -2037,7 +2037,7 @@ discard block |
||
2037 | 2037 | |
2038 | 2038 | $artists = new ArtistDao($this->tdbmService); |
2039 | 2039 | $pinkFloyd = $artists->getById(1); |
2040 | - $animals = $pinkFloyd->getAlbums()[0]; |
|
2040 | + $animals = $pinkFloyd->getAlbums()[0]; |
|
2041 | 2041 | $json = $pinkFloyd->jsonSerialize(); |
2042 | 2042 | // Collection name properly handled ('discography' instead of default 'albums') |
2043 | 2043 | self::assertTrue(isset($json['discography'])); |