Skip to content

chore(deps-dev): update rector/rector requirement from 0.13.9 to 0.13.10 #6338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"phpstan/phpstan": "^1.7.1",
"phpunit/phpunit": "^9.1",
"predis/predis": "^1.1 || ^2.0",
"rector/rector": "0.13.9"
"rector/rector": "0.13.10"
},
"suggest": {
"ext-fileinfo": "Improves mime type detection for files"
Expand Down
10 changes: 0 additions & 10 deletions phpstan-baseline.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ parameters:
count: 1
path: system/Cache/Handlers/MemcachedHandler.php

-
message: "#^Variable \\$config in empty\\(\\) always exists and is not falsy\\.$#"
count: 1
path: system/Cache/Handlers/MemcachedHandler.php

-
message: "#^Variable \\$data might not be defined\\.$#"
count: 1
Expand All @@ -90,11 +85,6 @@ parameters:
count: 1
path: system/Cache/Handlers/RedisHandler.php

-
message: "#^Variable \\$config in empty\\(\\) always exists and is not falsy\\.$#"
count: 1
path: system/Cache/Handlers/RedisHandler.php

-
message: "#^Call to an undefined method CodeIgniter\\\\HTTP\\\\Request\\:\\:getPost\\(\\)\\.$#"
count: 1
Expand Down
11 changes: 5 additions & 6 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector;
use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector;
use Rector\DeadCode\Rector\MethodCall\RemoveEmptyMethodCallRector;
use Rector\DeadCode\Rector\Plus\RemoveDeadZeroAndOneOperationRector;
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector;
use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector;
Expand Down Expand Up @@ -132,11 +131,11 @@
__DIR__ . '/tests/system/Email/EmailTest.php',
],

// buggy on read based on @var on property
RemoveAlwaysTrueIfConditionRector::class,

// buggy on string * int
RemoveDeadZeroAndOneOperationRector::class,
// buggy on read based on @var on property on Trait
RemoveAlwaysTrueIfConditionRector::class => [
'**Trait.php',
__DIR__ . '/system/Test/ControllerTester.php',
],
]);

// auto import fully qualified class names
Expand Down
4 changes: 1 addition & 3 deletions system/Autoloader/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ public function register()

// Load our non-class files
foreach ($this->files as $file) {
if (is_string($file)) {
$this->includeFile($file);
}
$this->includeFile($file);
}
}

Expand Down
4 changes: 1 addition & 3 deletions system/Cache/Handlers/MemcachedHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ public function __construct(Cache $config)
{
$this->prefix = $config->prefix;

if (! empty($config)) {
$this->config = array_merge($this->config, $config->memcached);
}
$this->config = array_merge($this->config, $config->memcached);
}

/**
Expand Down
4 changes: 1 addition & 3 deletions system/Cache/Handlers/RedisHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ public function __construct(Cache $config)
{
$this->prefix = $config->prefix;

if (! empty($config)) {
$this->config = array_merge($this->config, $config->redis);
}
$this->config = array_merge($this->config, $config->redis);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion system/Database/Forge.php
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ public function modifyColumn(string $table, $field): bool
return false;
}

if ($sqls !== null) {
if (is_array($sqls)) {
foreach ($sqls as $sql) {
if ($this->db->query($sql) === false) {
return false;
Expand Down
6 changes: 2 additions & 4 deletions system/Helpers/form_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,8 @@ function form_open(string $action = '', $attributes = [], array $hidden = []): s
$form .= csrf_field($csrfId ?? null);
}

if (is_array($hidden)) {
foreach ($hidden as $name => $value) {
$form .= form_hidden($name, $value);
}
foreach ($hidden as $name => $value) {
$form .= form_hidden($name, $value);
}

return $form;
Expand Down