@@ -72,7 +72,7 @@ |
||
72 | 72 | if (!is_dir($dir)) { |
73 | 73 | throw new Exception("Debug dir $dir doesn't exist"); |
74 | 74 | } |
75 | - $files = glob($dir . '/*'); |
|
75 | + $files = glob($dir.'/*'); |
|
76 | 76 | if ($input->getOption('list')) { |
77 | 77 | foreach ($files as $file) { |
78 | 78 | $output->writeln(basename($file)); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | ], |
33 | 33 | [ |
34 | 34 | 'type' => 'shell', |
35 | - 'command' => '{config["php"]} ' . __DIR__ . '/typo3/clear-cache.php', |
|
35 | + 'command' => '{config["php"]} '.__DIR__.'/typo3/clear-cache.php', |
|
36 | 36 | 'processSettings' => ['pt' => true] |
37 | 37 | ], |
38 | 38 | [ |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | ['workflow' => 'clearCodeCaches'], |
54 | 54 | [ |
55 | 55 | 'type' => 'scp', |
56 | - 'from' => __DIR__ . '/typo3', |
|
56 | + 'from' => __DIR__.'/typo3', |
|
57 | 57 | 'to' => '{node}:{node.deployPath}/current/{config["workspace"]}/typo3' |
58 | 58 | ], |
59 | 59 | [ |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * @link http://www.netresearch.de |
12 | 12 | */ |
13 | 13 | |
14 | -require_once __DIR__ . '/bootstrap.php'; |
|
14 | +require_once __DIR__.'/bootstrap.php'; |
|
15 | 15 | |
16 | 16 | use TYPO3\CMS\Core\Utility\GeneralUtility; |
17 | 17 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | if ($execute) { |
42 | 42 | $GLOBALS['TYPO3_DB']->admin_query($query); |
43 | 43 | if ($GLOBALS['TYPO3_DB']->sql_error()) { |
44 | - throw new \Exception('SQL-Error: ' . $GLOBALS['TYPO3_DB']->sql_error()); |
|
44 | + throw new \Exception('SQL-Error: '.$GLOBALS['TYPO3_DB']->sql_error()); |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * @link http://www.netresearch.de |
13 | 13 | */ |
14 | 14 | |
15 | -require __DIR__ . '/bootstrap.php'; |
|
15 | +require __DIR__.'/bootstrap.php'; |
|
16 | 16 | |
17 | 17 | $dataHandler = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\DataHandling\DataHandler'); |
18 | 18 | $dataHandler->stripslashes_values = 0; |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | die('Access denied'); |
22 | 22 | } |
23 | 23 | |
24 | -define('PATH_site', getcwd() . DIRECTORY_SEPARATOR); |
|
24 | +define('PATH_site', getcwd().DIRECTORY_SEPARATOR); |
|
25 | 25 | |
26 | 26 | $typo3VersionIsMinimum7 = true; |
27 | 27 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | if ($typo3VersionIsMinimum7) { |
36 | - $classLoader = include getcwd() . '/typo3_src/vendor/autoload.php'; |
|
36 | + $classLoader = include getcwd().'/typo3_src/vendor/autoload.php'; |
|
37 | 37 | \TYPO3\CMS\Core\Core\Bootstrap::getInstance() |
38 | 38 | ->initializeClassLoader($classLoader) |
39 | 39 | ->baseSetup(PATH_site) |
@@ -14,8 +14,6 @@ |
||
14 | 14 | |
15 | 15 | namespace Netresearch\Kite\ExpressionLanguage; |
16 | 16 | use Netresearch\Kite\Task; |
17 | - |
|
18 | -use Symfony\Component\Console\Question\ChoiceQuestion; |
|
19 | 17 | use Symfony\Component\Console\Question\ConfirmationQuestion; |
20 | 18 | use Symfony\Component\Console\Question\Question; |
21 | 19 | use Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | { |
123 | 123 | parent::registerFunctions(); |
124 | 124 | $functions = [ |
125 | - 'call' => function (array $values, $function) { |
|
125 | + 'call' => function(array $values, $function) { |
|
126 | 126 | $args = array_slice(func_get_args(), 2); |
127 | 127 | if (array_key_exists($function, $this->functions)) { |
128 | 128 | array_unshift($args, $values); |
@@ -130,29 +130,29 @@ discard block |
||
130 | 130 | } |
131 | 131 | return call_user_func_array($function, $args); |
132 | 132 | }, |
133 | - 'isset' => function (array $values, $var) { |
|
133 | + 'isset' => function(array $values, $var) { |
|
134 | 134 | return $values[self::VARIABLES_KEY]->has($var); |
135 | 135 | }, |
136 | - 'empty' => function (array $values, $var) { |
|
136 | + 'empty' => function(array $values, $var) { |
|
137 | 137 | return !$values[self::VARIABLES_KEY]->has($var) || !$values[self::VARIABLES_KEY]->get($var); |
138 | 138 | }, |
139 | - 'get' => function (array $values, $var) { |
|
139 | + 'get' => function(array $values, $var) { |
|
140 | 140 | return $values[self::VARIABLES_KEY]->get($var); |
141 | 141 | }, |
142 | - 'set' => function (array $values, $var, $value) { |
|
142 | + 'set' => function(array $values, $var, $value) { |
|
143 | 143 | $values[self::VARIABLES_KEY]->set($var, $value); |
144 | 144 | return $value; |
145 | 145 | }, |
146 | - 'confirm' => function (array $values, $question) { |
|
146 | + 'confirm' => function(array $values, $question) { |
|
147 | 147 | return $this->ask($values[self::VARIABLES_KEY], new ConfirmationQuestion("<question>$question</question> [y] ")); |
148 | 148 | }, |
149 | - 'answer' => function (array $values, $question) { |
|
149 | + 'answer' => function(array $values, $question) { |
|
150 | 150 | return $this->ask($values[self::VARIABLES_KEY], new Question("<question>$question</question> ")); |
151 | 151 | }, |
152 | - 'choose' => function (array $values, $question) { |
|
152 | + 'choose' => function(array $values, $question) { |
|
153 | 153 | return $this->ask($values[self::VARIABLES_KEY], new Question("<question>$question</question> ")); |
154 | 154 | }, |
155 | - 'replace' => function (array $values, $search, $replace, $subject, $regex = false) { |
|
155 | + 'replace' => function(array $values, $search, $replace, $subject, $regex = false) { |
|
156 | 156 | $values[self::VARIABLES_KEY]->console->output( |
157 | 157 | '<warning>Expression language function "replace" is deprecated ' |
158 | 158 | . 'and will be removed in 1.6.0 - use preg_replace or str_replace</warning>' |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | foreach ($functions as $name => $function) { |
168 | 168 | $this->register( |
169 | 169 | $name, |
170 | - function () { |
|
170 | + function() { |
|
171 | 171 | |
172 | 172 | }, |
173 | 173 | $function |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | if ($requiredVersion !== $version) { |
148 | 148 | $this->assertPackageAllowed($package); |
149 | 149 | if (!$package->git) { |
150 | - throw new Exception("Package {$package->name} required to be installed from source"); |
|
150 | + throw new Exception("package {$package->name} required to be installed from source"); |
|
151 | 151 | } |
152 | 152 | if ($autoFix) { |
153 | 153 | $fix = true; |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | protected function assertPackageAllowed($package) |
484 | 484 | { |
485 | 485 | if (!$this->isPackageAllowed($package)) { |
486 | - throw new Exception("Package {$package->name} is not in white list"); |
|
486 | + throw new Exception("package {$package->name} is not in white list"); |
|
487 | 487 | } |
488 | 488 | } |
489 | 489 |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $this->git('push', $package->path, array('u' => 'origin', $package->branch)); |
93 | 93 | $this->console->output( |
94 | 94 | str_repeat(chr(8), strlen($package->name)) |
95 | - . '<info>' . $package->name . '</info>' |
|
95 | + . '<info>'.$package->name.'</info>' |
|
96 | 96 | ); |
97 | 97 | unset($this->pushPackages[$i]); |
98 | 98 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $unfixedRequirements = 0; |
137 | 137 | while ($packageName = array_shift($checkedOutPackages)) { |
138 | 138 | $branch = $packages[$packageName]->branch; |
139 | - $version = 'dev-' . $branch; |
|
139 | + $version = 'dev-'.$branch; |
|
140 | 140 | foreach ($this->getPackages(false, false) as $package) { |
141 | 141 | if (array_key_exists($packageName, $package->requires)) { |
142 | 142 | // TODO: Set required version to branch alias, if any |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $this->assertPackageAllowed($package); |
195 | 195 | |
196 | 196 | $currentVersion = $package->requires[$requiredPackage]; |
197 | - $composerFile = $package->path . '/composer.json'; |
|
197 | + $composerFile = $package->path.'/composer.json'; |
|
198 | 198 | $composerFileContents = file_get_contents($composerFile); |
199 | 199 | $newComposerFileContents = preg_replace( |
200 | 200 | sprintf( |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | preg_quote($requiredPackage, '/'), |
203 | 203 | preg_quote($currentVersion, '/') |
204 | 204 | ), |
205 | - '$1' . $newVersion, |
|
205 | + '$1'.$newVersion, |
|
206 | 206 | $composerFileContents |
207 | 207 | ); |
208 | 208 | file_put_contents($composerFile, $newComposerFileContents); |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | if (!$package->git) { |
262 | 262 | throw new Exception('Non git package can not be checked out'); |
263 | 263 | } |
264 | - $remoteBranch = 'origin/' . $branch; |
|
264 | + $remoteBranch = 'origin/'.$branch; |
|
265 | 265 | $isRemote = in_array($remoteBranch, $package->branches, true); |
266 | 266 | if (in_array($branch, $package->branches, true)) { |
267 | 267 | $this->git('checkout', $package->path, $branch); |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | } elseif ($create) { |
271 | 271 | $branches = array_unique( |
272 | 272 | array_map( |
273 | - function ($el) { |
|
273 | + function($el) { |
|
274 | 274 | $parts = explode('/', $el); |
275 | 275 | return array_pop($parts); |
276 | 276 | }, |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | $this->console->output("Checked out <comment>{$package->name}</comment> at <comment>$branch</comment>"); |
303 | 303 | |
304 | 304 | $this->reloadRequires($package); |
305 | - $package->version = 'dev-' . $branch; |
|
305 | + $package->version = 'dev-'.$branch; |
|
306 | 306 | $package->branch = $branch; |
307 | 307 | |
308 | 308 | return true; |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | throw new Exception('Non git package can not be merged'); |
327 | 327 | } |
328 | 328 | |
329 | - $this->git('fetch', $package->path, array('force' => true, 'origin', $branch . ':' . $branch)); |
|
329 | + $this->git('fetch', $package->path, array('force' => true, 'origin', $branch.':'.$branch)); |
|
330 | 330 | |
331 | 331 | $ff = $branch == 'master' ? 'ff' : 'no-ff'; |
332 | 332 | $optArg = array($ff => true, 'no-commit' => true); |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | if (!$message) { |
361 | 361 | $message = $this->answer( |
362 | 362 | 'Enter commit message:', |
363 | - 'Merged ' . $branch . ' into ' . $package->branch |
|
363 | + 'Merged '.$branch.' into '.$package->branch |
|
364 | 364 | ); |
365 | 365 | } |
366 | 366 | $this->git('commit', $package->path, array('n' => true, 'm' => $message)); |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | */ |
382 | 382 | private function resolveRequirementsConflict($package) |
383 | 383 | { |
384 | - $contents = file_get_contents($package->path . '/composer.json'); |
|
384 | + $contents = file_get_contents($package->path.'/composer.json'); |
|
385 | 385 | $ours = @json_decode( |
386 | 386 | preg_replace('/^<{7}.+\n(.+)\n(\|{7}|={7}).+>{7}.+$/smU', '$1', $contents) |
387 | 387 | ); |
@@ -402,16 +402,16 @@ discard block |
||
402 | 402 | } |
403 | 403 | |
404 | 404 | if (preg_match('/\{[^\{]*<{7}.+?>{7}[^\{]*([\t ]*)\}/smU', $contents, $matches, PREG_OFFSET_CAPTURE)) { |
405 | - $prefix = "\n" . str_repeat($matches[1][0], 2); |
|
405 | + $prefix = "\n".str_repeat($matches[1][0], 2); |
|
406 | 406 | $requireBlock = ''; |
407 | 407 | foreach ($this->mergeRequirements($package, $ours, $theirs) as $packageName => $version) { |
408 | - $requireBlock .= $prefix . '"' . $packageName . '": "' . $version . '",'; |
|
408 | + $requireBlock .= $prefix.'"'.$packageName.'": "'.$version.'",'; |
|
409 | 409 | } |
410 | 410 | file_put_contents( |
411 | - $package->path . '/composer.json', |
|
412 | - substr($contents, 0, $matches[0][1]) . '{' |
|
413 | - . rtrim($requireBlock, ',') . "\n" |
|
414 | - . $matches[1][0] . '}' |
|
411 | + $package->path.'/composer.json', |
|
412 | + substr($contents, 0, $matches[0][1]).'{' |
|
413 | + . rtrim($requireBlock, ',')."\n" |
|
414 | + . $matches[1][0].'}' |
|
415 | 415 | . substr($contents, $matches[0][1] + strlen($matches[0][0])) |
416 | 416 | ); |
417 | 417 | } |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | $theirsRequire = isset($theirs['require']) && is_object($theirs['require']) ? get_object_vars($theirs['require']) : []; |
433 | 433 | $mergedRequires = array_merge($oursRequire, $theirsRequire); |
434 | 434 | $packages = $this->getPackages(false, false); |
435 | - $preferredVersion = 'dev-' . $package->branch; |
|
435 | + $preferredVersion = 'dev-'.$package->branch; |
|
436 | 436 | foreach ($mergedRequires as $packageName => $version) { |
437 | 437 | $actualVersion = ($version === '@dev') ? 'dev-master' : $version; |
438 | 438 | if (array_key_exists($packageName, $oursRequire) |
@@ -498,9 +498,9 @@ discard block |
||
498 | 498 | if (!is_array($this->whitelists)) { |
499 | 499 | $this->whitelists = []; |
500 | 500 | foreach ($whitelistTypes as $whitelistType) { |
501 | - $option = $this->get('whitelist' . ucfirst($whitelistType) . 's'); |
|
501 | + $option = $this->get('whitelist'.ucfirst($whitelistType).'s'); |
|
502 | 502 | if ($option) { |
503 | - $this->whitelists[$whitelistType] = '#^' . $option . '$#'; |
|
503 | + $this->whitelists[$whitelistType] = '#^'.$option.'$#'; |
|
504 | 504 | } |
505 | 505 | } |
506 | 506 | } |
@@ -71,12 +71,12 @@ discard block |
||
71 | 71 | if (is_string($composerJson)) { |
72 | 72 | $path = realpath($composerJson); |
73 | 73 | if (!$path) { |
74 | - throw new Exception('Could not find ' . $composerJson); |
|
74 | + throw new Exception('Could not find '.$composerJson); |
|
75 | 75 | } |
76 | 76 | $this->path = dirname($path); |
77 | 77 | $composerJson = json_decode(file_get_contents($path)); |
78 | 78 | if (!is_object($composerJson)) { |
79 | - throw new Exception('Could not load ' . $path); |
|
79 | + throw new Exception('Could not load '.$path); |
|
80 | 80 | } |
81 | 81 | } |
82 | 82 | foreach (get_object_vars($composerJson) as $key => $value) { |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $this->loadRequires(); |
108 | 108 | return $this->$name; |
109 | 109 | } |
110 | - throw new Exception('Invalid property ' . $name); |
|
110 | + throw new Exception('Invalid property '.$name); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | /** |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | */ |
149 | 149 | public function reloadRequires() |
150 | 150 | { |
151 | - $file = $this->path . '/composer.json'; |
|
151 | + $file = $this->path.'/composer.json'; |
|
152 | 152 | if (file_exists($file)) { |
153 | 153 | $composerJson = json_decode(file_get_contents($file)); |
154 | 154 | unset($this->require); |
@@ -200,12 +200,12 @@ discard block |
||
200 | 200 | $this->upstreams = array(); |
201 | 201 | $this->branch = null; |
202 | 202 | $this->tag = null; |
203 | - $gitDir = $this->path . '/.git'; |
|
203 | + $gitDir = $this->path.'/.git'; |
|
204 | 204 | $this->git = file_exists($gitDir) && is_dir($gitDir); |
205 | 205 | if ($this->git) { |
206 | 206 | $this->composer->git('fetch', $this->path, array('p' => true, 'origin')); |
207 | 207 | try { |
208 | - $format = (self::$forEachRefHeadSupported ? '%(HEAD)' : '') . '|%(refname:short)|%(upstream:short)'; |
|
208 | + $format = (self::$forEachRefHeadSupported ? '%(HEAD)' : '').'|%(refname:short)|%(upstream:short)'; |
|
209 | 209 | $gitBr = $this->composer->git('for-each-ref', $this->path, ['format' => $format, 'refs/heads/', 'refs/remotes/origin']); |
210 | 210 | } catch (Exception\ProcessFailedException $e) { |
211 | 211 | if (trim($e->getProcess()->getErrorOutput()) === 'fatal: unknown field name: HEAD') { |