Skip to content

Commit 689fe8b

Browse files
committed
undo splitting double assignments
1 parent f9647ac commit 689fe8b

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

rector.php

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

33
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
4+
use Rector\CodingStyle\Rector\Assign\SplitDoubleAssignRector;
45
use Rector\CodingStyle\Rector\Closure\StaticClosureRector;
56
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
67
use Rector\CodingStyle\Rector\If_\NullableCompareToNullRector;
@@ -30,4 +31,5 @@
3031
NullableCompareToNullRector::class,
3132
EncapsedStringsToSprintfRector::class,
3233
StaticClosureRector::class,
34+
SplitDoubleAssignRector::class,
3335
]);

src/Fakes/FakeModelsCommand.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ public function getPropertiesFromTable($model): void
7070
$column_name = $column->name;
7171

7272
if (in_array($column_name, $model->getDates(), true)) {
73-
$get_type = \Illuminate\Support\Carbon::class;
74-
$set_type = \Illuminate\Support\Carbon::class;
73+
$get_type = $set_type = \Illuminate\Support\Carbon::class;
7574
} else {
7675
switch ($column->type) {
7776
case SchemaColumn::TYPE_STRING:
@@ -89,27 +88,23 @@ public function getPropertiesFromTable($model): void
8988
$get_type = '0|1';
9089
break;
9190
default:
92-
$get_type = 'bool';
93-
$set_type = 'bool';
91+
$get_type = $set_type = 'bool';
9492
break;
9593
}
9694

9795
break;
9896

9997
case SchemaColumn::TYPE_ENUM:
10098
if (!$column->options) {
101-
$get_type = 'string';
102-
$set_type = 'string';
99+
$get_type = $set_type = 'string';
103100
} else {
104-
$get_type = "'" . implode("'|'", $column->options) . "'";
105-
$set_type = "'" . implode("'|'", $column->options) . "'";
101+
$get_type = $set_type = "'" . implode("'|'", $column->options) . "'";
106102
}
107103

108104
break;
109105

110106
default:
111-
$get_type = SchemaColumn::TYPE_MIXED;
112-
$set_type = SchemaColumn::TYPE_MIXED;
107+
$get_type = $set_type = SchemaColumn::TYPE_MIXED;
113108
break;
114109
}
115110
}

src/Providers/ApplicationProvider.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ public static function getAppFullyQualifiedClassName(): string
7676
/**
7777
* Overrides {@see \Orchestra\Testbench\Concerns\CreatesApplication::resolveApplicationBootstrappers}
7878
* Resolve application bootstrapper.
79-
*
80-
* @param LaravelApplication $app
8179
*/
82-
protected function resolveApplicationBootstrappers($app): void
80+
protected function resolveApplicationBootstrappers(LaravelApplication $app): void
8381
{
8482
// we want to keep the default psalm exception handler, otherwise the Laravel one will always return exit codes
8583
// of 0

0 commit comments

Comments
 (0)