@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * Saito - The Threaded Web Forum |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public function html(): string |
| 38 | 38 | { |
| 39 | - $memory = 'Peak memory usage: ' . $this->Number->toReadableSize(memory_get_peak_usage()); |
|
| 39 | + $memory = 'Peak memory usage: '.$this->Number->toReadableSize(memory_get_peak_usage()); |
|
| 40 | 40 | $html = $this->Html->para('', $memory); |
| 41 | 41 | |
| 42 | 42 | $html .= $this->Html->tag( |
@@ -117,6 +117,6 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | private function getResult() |
| 119 | 119 | { |
| 120 | - return "<pre>" . Stopwatch::getString() . "</pre>"; |
|
| 120 | + return "<pre>".Stopwatch::getString()."</pre>"; |
|
| 121 | 121 | } |
| 122 | 122 | } |
@@ -141,10 +141,10 @@ discard block |
||
| 141 | 141 | |
| 142 | 142 | switch ($event) { |
| 143 | 143 | case 'start': |
| 144 | - $x = '* ' . $x; |
|
| 144 | + $x = '* '.$x; |
|
| 145 | 145 | break; |
| 146 | 146 | case 'stop': |
| 147 | - $x = '† ' . $x; |
|
| 147 | + $x = '† '.$x; |
|
| 148 | 148 | break; |
| 149 | 149 | } |
| 150 | 150 | |
@@ -208,13 +208,13 @@ discard block |
||
| 208 | 208 | self::start('now'); |
| 209 | 209 | |
| 210 | 210 | $out = ""; |
| 211 | - $out .= 'Time to Cake: ' . sprintf('%05.3f', self::_timeToCake()) . " s\n"; |
|
| 212 | - $out .= 'Cake bootstrap: ' . sprintf('%05.3f', self::_timeFromCakeToStopwatch()) . " s\n"; |
|
| 211 | + $out .= 'Time to Cake: '.sprintf('%05.3f', self::_timeToCake())." s\n"; |
|
| 212 | + $out .= 'Cake bootstrap: '.sprintf('%05.3f', self::_timeFromCakeToStopwatch())." s\n"; |
|
| 213 | 213 | |
| 214 | 214 | $out .= "W\tU\tW_delta\tU_delta\tMem [MB]\n"; |
| 215 | 215 | $_seriesIndex = 1; |
| 216 | 216 | foreach (self::$_events as $k => $v) { |
| 217 | - $out .= '<span id="stopwatch-' . $_seriesIndex++ . '" class="stopwatch-row">'; |
|
| 217 | + $out .= '<span id="stopwatch-'.$_seriesIndex++.'" class="stopwatch-row">'; |
|
| 218 | 218 | $out .= sprintf( |
| 219 | 219 | "%05.3f\t%05.3f\t%05.3f\t%05.3f\t%5.1f\t%s\n", |
| 220 | 220 | $v['wtime'], |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | ); |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | - $out .= "\n\n" . self::printStatistic(); |
|
| 268 | + $out .= "\n\n".self::printStatistic(); |
|
| 269 | 269 | |
| 270 | 270 | return $out; |
| 271 | 271 | } |
@@ -354,10 +354,10 @@ discard block |
||
| 354 | 354 | */ |
| 355 | 355 | public static function printStatistic() |
| 356 | 356 | { |
| 357 | - return self::$_stopwatchCalls . " calls with ca " . sprintf( |
|
| 357 | + return self::$_stopwatchCalls." calls with ca ".sprintf( |
|
| 358 | 358 | "%05.3f", |
| 359 | 359 | self::$_stopwatchTime |
| 360 | - ) . ' sec overhead.'; |
|
| 360 | + ).' sec overhead.'; |
|
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | /** |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | } |
| 75 | 75 | $jobsExecuted++; |
| 76 | 76 | $job->execute(); |
| 77 | - $this->_log('Run cron-job ' . $job->uid); |
|
| 77 | + $this->_log('Run cron-job '.$job->uid); |
|
| 78 | 78 | $this->_lastRuns[$job->due][$job->uid] = $this->_now; |
| 79 | 79 | } |
| 80 | 80 | if ($jobsExecuted === 0) { |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * Saito - The Threaded Web Forum |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $this->createSettings(); |
| 79 | 79 | (new DbVersion(TableRegistry::get('Settings')))->set('4.10.0'); |
| 80 | 80 | |
| 81 | - $token = new File(CONFIG . 'installer'); |
|
| 81 | + $token = new File(CONFIG.'installer'); |
|
| 82 | 82 | $this->assertTrue($token->exists()); |
| 83 | 83 | |
| 84 | 84 | $this->get('/'); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | private function createInstallerToken() |
| 91 | 91 | { |
| 92 | - (new File(CONFIG . 'installer'))->create(); |
|
| 92 | + (new File(CONFIG.'installer'))->create(); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | private function createSettings() |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * Saito - The Threaded Web Forum |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | public function setUp() |
| 36 | 36 | { |
| 37 | 37 | parent::setUp(); |
| 38 | - $this->token = new File(CONFIG . 'updater'); |
|
| 38 | + $this->token = new File(CONFIG.'updater'); |
|
| 39 | 39 | $this->dbVersion = (new DbVersion(TableRegistry::get('Settings'))); |
| 40 | 40 | Configure::write('Saito.updated', false); |
| 41 | 41 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | $this->assertResponseOk(); |
| 56 | 56 | $this->assertEquals('failure', $this->_controller->viewBuilder()->getTemplate()); |
| 57 | - $this->assertResponseContains((string)1529737182); |
|
| 57 | + $this->assertResponseContains((string) 1529737182); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | public function testUpdaterShowFailureNoDbVersionString() |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | $this->assertResponseOk(); |
| 66 | 66 | $this->assertEquals('failure', $this->_controller->viewBuilder()->getTemplate()); |
| 67 | - $this->assertResponseContains((string)1529737397); |
|
| 67 | + $this->assertResponseContains((string) 1529737397); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | public function testUpdaterShowFailureWrongDbVersionString() |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | $this->assertResponseOk(); |
| 76 | 76 | $this->assertEquals('failure', $this->_controller->viewBuilder()->getTemplate()); |
| 77 | - $this->assertResponseContains((string)1529737648); |
|
| 77 | + $this->assertResponseContains((string) 1529737648); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | public function testUpdaterInitMigrationsFormEmpty() |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * Saito - The Threaded Web Forum |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | if ($hasSettingsTable) { |
| 65 | 65 | $this->log('Installer found Settings-table. Moving on to Updater.', LogLevel::INFO, ['saito.install']); |
| 66 | 66 | //// disable installer and move on to updater instead |
| 67 | - $token = (new File(CONFIG . 'installer')) |
|
| 67 | + $token = (new File(CONFIG.'installer')) |
|
| 68 | 68 | ->delete(); |
| 69 | 69 | |
| 70 | 70 | return $this->redirect('/'); |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * Saito - The Threaded Web Forum |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | public function start() |
| 52 | 52 | { |
| 53 | - $token = new File(CONFIG . 'updater'); |
|
| 53 | + $token = new File(CONFIG.'updater'); |
|
| 54 | 54 | |
| 55 | 55 | if ($token->exists()) { |
| 56 | 56 | $this->renderFailure(__d('installer', 'update.failure.explanation'), 1529737182); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | (new DbVersion($this->Settings))->set($this->saitoVersion); |
| 107 | 107 | $this->logCurrentState('Post upgrade state.'); |
| 108 | 108 | } catch (\Throwable $e) { |
| 109 | - $this->logCurrentState('Migration failed: ' . $e->getMessage()); |
|
| 109 | + $this->logCurrentState('Migration failed: '.$e->getMessage()); |
|
| 110 | 110 | |
| 111 | 111 | return $this->redirect('/'); |
| 112 | 112 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * Saito - The Threaded Web Forum |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | 'shouts', |
| 55 | 55 | ]; |
| 56 | 56 | foreach ($tables as $table) { |
| 57 | - $connection->execute('DROP TABLE IF EXISTS ' . $table . ';'); |
|
| 57 | + $connection->execute('DROP TABLE IF EXISTS '.$table.';'); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | // Tell the fixture manager that all tables are gone. |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | #!/usr/bin/php -q |
| 2 | 2 | <?php |
| 3 | 3 | // Check platform requirements |
| 4 | -require dirname(__DIR__) . '/config/requirements.php'; |
|
| 5 | -require dirname(__DIR__) . '/vendor/autoload.php'; |
|
| 4 | +require dirname(__DIR__).'/config/requirements.php'; |
|
| 5 | +require dirname(__DIR__).'/vendor/autoload.php'; |
|
| 6 | 6 | |
| 7 | 7 | use App\Application; |
| 8 | 8 | use Cake\Console\CommandRunner; |
| 9 | 9 | |
| 10 | 10 | // Build the runner with an application and root executable name. |
| 11 | -$runner = new CommandRunner(new Application(dirname(__DIR__) . '/config'), 'cake'); |
|
| 11 | +$runner = new CommandRunner(new Application(dirname(__DIR__).'/config'), 'cake'); |
|
| 12 | 12 | exit($runner->run($argv)); |