Skip to content

Commit ea95f04

Browse files
committed
re-run rector
1 parent bd0b878 commit ea95f04

File tree

4 files changed

+5
-15
lines changed

4 files changed

+5
-15
lines changed

rector.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@
33
declare(strict_types=1);
44

55
use Rector\Config\RectorConfig;
6-
use Rector\Php81\Rector\Array_\FirstClassCallableRector;
7-
use Rector\Strict\Rector\BooleanNot\BooleanInBooleanNotRuleFixerRector;
6+
use Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector;
87

98
return RectorConfig::configure()
109
->withPhpSets()
1110
->withPreparedSets(
11+
deadCode: true,
1212
codeQuality: true,
1313
codingStyle: true,
14-
deadCode: true,
15-
naming: true,
16-
privatization: true,
1714
typeDeclarations: true,
18-
strictBooleans: true
15+
privatization: true,
16+
naming: true,
1917
)
2018
->withPaths([__DIR__ . '/config', __DIR__ . '/src', __DIR__ . '/spec'])
2119
->withRootFiles()
@@ -24,8 +22,5 @@
2422
__DIR__ . '/src/Controller',
2523
__DIR__ . '/src/Command/Preview',
2624
__DIR__ . '/src/Middleware/Routed/Preview',
27-
FirstClassCallableRector::class,
28-
BooleanInBooleanNotRuleFixerRector::class => [
29-
__DIR__ . '/src/Handler/Logging.php',
30-
],
25+
ArrayToFirstClassCallableRector::class,
3126
]);

spec/Handler/LoggingSpec.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999

100100
$this->dbWriter = Double::instance(['extends' => Db::class, 'methods' => '__construct']);
101101
$reflectionProperty = new ReflectionProperty($this->dbWriter, 'db');
102-
$reflectionProperty->setAccessible(true);
103102
$reflectionProperty->setValue($this->dbWriter, Double::instance(['implements' => AdapterInterface::class]));
104103

105104
$this->logger->addWriter($this->dbWriter);

spec/Handler/Writer/Checker/DbSpec.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
$this->dbWriter = Double::instance(['extends' => DbWriter::class, 'methods' => '__construct']);
2020
$reflectionProperty = new ReflectionProperty($this->dbWriter, 'db');
21-
$reflectionProperty->setAccessible(true);
2221
$reflectionProperty->setValue($this->dbWriter, Double::instance(['implements' => AdapterInterface::class, 'methods' => '__construct']));
2322

2423
$this->configLoggingSettings = [

spec/Handler/Writer/MailSpec.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
);
6464

6565
$r = new ReflectionProperty($this->writer, 'eventsToMail');
66-
$r->setAccessible(true);
6766
$r->setValue($writer, ["timestamp" => "2017-02-25T02:08:46+07:00"]);
6867

6968
allow($this->transport)->toReceive('send');
@@ -97,7 +96,6 @@
9796
);
9897

9998
$r = new ReflectionProperty($this->writer, 'eventsToMail');
100-
$r->setAccessible(true);
10199
$r->setValue($writer, ["timestamp" => "2017-02-25T02:08:46+07:00"]);
102100

103101
allow($this->transport)->toReceive('send');
@@ -111,7 +109,6 @@
111109
it('transport->send() trigger error', function (): void {
112110

113111
$r = new ReflectionProperty($this->writer, 'eventsToMail');
114-
$r->setAccessible(true);
115112
$r->setValue($this->writer, ["timestamp" => "2017-02-25T02:08:46+07:00"]);
116113

117114
allow($this->transport)->toReceive('send')->andRun(function (): never { throw new Exception('root'); });

0 commit comments

Comments
 (0)