@@ -148,13 +148,13 @@ discard block |
||
| 148 | 148 | ) ? $connection->getConfiguration()->getSchemaAssetsFilter() : null; |
| 149 | 149 | |
| 150 | 150 | //Disable foreign key checks |
| 151 | - if($platform instanceof AbstractMySQLPlatform) { |
|
| 151 | + if ($platform instanceof AbstractMySQLPlatform) { |
|
| 152 | 152 | $connection->executeQuery('SET foreign_key_checks = 0;'); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | foreach ($orderedTables as $tbl) { |
| 156 | 156 | // If we have a filter expression, check it and skip if necessary |
| 157 | - if (! $emptyFilterExpression && ! preg_match($filterExpr, $tbl)) { |
|
| 157 | + if (!$emptyFilterExpression && !preg_match($filterExpr, $tbl)) { |
|
| 158 | 158 | continue; |
| 159 | 159 | } |
| 160 | 160 | |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | // Support schema asset filters as presented in |
| 167 | - if (is_callable($schemaAssetsFilter) && ! $schemaAssetsFilter($tbl)) { |
|
| 167 | + if (is_callable($schemaAssetsFilter) && !$schemaAssetsFilter($tbl)) { |
|
| 168 | 168 | continue; |
| 169 | 169 | } |
| 170 | 170 | |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | //Reenable foreign key checks |
| 185 | - if($platform instanceof AbstractMySQLPlatform) { |
|
| 185 | + if ($platform instanceof AbstractMySQLPlatform) { |
|
| 186 | 186 | $connection->executeQuery('SET foreign_key_checks = 1;'); |
| 187 | 187 | } |
| 188 | 188 | } |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | { |
| 192 | 192 | $tableIdentifier = new Identifier($tableName); |
| 193 | 193 | |
| 194 | - return 'ALTER TABLE '. $tableIdentifier->getQuotedName($platform) .' AUTO_INCREMENT = 1;'; |
|
| 194 | + return 'ALTER TABLE '.$tableIdentifier->getQuotedName($platform).' AUTO_INCREMENT = 1;'; |
|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | /** |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | $sorter = new TopologicalSorter(); |
| 205 | 205 | |
| 206 | 206 | foreach ($classes as $class) { |
| 207 | - if (! $sorter->hasNode($class->name)) { |
|
| 207 | + if (!$sorter->hasNode($class->name)) { |
|
| 208 | 208 | $sorter->addNode($class->name, $class); |
| 209 | 209 | } |
| 210 | 210 | |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | $parentClass = $em->getClassMetadata($parentClass); |
| 214 | 214 | $parentClassName = $parentClass->getName(); |
| 215 | 215 | |
| 216 | - if (! $sorter->hasNode($parentClassName)) { |
|
| 216 | + if (!$sorter->hasNode($parentClassName)) { |
|
| 217 | 217 | $sorter->addNode($parentClassName, $parentClass); |
| 218 | 218 | } |
| 219 | 219 | |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | foreach ($class->associationMappings as $assoc) { |
| 224 | - if (! $assoc['isOwningSide']) { |
|
| 224 | + if (!$assoc['isOwningSide']) { |
|
| 225 | 225 | continue; |
| 226 | 226 | } |
| 227 | 227 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | assert($targetClass instanceof ClassMetadata); |
| 230 | 230 | $targetClassName = $targetClass->getName(); |
| 231 | 231 | |
| 232 | - if (! $sorter->hasNode($targetClassName)) { |
|
| 232 | + if (!$sorter->hasNode($targetClassName)) { |
|
| 233 | 233 | $sorter->addNode($targetClassName, $targetClass); |
| 234 | 234 | } |
| 235 | 235 | |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $parentClass = $em->getClassMetadata($parentClass); |
| 242 | 242 | $parentClassName = $parentClass->getName(); |
| 243 | 243 | |
| 244 | - if (! $sorter->hasNode($parentClassName)) { |
|
| 244 | + if (!$sorter->hasNode($parentClassName)) { |
|
| 245 | 245 | $sorter->addNode($parentClassName, $parentClass); |
| 246 | 246 | } |
| 247 | 247 | |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | |
| 265 | 265 | foreach ($classes as $class) { |
| 266 | 266 | foreach ($class->associationMappings as $assoc) { |
| 267 | - if (! $assoc['isOwningSide'] || $assoc['type'] !== ClassMetadata::MANY_TO_MANY) { |
|
| 267 | + if (!$assoc['isOwningSide'] || $assoc['type'] !== ClassMetadata::MANY_TO_MANY) { |
|
| 268 | 268 | continue; |
| 269 | 269 | } |
| 270 | 270 | |
@@ -277,8 +277,8 @@ discard block |
||
| 277 | 277 | |
| 278 | 278 | private function getTableName(ClassMetadata $class, AbstractPlatform $platform): string |
| 279 | 279 | { |
| 280 | - if (isset($class->table['schema']) && ! method_exists($class, 'getSchemaName')) { |
|
| 281 | - return $class->table['schema'] . '.' . |
|
| 280 | + if (isset($class->table['schema']) && !method_exists($class, 'getSchemaName')) { |
|
| 281 | + return $class->table['schema'].'.'. |
|
| 282 | 282 | $this->em->getConfiguration() |
| 283 | 283 | ->getQuoteStrategy() |
| 284 | 284 | ->getTableName($class, $platform); |
@@ -295,8 +295,8 @@ discard block |
||
| 295 | 295 | ClassMetadata $class, |
| 296 | 296 | AbstractPlatform $platform |
| 297 | 297 | ): string { |
| 298 | - if (isset($assoc['joinTable']['schema']) && ! method_exists($class, 'getSchemaName')) { |
|
| 299 | - return $assoc['joinTable']['schema'] . '.' . |
|
| 298 | + if (isset($assoc['joinTable']['schema']) && !method_exists($class, 'getSchemaName')) { |
|
| 299 | + return $assoc['joinTable']['schema'].'.'. |
|
| 300 | 300 | $this->em->getConfiguration() |
| 301 | 301 | ->getQuoteStrategy() |
| 302 | 302 | ->getJoinTableName($assoc, $class, $platform); |
@@ -309,6 +309,6 @@ discard block |
||
| 309 | 309 | { |
| 310 | 310 | $tableIdentifier = new Identifier($tableName); |
| 311 | 311 | |
| 312 | - return 'DELETE FROM ' . $tableIdentifier->getQuotedName($platform); |
|
| 312 | + return 'DELETE FROM '.$tableIdentifier->getQuotedName($platform); |
|
| 313 | 313 | } |
| 314 | 314 | } |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | |
| 52 | 52 | $client->request('GET', $url); |
| 53 | 53 | |
| 54 | - $this->assertTrue($client->getResponse()->isSuccessful(), 'Request not successful. Status code is '.$client->getResponse()->getStatusCode() . ' for URL '.$url); |
|
| 54 | + $this->assertTrue($client->getResponse()->isSuccessful(), 'Request not successful. Status code is '.$client->getResponse()->getStatusCode().' for URL '.$url); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | public function urlProvider(): ?Generator |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | ]); |
| 61 | 61 | $client->catchExceptions(false); |
| 62 | 62 | $client->request('GET', $url); |
| 63 | - $this->assertTrue($client->getResponse()->isSuccessful(), 'Request not successful. Status code is '.$client->getResponse()->getStatusCode() . ' for URL '.$url); |
|
| 63 | + $this->assertTrue($client->getResponse()->isSuccessful(), 'Request not successful. Status code is '.$client->getResponse()->getStatusCode().' for URL '.$url); |
|
| 64 | 64 | |
| 65 | 65 | static::ensureKernelShutdown(); |
| 66 | 66 | $client = static::createClient([], [ |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | |
| 47 | 47 | //Check for simple objects |
| 48 | 48 | $this->assertSame([], $this->service->toArray(new \stdClass())); |
| 49 | - $this->assertSame(['test' => 1], $this->service->toArray((object)['test' => 1])); |
|
| 49 | + $this->assertSame(['test' => 1], $this->service->toArray((object) ['test' => 1])); |
|
| 50 | 50 | |
| 51 | 51 | //Only test and test4 should be available |
| 52 | 52 | $obj = new class { |
@@ -147,16 +147,16 @@ |
||
| 147 | 147 | $this->projectDir = str_replace('\\', '/', $this->projectDir_orig); |
| 148 | 148 | $this->footprint_path = $this->projectDir.'/public/img/footprints'; |
| 149 | 149 | |
| 150 | - yield [$this->footprint_path. '/Active/Diodes/THT/DIODE_P600.png', '%FOOTPRINTS%/Aktiv/Dioden/Bedrahtet/DIODE_P600.png']; |
|
| 151 | - yield [$this->footprint_path . '/Passive/Resistors/THT/Carbon/RESISTOR-CARBON_0207.png', '%FOOTPRINTS%/Passiv/Widerstaende/Bedrahtet/Kohleschicht/WIDERSTAND-KOHLE_0207.png']; |
|
| 152 | - yield [$this->footprint_path . '/Optics/LEDs/THT/LED-GREEN_3MM.png', '%FOOTPRINTS%/Optik/LEDs/Bedrahtet/LED-GRUEN_3MM.png']; |
|
| 153 | - yield [$this->footprint_path . '/Passive/Capacitors/TrimmerCapacitors/TRIMMER_CAPACITOR-RED_TZ03F.png', '%FOOTPRINTS%/Passiv/Kondensatoren/Trimmkondensatoren/TRIMMKONDENSATOR-ROT_TZ03F.png']; |
|
| 154 | - yield [$this->footprint_path . '/Active/ICs/TO/IC_TO126.png', '%FOOTPRINTS%/Aktiv/ICs/TO/IC_TO126.png']; |
|
| 155 | - yield [$this->footprint_path . '/Electromechanics/Switches_Buttons/RotarySwitches/ROTARY_SWITCH_DIP10.png', '%FOOTPRINTS%/Elektromechanik/Schalter_Taster/Drehschalter/DREHSCHALTER_DIP10.png']; |
|
| 156 | - yield [$this->footprint_path . '/Electromechanics/Connectors/DINConnectors/SOCKET_DIN_MAB_4.png', '%FOOTPRINTS%/Elektromechanik/Verbinder/Rundsteckverbinder/BUCHSE_DIN_MAB_4.png']; |
|
| 150 | + yield [$this->footprint_path.'/Active/Diodes/THT/DIODE_P600.png', '%FOOTPRINTS%/Aktiv/Dioden/Bedrahtet/DIODE_P600.png']; |
|
| 151 | + yield [$this->footprint_path.'/Passive/Resistors/THT/Carbon/RESISTOR-CARBON_0207.png', '%FOOTPRINTS%/Passiv/Widerstaende/Bedrahtet/Kohleschicht/WIDERSTAND-KOHLE_0207.png']; |
|
| 152 | + yield [$this->footprint_path.'/Optics/LEDs/THT/LED-GREEN_3MM.png', '%FOOTPRINTS%/Optik/LEDs/Bedrahtet/LED-GRUEN_3MM.png']; |
|
| 153 | + yield [$this->footprint_path.'/Passive/Capacitors/TrimmerCapacitors/TRIMMER_CAPACITOR-RED_TZ03F.png', '%FOOTPRINTS%/Passiv/Kondensatoren/Trimmkondensatoren/TRIMMKONDENSATOR-ROT_TZ03F.png']; |
|
| 154 | + yield [$this->footprint_path.'/Active/ICs/TO/IC_TO126.png', '%FOOTPRINTS%/Aktiv/ICs/TO/IC_TO126.png']; |
|
| 155 | + yield [$this->footprint_path.'/Electromechanics/Switches_Buttons/RotarySwitches/ROTARY_SWITCH_DIP10.png', '%FOOTPRINTS%/Elektromechanik/Schalter_Taster/Drehschalter/DREHSCHALTER_DIP10.png']; |
|
| 156 | + yield [$this->footprint_path.'/Electromechanics/Connectors/DINConnectors/SOCKET_DIN_MAB_4.png', '%FOOTPRINTS%/Elektromechanik/Verbinder/Rundsteckverbinder/BUCHSE_DIN_MAB_4.png']; |
|
| 157 | 157 | |
| 158 | 158 | //Leave english pathes untouched |
| 159 | - yield [$this->footprint_path . '/Passive/Capacitors/CAPACITOR_CTS_A_15MM.png', '%FOOTPRINTS%/Passive/Capacitors/CAPACITOR_CTS_A_15MM.png']; |
|
| 159 | + yield [$this->footprint_path.'/Passive/Capacitors/CAPACITOR_CTS_A_15MM.png', '%FOOTPRINTS%/Passive/Capacitors/CAPACITOR_CTS_A_15MM.png']; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | /** |
@@ -143,7 +143,7 @@ |
||
| 143 | 143 | $this->assertTrue($user->isWebAuthnAuthenticatorEnabled()); |
| 144 | 144 | |
| 145 | 145 | $result = $user->getWebauthnKeys(); |
| 146 | - if($result instanceof Collection){ |
|
| 146 | + if ($result instanceof Collection) { |
|
| 147 | 147 | $result->clear(); |
| 148 | 148 | } |
| 149 | 149 | $this->assertFalse($user->isWebAuthnAuthenticatorEnabled()); |
@@ -44,11 +44,11 @@ discard block |
||
| 44 | 44 | /* |
| 45 | 45 | * Checks if a given variable is an instance of a given class. E.g. ` x is instanceof('App\Entity\Parts\Part')` |
| 46 | 46 | */ |
| 47 | - new TwigTest('instanceof', static function ($var, $instance) { |
|
| 47 | + new TwigTest('instanceof', static function($var, $instance) { |
|
| 48 | 48 | return $var instanceof $instance; |
| 49 | 49 | }), |
| 50 | 50 | /* Checks if a given variable is an object. E.g. `x is object` */ |
| 51 | - new TwigTest('object', static function ($var) { |
|
| 51 | + new TwigTest('object', static function($var) { |
|
| 52 | 52 | return is_object($var); |
| 53 | 53 | }), |
| 54 | 54 | ]; |
@@ -64,12 +64,12 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | public function toArray($object) |
| 66 | 66 | { |
| 67 | - if(! is_object($object) && ! is_array($object)) { |
|
| 67 | + if (!is_object($object) && !is_array($object)) { |
|
| 68 | 68 | throw new \InvalidArgumentException('The given variable is not an object or array!'); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | //If it is already an array, we can just return it |
| 72 | - if(is_array($object)) { |
|
| 72 | + if (is_array($object)) { |
|
| 73 | 73 | return $object; |
| 74 | 74 | } |
| 75 | 75 | |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | $this->allowedMethods = []; |
| 66 | 66 | foreach ($methods as $class => $m) { |
| 67 | 67 | $this->allowedMethods[$class] = array_map( |
| 68 | - static function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, is_array($m) ? $m : [$m]); |
|
| 68 | + static function($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, is_array($m) ? $m : [$m]); |
|
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | { |
| 59 | 59 | return [ |
| 60 | 60 | /* Checks if the given variable is an entitity (instance of AbstractDBElement) */ |
| 61 | - new TwigTest('entity', static function ($var) { |
|
| 61 | + new TwigTest('entity', static function($var) { |
|
| 62 | 62 | return $var instanceof AbstractDBElement; |
| 63 | 63 | }), |
| 64 | 64 | ]; |