Skip to content

Commit 9800063

Browse files
committed
fix rector and CS
1 parent ba13ae9 commit 9800063

13 files changed

Lines changed: 85 additions & 26 deletions

‎composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"illuminate": "bin/cake illuminate code",
6666
"phpstan": "phpstan analyse",
6767
"phpstan-baseline": "phpstan --generate-baseline",
68-
"rector-setup": "cp composer.json composer.backup && composer require --dev rector/rector:\"~2.3.1\" && mv composer.backup composer.json",
68+
"rector-setup": "cp composer.json composer.backup && composer require --dev rector/rector:\"~2.6.1\" && mv composer.backup composer.json",
6969
"rector-check": "vendor/bin/rector process --dry-run",
7070
"rector-fix": "vendor/bin/rector process"
7171
}

‎composer.lock‎

Lines changed: 61 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎config/app.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
use Cake\Cache\Engine\FileEngine;
46
use Cake\Database\Connection;
57
use Cake\Database\Driver\Mysql;
@@ -13,7 +15,7 @@
1315
FILTER_VALIDATE_BOOL,
1416
);
1517
$trustedProxyIps = array_values(array_filter(array_map(
16-
'trim',
18+
trim(...),
1719
explode(',', (string)env('TRUSTED_PROXY_IPS', '172.17.0.1')),
1820
)));
1921

‎config/app_local.example.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
use function Cake\Core\env;
46

57
/*

‎config/paths.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<?php
2+
declare(strict_types=1);
3+
24
/**
35
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
46
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

‎config/plugins.php‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<?php
2+
3+
declare(strict_types=1);
4+
25
/**
36
* Plugin configuration.
47
*
@@ -18,15 +21,14 @@
1821
* @since 5.0.0
1922
* @license https://opensource.org/licenses/mit-license.php MIT License
2023
*/
21-
22-
/*
23-
* List of plugins to load in the form `PluginName` => `[configuration options]`.
24-
*
25-
* Available options:
26-
* - onlyDebug: Load the plugin only in debug mode. Default false.
27-
* - onlyCli: Load the plugin only in CLI mode. Default false.
28-
* - optional: Do not throw an exception if the plugin is not found. Default false.
29-
*/
24+
/*
25+
* List of plugins to load in the form `PluginName` => `[configuration options]`.
26+
*
27+
* Available options:
28+
* - onlyDebug: Load the plugin only in debug mode. Default false.
29+
* - onlyCli: Load the plugin only in CLI mode. Default false.
30+
* - optional: Do not throw an exception if the plugin is not found. Default false.
31+
*/
3032
return [
3133
'DebugKit' => ['onlyDebug' => true],
3234
'Bake' => ['onlyCli' => true, 'optional' => true],

‎config/routes.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<?php
2+
declare(strict_types=1);
3+
24
/**
35
* Routes configuration.
46
*

‎rector.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
CompactToVariablesRector::class,
6161
SplitDoubleAssignRector::class,
6262
ChangeOrIfContinueToMultiContinueRector::class,
63-
ExplicitBoolCompareRector::class,
6463
NewlineBeforeNewAssignSetRector::class,
6564
DisallowedEmptyRuleFixerRector::class,
6665
RemoveUselessParamTagRector::class,

‎src/Command/SyncPackagesCommand.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ private function getDataForPackage(string $packageName): array
270270
}
271271

272272
/**
273-
* @return \Cake\I18n\Date|null
273+
* Extract the release date
274274
*/
275275
private function extractReleaseDate(?Version $version): ?Date
276276
{

‎src/Controller/PagesController.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public function initialize(): void
4747
* Displays a view
4848
*
4949
* @param string ...$path Path segments.
50-
* @return \Cake\Http\Response|null
5150
* @throws \Cake\Http\Exception\ForbiddenException When a directory traversal attempt.
5251
* @throws \Cake\View\Exception\MissingTemplateException When the view file could not
5352
* be found and in debug mode.

0 commit comments

Comments
 (0)