Skip to content

Commit 5e08ece

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.5
2 parents 3aecb58 + 8409157 commit 5e08ece

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

rector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector;
1717
use Rector\CodeQuality\Rector\FuncCall\SimplifyRegexPatternRector;
1818
use Rector\CodeQuality\Rector\FuncCall\SimplifyStrposLowerRector;
19+
use Rector\CodeQuality\Rector\FuncCall\SingleInArrayToCompareRector;
1920
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
2021
use Rector\CodeQuality\Rector\If_\CombineIfRector;
2122
use Rector\CodeQuality\Rector\If_\ShortenElseIfRector;
@@ -142,4 +143,5 @@
142143
$rectorConfig->rule(PrivatizeFinalClassPropertyRector::class);
143144
$rectorConfig->rule(CompleteDynamicPropertiesRector::class);
144145
$rectorConfig->rule(BooleanInIfConditionRuleFixerRector::class);
146+
$rectorConfig->rule(SingleInArrayToCompareRector::class);
145147
};

system/Config/BaseService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ protected static function discoverServices(string $name, array $arguments)
348348
continue;
349349
}
350350

351-
if (! in_array($classname, [Services::class], true)) {
351+
if ($classname !== Services::class) {
352352
static::$services[] = new $classname();
353353
}
354354
}

system/Exceptions/FrameworkException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static function forMissingExtension(string $extension)
6666
'The framework needs the following extension(s) installed and loaded: %s.',
6767
$extension
6868
);
69-
// @codeCoverageIgnoreEnd
69+
// @codeCoverageIgnoreEnd
7070
} else {
7171
$message = lang('Core.missingExtension', [$extension]);
7272
}

tests/system/Database/Live/GroupTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testGroupBy(): void
4040

4141
public function testHavingBy(): void
4242
{
43-
$isANSISQL = in_array($this->db->DBDriver, ['OCI8'], true);
43+
$isANSISQL = $this->db->DBDriver === 'OCI8';
4444

4545
if ($isANSISQL) {
4646
$result = $this->db->table('job')
@@ -63,7 +63,7 @@ public function testHavingBy(): void
6363

6464
public function testOrHavingBy(): void
6565
{
66-
$isANSISQL = in_array($this->db->DBDriver, ['OCI8'], true);
66+
$isANSISQL = $this->db->DBDriver === 'OCI8';
6767

6868
if ($isANSISQL) {
6969
$result = $this->db->table('user')
@@ -134,7 +134,7 @@ public function testHavingNotIn(): void
134134

135135
public function testOrHavingNotIn(): void
136136
{
137-
$isANSISQL = in_array($this->db->DBDriver, ['OCI8'], true);
137+
$isANSISQL = $this->db->DBDriver === 'OCI8';
138138

139139
if ($isANSISQL) {
140140
$result = $this->db->table('job')
@@ -207,7 +207,7 @@ public function testOrHavingLike(): void
207207

208208
public function testOrNotHavingLike(): void
209209
{
210-
$isANSISQL = in_array($this->db->DBDriver, ['OCI8'], true);
210+
$isANSISQL = $this->db->DBDriver === 'OCI8';
211211

212212
if ($isANSISQL) {
213213
$result = $this->db->table('job')
@@ -237,7 +237,7 @@ public function testOrNotHavingLike(): void
237237

238238
public function testAndHavingGroupStart(): void
239239
{
240-
$isANSISQL = in_array($this->db->DBDriver, ['OCI8'], true);
240+
$isANSISQL = $this->db->DBDriver === 'OCI8';
241241

242242
if ($isANSISQL) {
243243
$result = $this->db->table('job')
@@ -271,7 +271,7 @@ public function testAndHavingGroupStart(): void
271271

272272
public function testOrHavingGroupStart(): void
273273
{
274-
$isANSISQL = in_array($this->db->DBDriver, ['OCI8'], true);
274+
$isANSISQL = $this->db->DBDriver === 'OCI8';
275275

276276
if ($isANSISQL) {
277277
$result = $this->db->table('job')
@@ -306,7 +306,7 @@ public function testOrHavingGroupStart(): void
306306

307307
public function testNotHavingGroupStart(): void
308308
{
309-
$isANSISQL = in_array($this->db->DBDriver, ['OCI8'], true);
309+
$isANSISQL = $this->db->DBDriver === 'OCI8';
310310

311311
if ($isANSISQL) {
312312
$result = $this->db->table('job')
@@ -340,7 +340,7 @@ public function testNotHavingGroupStart(): void
340340

341341
public function testOrNotHavingGroupStart(): void
342342
{
343-
$isANSISQL = in_array($this->db->DBDriver, ['OCI8'], true);
343+
$isANSISQL = $this->db->DBDriver === 'OCI8';
344344

345345
if ($isANSISQL) {
346346
$result = $this->db->table('job')

0 commit comments

Comments
 (0)