@@ -116,9 +116,9 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | $memoryLimit = ini_get('memory_limit'); |
| 118 | 118 | $requiredMemory = '384M'; |
| 119 | - if ((substr($memoryLimit, -1) === 'M' && (int)$memoryLimit < (int)$requiredMemory) |
|
| 120 | - || (substr($memoryLimit, -1) === 'K' && (int)$memoryLimit < (int)$requiredMemory * 1024) |
|
| 121 | - || (ctype_digit($memoryLimit) && (int)$memoryLimit < (int)$requiredMemory * 1024 * 1024) |
|
| 119 | + if ((substr($memoryLimit, -1) === 'M' && (int) $memoryLimit < (int) $requiredMemory) |
|
| 120 | + || (substr($memoryLimit, -1) === 'K' && (int) $memoryLimit < (int) $requiredMemory*1024) |
|
| 121 | + || (ctype_digit($memoryLimit) && (int) $memoryLimit < (int) $requiredMemory*1024*1024) |
|
| 122 | 122 | ) { |
| 123 | 123 | ini_set('memory_limit', $requiredMemory); |
| 124 | 124 | } |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | |
| 263 | 263 | $pathCoverage = false; |
| 264 | 264 | if (isset($settings['coverage']['path_coverage'])) { |
| 265 | - $pathCoverage = (bool)$settings['coverage']['path_coverage']; |
|
| 265 | + $pathCoverage = (bool) $settings['coverage']['path_coverage']; |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | if (class_exists(Selector::class)) { |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | return __c3_exit(); |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | - list($codeCoverage, ) = __c3_factory($completeReport); |
|
| 338 | + list($codeCoverage,) = __c3_factory($completeReport); |
|
| 339 | 339 | |
| 340 | 340 | switch ($route) { |
| 341 | 341 | case 'html': |
@@ -382,11 +382,11 @@ discard block |
||
| 382 | 382 | return __c3_exit(); |
| 383 | 383 | } |
| 384 | 384 | } else { |
| 385 | - list($codeCoverage, ) = __c3_factory(null); |
|
| 385 | + list($codeCoverage,) = __c3_factory(null); |
|
| 386 | 386 | $codeCoverage->start(C3_CODECOVERAGE_TESTNAME); |
| 387 | 387 | if (!array_key_exists('HTTP_X_CODECEPTION_CODECOVERAGE_DEBUG', $_SERVER)) { |
| 388 | 388 | register_shutdown_function( |
| 389 | - function () use ($codeCoverage, $currentReport) { |
|
| 389 | + function() use ($codeCoverage, $currentReport) { |
|
| 390 | 390 | $codeCoverage->stop(); |
| 391 | 391 | if (!file_exists(dirname($currentReport))) { // verify directory exists |
| 392 | 392 | if (!mkdir(dirname($currentReport), 0777, true)) { |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | * |
| 72 | 72 | * @return Response|string |
| 73 | 73 | */ |
| 74 | - public function actionLogin(): Response|string |
|
| 74 | + public function actionLogin(): Response | string |
|
| 75 | 75 | { |
| 76 | 76 | if (!Yii::$app->user->isGuest) { |
| 77 | 77 | return $this->goHome(); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * |
| 106 | 106 | * @return Response|string |
| 107 | 107 | */ |
| 108 | - public function actionContact(): Response|string |
|
| 108 | + public function actionContact(): Response | string |
|
| 109 | 109 | { |
| 110 | 110 | $model = new ContactForm(); |
| 111 | 111 | if ($model->load(Yii::$app->request->post()) && $model->contact(Yii::$app->params['adminEmail'])) { |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | /** |
| 36 | 36 | * {@inheritdoc} |
| 37 | 37 | */ |
| 38 | - public static function findIdentity($id): IdentityInterface|null |
|
| 38 | + public static function findIdentity($id): IdentityInterface | null |
|
| 39 | 39 | { |
| 40 | 40 | return isset(self::$users[$id]) ? new static(self::$users[$id]) : null; |
| 41 | 41 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | /** |
| 44 | 44 | * {@inheritdoc} |
| 45 | 45 | */ |
| 46 | - public static function findIdentityByAccessToken($token, $type = null): IdentityInterface|null |
|
| 46 | + public static function findIdentityByAccessToken($token, $type = null): IdentityInterface | null |
|
| 47 | 47 | { |
| 48 | 48 | foreach (self::$users as $user) { |
| 49 | 49 | if ($user['accessToken'] === $token) { |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | * |
| 62 | 62 | * @return static|null the user object |
| 63 | 63 | */ |
| 64 | - public static function findByUsername($username): static|null |
|
| 64 | + public static function findByUsername($username): static | null |
|
| 65 | 65 | { |
| 66 | 66 | foreach (self::$users as $user) { |
| 67 | 67 | if (strcasecmp((string) $user['username'], $username) === 0) { |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | public string $password = ''; |
| 20 | 20 | public bool $rememberMe = true; |
| 21 | 21 | |
| 22 | - private bool|null|User $user = false; |
|
| 22 | + private bool | null | User $user = false; |
|
| 23 | 23 | |
| 24 | 24 | |
| 25 | 25 | /** |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | * |
| 74 | 74 | * @return User|null the user identity |
| 75 | 75 | */ |
| 76 | - public function getUser(): User|null |
|
| 76 | + public function getUser(): User | null |
|
| 77 | 77 | { |
| 78 | 78 | if ($this->user === false) { |
| 79 | 79 | $this->user = User::findByUsername($this->username); |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | class LoginFormTest extends \Codeception\Test\Unit |
| 8 | 8 | { |
| 9 | - private \app\models\LoginForm|null $model = null; |
|
| 9 | + private \app\models\LoginForm | null $model = null; |
|
| 10 | 10 | |
| 11 | 11 | protected function _after() |
| 12 | 12 | { |