@@ -149,10 +149,10 @@ |
||
| 149 | 149 | $newline = true; |
| 150 | 150 | } |
| 151 | 151 | if ($this->previousWasNewLine && $l >= 0 && $message[0] !== "\n") { |
| 152 | - $message = $this->getIndention() . $message; |
|
| 152 | + $message = $this->getIndention().$message; |
|
| 153 | 153 | } |
| 154 | 154 | if (strpos($message, "\n") !== false) { |
| 155 | - $message = str_replace("\n", "\n" . $this->getIndention(), $message); |
|
| 155 | + $message = str_replace("\n", "\n".$this->getIndention(), $message); |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | // TODO: Indent wrapped lines - that's just not that easy because of the ANSI color escape codes |
@@ -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)); |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | . "from kite configuration:\n\n" |
| 145 | 145 | . $this->getHelper('formatter')->formatBlock($this->getDescription(), 'fg=black;bg=green', true) |
| 146 | 146 | . "\n\nThe canonicalized command is:\n\n" |
| 147 | - . " <info>php " . $_SERVER['PHP_SELF'] . ' ' . preg_replace('/^generic:([^:]+):([^ ]+)/', '--$1=$2', $this->getName()) . "</info>\n"; |
|
| 147 | + . " <info>php ".$_SERVER['PHP_SELF'].' '.preg_replace('/^generic:([^:]+):([^ ]+)/', '--$1=$2', $this->getName())."</info>\n"; |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | /** |
@@ -178,13 +178,13 @@ discard block |
||
| 178 | 178 | if (!$input->getOption('no-debug-file') && $debugDir = $input->getOption('debug-dir')) { |
| 179 | 179 | $this->console->getFilesystem()->ensureDirectoryExists($debugDir); |
| 180 | 180 | // keep max 20 logs |
| 181 | - $files = glob($debugDir . '/*'); |
|
| 181 | + $files = glob($debugDir.'/*'); |
|
| 182 | 182 | while (count($files) > 19) { |
| 183 | 183 | $this->console->getFilesystem()->remove(array_shift($files)); |
| 184 | 184 | } |
| 185 | 185 | $logFile = date('YmdHis'); |
| 186 | 186 | $debugOutput = new Output( |
| 187 | - fopen(rtrim($debugDir, '\\/') . '/' . $logFile, 'w'), |
|
| 187 | + fopen(rtrim($debugDir, '\\/').'/'.$logFile, 'w'), |
|
| 188 | 188 | Output::VERBOSITY_VERY_VERBOSE, |
| 189 | 189 | true |
| 190 | 190 | ); |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | $debugOutput->writeln( |
| 194 | 194 | $this->getHelper('formatter')->formatBlock( |
| 195 | 195 | implode(' ', $_SERVER['argv']), 'fg=black;bg=white', true |
| 196 | - ) . "\n" |
|
| 196 | + )."\n" |
|
| 197 | 197 | ); |
| 198 | 198 | } |
| 199 | 199 | } |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | } catch (\Exception $e) { |
| 224 | 224 | if ($e instanceof ExitException && $e->getCode() === 0) { |
| 225 | 225 | if ($e->getMessage()) { |
| 226 | - $output->writeln('<info>' . $e->getMessage() . '</info>'); |
|
| 226 | + $output->writeln('<info>'.$e->getMessage().'</info>'); |
|
| 227 | 227 | } |
| 228 | 228 | return 0; |
| 229 | 229 | } |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | if (!$name) { |
| 284 | 284 | return 0; |
| 285 | 285 | } |
| 286 | - $key = $type . ':' . $name; |
|
| 286 | + $key = $type.':'.$name; |
|
| 287 | 287 | $tasksAdded = 0; |
| 288 | 288 | if (array_key_exists($key, $this->job->deferredTasks)) { |
| 289 | 289 | while ($task = array_shift($this->job->deferredTasks[$key])) { |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | $shouldRun = $if; |
| 311 | 311 | } elseif (is_string($if)) { |
| 312 | 312 | $shouldRun = (boolean) $task->expand( |
| 313 | - '{' . $if . ' ? 1 : 0}' |
|
| 313 | + '{'.$if.' ? 1 : 0}' |
|
| 314 | 314 | ); |
| 315 | 315 | } else { |
| 316 | 316 | $shouldRun = call_user_func_array($if, array($task, $this->console)); |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | if ($name === '@self') { |
| 350 | 350 | $name = $this->get('name'); |
| 351 | 351 | } |
| 352 | - $key = $type . ':' . $name; |
|
| 352 | + $key = $type.':'.$name; |
|
| 353 | 353 | $this->job->deferredTasks[$key][] = $task; |
| 354 | 354 | } |
| 355 | 355 | } |
@@ -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) |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | list($dir, $file) = $dirAndFile; |
| 82 | 82 | if (is_dir($dir)) { |
| 83 | 83 | $app = $appName; |
| 84 | - $expectedFile = $dir . '/' . $file; |
|
| 84 | + $expectedFile = $dir.'/'.$file; |
|
| 85 | 85 | break; |
| 86 | 86 | } |
| 87 | 87 | } |
@@ -91,9 +91,9 @@ discard block |
||
| 91 | 91 | } catch (\Exception $e) { |
| 92 | 92 | if ($app) { |
| 93 | 93 | $message = [ |
| 94 | - 'You appear to be in a ' . $app . ' root directory but', |
|
| 94 | + 'You appear to be in a '.$app.' root directory but', |
|
| 95 | 95 | 'there is no kite config file at the expected', |
| 96 | - 'location (' . $expectedFile . ').' |
|
| 96 | + 'location ('.$expectedFile.').' |
|
| 97 | 97 | ]; |
| 98 | 98 | } else { |
| 99 | 99 | $message = [ |
@@ -103,9 +103,9 @@ discard block |
||
| 103 | 103 | 'The config file path is expected to be:', |
| 104 | 104 | ]; |
| 105 | 105 | foreach ($indicators as $appName => $dirAndFile) { |
| 106 | - $message[] = ' - "' . implode('/', $dirAndFile) . '" for ' . $appName . ' applications or'; |
|
| 106 | + $message[] = ' - "'.implode('/', $dirAndFile).'" for '.$appName.' applications or'; |
|
| 107 | 107 | } |
| 108 | - $message[] = ' - "' . $expectedFile . '" for any other application'; |
|
| 108 | + $message[] = ' - "'.$expectedFile.'" for any other application'; |
|
| 109 | 109 | } |
| 110 | 110 | $lMax = 0; |
| 111 | 111 | foreach ($message as $line) { |
@@ -113,12 +113,12 @@ discard block |
||
| 113 | 113 | $lMax = $l; |
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | - $this->output->writeln('<warning>' . str_repeat(' ', $lMax + 4) . '</warning>'); |
|
| 116 | + $this->output->writeln('<warning>'.str_repeat(' ', $lMax + 4).'</warning>'); |
|
| 117 | 117 | foreach ($message as $line) { |
| 118 | 118 | $line = str_pad($line, $lMax + 2); |
| 119 | 119 | $this->output->writeln("<warning> $line</warning>"); |
| 120 | 120 | } |
| 121 | - $this->output->writeln('<warning>' . str_repeat(' ', $lMax + 4) . '</warning>'); |
|
| 121 | + $this->output->writeln('<warning>'.str_repeat(' ', $lMax + 4).'</warning>'); |
|
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | . "| ' /| | __/ _ \\\n" |
| 136 | 136 | . "| . \\| | |_| __/\n" |
| 137 | 137 | . "|_|\\_|_|\\__\\___|\n\n" |
| 138 | - . $this->getLongVersion() . "\n\n" |
|
| 138 | + . $this->getLongVersion()."\n\n" |
|
| 139 | 139 | . $this->getSelfPackage()->description; |
| 140 | 140 | |
| 141 | 141 | return $help; |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | if (isset($package->source)) { |
| 154 | 154 | $v .= " <comment>({$package->source->reference})</comment>"; |
| 155 | 155 | } |
| 156 | - $v .= ' ' . $package->time; |
|
| 156 | + $v .= ' '.$package->time; |
|
| 157 | 157 | return $v; |
| 158 | 158 | } |
| 159 | 159 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | { |
| 167 | 167 | static $package = null; |
| 168 | 168 | if (!$package) { |
| 169 | - $files = [__DIR__ . '/../../../../composer/installed.json', __DIR__ . '/vendor/composer/installed.json']; |
|
| 169 | + $files = [__DIR__.'/../../../../composer/installed.json', __DIR__.'/vendor/composer/installed.json']; |
|
| 170 | 170 | foreach ($files as $file) { |
| 171 | 171 | if (file_exists($file)) { |
| 172 | 172 | $installed = json_decode(file_get_contents($file)); |
@@ -183,9 +183,9 @@ discard block |
||
| 183 | 183 | $process = new Process('git symbolic-ref -q --short HEAD || git describe --tags --exact-match; git rev-parse HEAD; git show -s --format=%ct HEAD', $kitePath); |
| 184 | 184 | $process->run(); |
| 185 | 185 | if ($output = $process->getOutput()) { |
| 186 | - $package = json_decode(file_get_contents($kitePath . '/composer.json')); |
|
| 186 | + $package = json_decode(file_get_contents($kitePath.'/composer.json')); |
|
| 187 | 187 | list($name, $revision, $tstamp) = explode("\n", trim($output), 3); |
| 188 | - $package->version = preg_match('/^v?[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?$/i', $name) ? $name : 'dev-' . $name; |
|
| 188 | + $package->version = preg_match('/^v?[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?$/i', $name) ? $name : 'dev-'.$name; |
|
| 189 | 189 | $package->source = (object) ['reference' => $revision]; |
| 190 | 190 | $package->time = date('Y-m-d H:i:s', $tstamp); |
| 191 | 191 | } else { |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | $definition->addOption(new InputOption('workflow', null, InputOption::VALUE_OPTIONAL, 'Run a workflow on the fly')); |
| 208 | 208 | |
| 209 | 209 | if (isset($_SERVER['HOME']) && is_writable($_SERVER['HOME'])) { |
| 210 | - $debugDir = $_SERVER['HOME'] . '/.kite/log'; |
|
| 210 | + $debugDir = $_SERVER['HOME'].'/.kite/log'; |
|
| 211 | 211 | } else { |
| 212 | 212 | $debugDir = false; |
| 213 | 213 | } |
@@ -251,19 +251,19 @@ discard block |
||
| 251 | 251 | $strInput .= ' --help'; |
| 252 | 252 | } |
| 253 | 253 | $workflow = $input->getParameterOption('--workflow'); |
| 254 | - $jobName = 'generic:workflow:' . $workflow; |
|
| 254 | + $jobName = 'generic:workflow:'.$workflow; |
|
| 255 | 255 | $this->config->configureJob($jobName, array('workflow' => $workflow)); |
| 256 | 256 | $command = new JobCommand($jobName, $this->config); |
| 257 | 257 | $this->add($command); |
| 258 | 258 | |
| 259 | - $parameterOption = '--workflow=' . $workflow; |
|
| 259 | + $parameterOption = '--workflow='.$workflow; |
|
| 260 | 260 | $input = new StringInput( |
| 261 | 261 | rtrim( |
| 262 | - $jobName . ' ' . |
|
| 262 | + $jobName.' '. |
|
| 263 | 263 | str_replace( |
| 264 | 264 | array( |
| 265 | - $parameterOption . ' ', |
|
| 266 | - ' ' . $parameterOption, |
|
| 265 | + $parameterOption.' ', |
|
| 266 | + ' '.$parameterOption, |
|
| 267 | 267 | $parameterOption |
| 268 | 268 | ), '', $strInput |
| 269 | 269 | ) |
@@ -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 |