Skip to content

Commit 17419f2

Browse files
tabunagithub-actions[bot]
authored andcommitted
Fixed code style
1 parent 7339169 commit 17419f2

File tree

10 files changed

+19
-17
lines changed

10 files changed

+19
-17
lines changed

src/Platform/Models/Role.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
class Role extends Model implements RoleInterface
1818
{
19-
use RoleAccess, Filterable, AsSource, Chartable, HasFactory;
19+
use AsSource, Chartable, Filterable, HasFactory, RoleAccess;
2020

2121
/**
2222
* @var string

src/Platform/Models/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class User extends Authenticatable implements UserInterface
2323
{
24-
use Notifiable, UserAccess, AsSource, Filterable, Chartable, HasFactory;
24+
use AsSource, Chartable, Filterable, HasFactory, Notifiable, UserAccess;
2525

2626
/**
2727
* The database table used by the model.

src/Screen/Cell.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
abstract class Cell
1515
{
16-
use Macroable, CanSee;
16+
use CanSee, Macroable;
1717

1818
/**
1919
* @var string

src/Screen/Field.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*/
3535
class Field implements Fieldable, Htmlable
3636
{
37-
use CanSee, Makeable, Conditionable, Macroable {
37+
use CanSee, Conditionable, Macroable, Makeable {
3838
Macroable::__call as macroCall;
3939
}
4040

src/Screen/Fields/Select.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,26 @@ public function fromModel($model, string $name, string $key = null): self
9191

9292
/**
9393
* @param string $enum
94-
* @return self
94+
*
9595
* @throws \ReflectionException
96+
*
97+
* @return self
9698
*/
9799
public function fromEnum(string $enum): self
98100
{
99101
$reflection = new \ReflectionEnum($enum);
100102
$options = [];
101103
foreach ($enum::cases() as $item) {
102-
$key = $reflection->isBacked()?$item->value:$item->name;
104+
$key = $reflection->isBacked() ? $item->value : $item->name;
103105
$options[$key] = __($item->name);
104106
}
105-
$this->set('options',$options);
106-
return $this->addBeforeRender(function ()use($reflection, $enum){
107+
$this->set('options', $options);
108+
109+
return $this->addBeforeRender(function () use ($reflection, $enum) {
107110
$value = [];
108111
collect($this->get('value'))->each(static function ($item) use (&$value, $reflection, $enum) {
109-
if($item instanceof $enum){
110-
$value[] = $reflection->isBacked()?$item->value:$item->name;
112+
if ($item instanceof $enum) {
113+
$value[] = $reflection->isBacked() ? $item->value : $item->name;
111114
} else {
112115
$value[] = $item;
113116
}

src/Support/Testing/MakesHttpRequestsWrapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020
class MakesHttpRequestsWrapper
2121
{
22-
use MakesHttpRequests, InteractsWithExceptionHandling, InteractsWithAuthentication, InteractsWithSession;
22+
use InteractsWithAuthentication, InteractsWithExceptionHandling, InteractsWithSession, MakesHttpRequests;
2323

2424
/**
2525
* The application instance

stubs/app/Orchid/Presenters/UserPresenter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Orchid\Screen\Contracts\Searchable;
1111
use Orchid\Support\Presenter;
1212

13-
class UserPresenter extends Presenter implements Searchable, Personable
13+
class UserPresenter extends Presenter implements Personable, Searchable
1414
{
1515
/**
1616
* Returns the label for this presenter, which is used in the UI to identify it.

tests/App/Presenters/UserPresenter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Orchid\Screen\Contracts\Searchable;
1010
use Orchid\Support\Presenter;
1111

12-
class UserPresenter extends Presenter implements Searchable, Personable
12+
class UserPresenter extends Presenter implements Personable, Searchable
1313
{
1414
public function label(): string
1515
{

tests/App/RouteSolving.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Illuminate\Contracts\Routing\UrlRoutable;
66
use Stringable;
77

8-
class RouteSolving implements UrlRoutable, Stringable
8+
class RouteSolving implements Stringable, UrlRoutable
99
{
1010
public function resolveRouteBinding($value, $field = null)
1111
{

tests/Unit/Screen/Fields/SelectTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,16 +219,15 @@ public function testMultiple(): void
219219
$this->assertStringNotContainsString('value="third" selected', $view);
220220
}
221221

222-
223222
public function testMultipleFromEnum(): void
224223
{
225224
$select = Select::make('choice')
226225
->multiple()
227226
->value([
228227
Color::INFO,
229-
Color::BASIC
228+
Color::BASIC,
230229
])
231-
->fromEnum(Color::class);
230+
->fromEnum(Color::class);
232231

233232
$view = self::minifyRenderField($select);
234233

0 commit comments

Comments
 (0)