@@ -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)); |
@@ -18,8 +18,8 @@ discard block |
||
| 18 | 18 | { |
| 19 | 19 | // compare to includes/functions.inc.php generate_pw_hash() mlf 2.3 |
| 20 | 20 | $salt = self::_generateRandomString(10); |
| 21 | - $saltedHash = sha1($password . $salt); |
|
| 22 | - $hashWithSalt = $saltedHash . $salt; |
|
| 21 | + $saltedHash = sha1($password.$salt); |
|
| 22 | + $hashWithSalt = $saltedHash.$salt; |
|
| 23 | 23 | |
| 24 | 24 | return $hashWithSalt; |
| 25 | 25 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | // compare to includes/functions.inc.php is_pw_correct() mlf 2.3 |
| 50 | 50 | $saltedHash = substr($hash, 0, 40); |
| 51 | 51 | $salt = substr($hash, 40, 10); |
| 52 | - if (sha1($password . $salt) == $saltedHash) : |
|
| 52 | + if (sha1($password.$salt) == $saltedHash) : |
|
| 53 | 53 | $out = true; |
| 54 | 54 | endif; |
| 55 | 55 | |
@@ -30,6 +30,6 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public static function tagId() |
| 32 | 32 | { |
| 33 | - return 'id' . static::$_tagId++; |
|
| 33 | + return 'id'.static::$_tagId++; |
|
| 34 | 34 | } |
| 35 | 35 | } |
@@ -78,12 +78,12 @@ discard block |
||
| 78 | 78 | $timeDiffToUtc = $timeInTimezone->getOffset() / 3600; |
| 79 | 79 | |
| 80 | 80 | if ($timeDiffToUtc > 0) { |
| 81 | - $timeDiffToUtc = '+' . $timeDiffToUtc; |
|
| 81 | + $timeDiffToUtc = '+'.$timeDiffToUtc; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - $tz = $timeZoneTitle . ' – ' . $timeInTimezone->format('H:i'); |
|
| 84 | + $tz = $timeZoneTitle.' – '.$timeInTimezone->format('H:i'); |
|
| 85 | 85 | if ($timeDiffToUtc !== 0) { |
| 86 | - $tz .= ' (' . $timeDiffToUtc . ')'; |
|
| 86 | + $tz .= ' ('.$timeDiffToUtc.')'; |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | $options[$groupTitle][$timeZoneTitle] = $tz; |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | $time = strftime("%H:%M", $timestamp); |
| 146 | 146 | } elseif ($timestamp > ($this->_today - 64800)) { |
| 147 | 147 | // yesterday but in the last 18 hours |
| 148 | - $time = __('yesterday') . ' ' . strftime("%H:%M", $timestamp); |
|
| 148 | + $time = __('yesterday').' '.strftime("%H:%M", $timestamp); |
|
| 149 | 149 | } else { |
| 150 | 150 | // yesterday and 18 hours and older |
| 151 | 151 | $time = strftime("%d.%m.%Y", $timestamp); |
@@ -216,10 +216,10 @@ |
||
| 216 | 216 | return; |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - $check = function ($locale) { |
|
| 220 | - $l10nViewPath = $this->viewBuilder()->getTemplatePath() . DS . $locale; |
|
| 221 | - $l10nViewFile = $l10nViewPath . DS . $this->viewBuilder()->getName() . '.ctp'; |
|
| 222 | - if (!file_exists(APP . 'Template' . DS . $l10nViewFile)) { |
|
| 219 | + $check = function($locale) { |
|
| 220 | + $l10nViewPath = $this->viewBuilder()->getTemplatePath().DS.$locale; |
|
| 221 | + $l10nViewFile = $l10nViewPath.DS.$this->viewBuilder()->getName().'.ctp'; |
|
| 222 | + if (!file_exists(APP.'Template'.DS.$l10nViewFile)) { |
|
| 223 | 223 | return false; |
| 224 | 224 | } |
| 225 | 225 | |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | use Cake\Event\Event; |
| 10 | 10 | use Cake\Http\Response; |
| 11 | 11 | use Cake\I18n\I18n; |
| 12 | -use Cake\Routing\Router; |
|
| 13 | 12 | use Saito\App\SettingsImmutable; |
| 14 | 13 | use Saito\Event\SaitoEventManager; |
| 15 | 14 | use Saito\User\CurrentUser\CurrentUser; |
@@ -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 | namespace App\Controller\Component; |
| 6 | 6 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | $ctrler = $controller->request->getParam('controller'); |
| 47 | 47 | $action = $controller->request->getParam('action'); |
| 48 | - $key = lcfirst($ctrler) . '/' . $action; |
|
| 48 | + $key = lcfirst($ctrler).'/'.$action; |
|
| 49 | 49 | $page = __d('page_titles', $key); |
| 50 | 50 | if ($key === $page) { |
| 51 | 51 | $page = ''; |
@@ -22,11 +22,11 @@ |
||
| 22 | 22 | if (!is_numeric($value)) { |
| 23 | 23 | return false; |
| 24 | 24 | } |
| 25 | - $value = (int)$value; |
|
| 25 | + $value = (int) $value; |
|
| 26 | 26 | |
| 27 | - $key = $table . $value; |
|
| 27 | + $key = $table.$value; |
|
| 28 | 28 | |
| 29 | - return static::rememberStatic($key, function () use ($value, $table) { |
|
| 29 | + return static::rememberStatic($key, function() use ($value, $table) { |
|
| 30 | 30 | $Table = TableRegistry::get($table); |
| 31 | 31 | |
| 32 | 32 | return $Table->exists(['id' => $value]); |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | */ |
| 13 | 13 | public function isLocked() |
| 14 | 14 | { |
| 15 | - return (bool)$this->get('locked'); |
|
| 15 | + return (bool) $this->get('locked'); |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | /** |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | public function isPinned() |
| 32 | 32 | { |
| 33 | - return (bool)$this->get('fixed'); |
|
| 33 | + return (bool) $this->get('fixed'); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function get(): array |
| 22 | 22 | { |
| 23 | - return $this->remember('userlist', function () { |
|
| 23 | + return $this->remember('userlist', function() { |
|
| 24 | 24 | /** @var UsersTable $users */ |
| 25 | 25 | $users = TableRegistry::get('Users'); |
| 26 | 26 | |