Skip to content

Commit f80e95e

Browse files
authored
Update LaravelSetProvider with missing sets (#286)
1 parent 4778bcd commit f80e95e

File tree

1 file changed

+38
-28
lines changed

1 file changed

+38
-28
lines changed

src/Set/LaravelSetProvider.php

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,27 @@ final class LaravelSetProvider implements SetProviderInterface
1515
* @var string[]
1616
*/
1717
private const LARAVEL_FIVE = [
18-
LaravelSetList::LARAVEL_50,
19-
LaravelSetList::LARAVEL_51,
20-
LaravelSetList::LARAVEL_52,
21-
LaravelSetList::LARAVEL_53,
22-
LaravelSetList::LARAVEL_54,
23-
LaravelSetList::LARAVEL_55,
24-
LaravelSetList::LARAVEL_56,
25-
LaravelSetList::LARAVEL_57,
2618
LaravelSetList::LARAVEL_58,
19+
LaravelSetList::LARAVEL_57,
20+
LaravelSetList::LARAVEL_56,
21+
LaravelSetList::LARAVEL_55,
22+
LaravelSetList::LARAVEL_54,
23+
LaravelSetList::LARAVEL_53,
24+
LaravelSetList::LARAVEL_52,
25+
LaravelSetList::LARAVEL_51,
26+
LaravelSetList::LARAVEL_50,
2727
];
2828

2929
/**
3030
* @var string[]
3131
*/
3232
private const LARAVEL_POST_FIVE = [
33-
LaravelSetList::LARAVEL_60,
34-
LaravelSetList::LARAVEL_70,
35-
LaravelSetList::LARAVEL_80,
36-
LaravelSetList::LARAVEL_90,
37-
LaravelSetList::LARAVEL_100,
3833
LaravelSetList::LARAVEL_110,
34+
LaravelSetList::LARAVEL_100,
35+
LaravelSetList::LARAVEL_90,
36+
LaravelSetList::LARAVEL_80,
37+
LaravelSetList::LARAVEL_70,
38+
LaravelSetList::LARAVEL_60,
3939
];
4040

4141
/**
@@ -46,13 +46,18 @@ public function provide(): array
4646
return [
4747
new Set(
4848
self::GROUP_NAME,
49-
'array/str func to static calls',
50-
LaravelSetList::ARRAY_STR_FUNCTIONS_TO_STATIC_CALL
49+
'Code quality',
50+
LaravelSetList::LARAVEL_CODE_QUALITY
5151
),
5252
new Set(
5353
self::GROUP_NAME,
54-
'Code quality',
55-
LaravelSetList::LARAVEL_CODE_QUALITY
54+
'Collection improvements and simplifications',
55+
LaravelSetList::LARAVEL_COLLECTION,
56+
),
57+
new Set(
58+
self::GROUP_NAME,
59+
'Container array access to method calls',
60+
LaravelSetList::LARAVEL_ARRAYACCESS_TO_METHOD_CALL,
5661
),
5762
new Set(
5863
self::GROUP_NAME,
@@ -61,22 +66,27 @@ public function provide(): array
6166
),
6267
new Set(
6368
self::GROUP_NAME,
64-
'Replaces If statements with helpers',
65-
LaravelSetList::LARAVEL_IF_HELPERS,
69+
'Rename Aliases to FQN Classes',
70+
LaravelSetList::LARAVEL_FACADE_ALIASES_TO_FULL_NAMES,
6671
),
6772
new Set(
6873
self::GROUP_NAME,
69-
'Replace facades with service injection',
70-
LaravelSetList::LARAVEL_STATIC_TO_INJECTION,
74+
'Replace array/str functions with static calls',
75+
LaravelSetList::LARAVEL_ARRAY_STR_FUNCTION_TO_STATIC_CALL
7176
),
7277
new Set(
7378
self::GROUP_NAME,
74-
'Rename Alias to FQN Classes',
75-
LaravelSetList::LARAVEL_FACADE_ALIASES_TO_FULL_NAMES,
79+
'Replace If statements with helpers',
80+
LaravelSetList::LARAVEL_IF_HELPERS,
7681
),
7782
new Set(
7883
self::GROUP_NAME,
79-
'Replace Magic Methods to Query Builder',
84+
'Replace facades with service injection',
85+
LaravelSetList::LARAVEL_STATIC_TO_INJECTION,
86+
),
87+
new Set(
88+
self::GROUP_NAME,
89+
'Replace Magic Methods with Query Builder',
8090
LaravelSetList::LARAVEL_ELOQUENT_MAGIC_METHOD_TO_QUERY_BUILDER,
8191
),
8292
new Set(
@@ -100,18 +110,18 @@ private function getLaravelVersions(): array
100110
{
101111
$versions = [];
102112

103-
foreach (self::LARAVEL_FIVE as $index => $version) {
113+
foreach (self::LARAVEL_POST_FIVE as $index => $version) {
104114
$versions[] = new Set(
105115
self::GROUP_NAME,
106-
'Laravel Framework 5.' . $index,
116+
'Laravel Framework ' . ($index + 6) . '.0',
107117
$version,
108118
);
109119
}
110120

111-
foreach (self::LARAVEL_POST_FIVE as $index => $version) {
121+
foreach (self::LARAVEL_FIVE as $index => $version) {
112122
$versions[] = new Set(
113123
self::GROUP_NAME,
114-
'Laravel Framework ' . ($index + 6) . '.0',
124+
'Laravel Framework 5.' . $index,
115125
$version,
116126
);
117127
}

0 commit comments

Comments
 (0)