This repository was archived by the owner on Jan 27, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +39
-18
lines changed Expand file tree Collapse file tree 6 files changed +39
-18
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ push :
3
+
4
+ jobs :
5
+ lint :
6
+ name : " Lint"
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - name : Checkout code
10
+ uses : actions/checkout@v3
11
+
12
+ - name : " Laravel Pint"
13
+
14
+ with :
15
+ preset : laravel
16
+ pintVersion : 1.13.1
17
+
18
+ - name : Commit changes to GitHub
19
+ uses : stefanzweifel/git-auto-commit-action@v4
20
+ with :
21
+ commit_message : " [auto commit] Linting"
Original file line number Diff line number Diff line change 9
9
|
10
10
| So called synthesizers allow to add custom types to Livewire, which can
11
11
| can be used to make Livewire aware of Statamic classes that you want
12
- | to work with, as it might make things easier.
12
+ | to work with, as it might make things easier.
13
13
|
14
14
| It's recommended to remove or uncomment those synthesizers that are
15
- | not used in your application, to avoid overhead by loading those.
15
+ | not used in your application, to avoid overhead by loading those.
16
16
|
17
17
| This features is experimental. It's ment to be tested and to played
18
18
| with. As long as it is experimental, it can be changed and removed
27
27
'classes ' => [
28
28
\Jonassiewertsen \Livewire \Synthesizers \EntryCollectionSynthesizer::class,
29
29
\Jonassiewertsen \Livewire \Synthesizers \EntrySynthesizer::class,
30
- ]
31
- ]
32
- ];
30
+ ],
31
+ ],
32
+ ];
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ public function boot(): void
17
17
{
18
18
parent ::boot ();
19
19
20
- $ this ->mergeConfigFrom (__DIR__ . '/../config/config.php ' , 'statamic-livewire ' );
20
+ $ this ->mergeConfigFrom (__DIR__ . '/../config/config.php ' , 'statamic-livewire ' );
21
21
22
22
if ($ this ->app ->runningInConsole ()) {
23
23
$ this ->publishes ([
24
- __DIR__ . '/../config/config.php ' => config_path ('statamic-livewire.php ' ),
24
+ __DIR__ . '/../config/config.php ' => config_path ('statamic-livewire.php ' ),
25
25
], 'statamic-livewire ' );
26
26
}
27
27
Original file line number Diff line number Diff line change 9
9
class EntryCollectionSynthesizer extends Synth
10
10
{
11
11
public static $ key = 'entry-collection ' ;
12
-
12
+
13
13
public static function match ($ target )
14
14
{
15
15
return $ target instanceof StatamicEntryCollection;
16
16
}
17
-
17
+
18
18
public function dehydrate ($ target )
19
19
{
20
20
$ data = [];
@@ -29,9 +29,9 @@ public function dehydrate($target)
29
29
];
30
30
}
31
31
32
- return [ $ data , [] ];
32
+ return [$ data , []];
33
33
}
34
-
34
+
35
35
public function hydrate ($ values )
36
36
{
37
37
$ items = [];
@@ -49,6 +49,6 @@ public function hydrate($values)
49
49
$ items [] = $ entry ;
50
50
}
51
51
52
- return New StatamicEntryCollection ($ items );
52
+ return new StatamicEntryCollection ($ items );
53
53
}
54
54
}
Original file line number Diff line number Diff line change 9
9
class EntrySynthesizer extends Synth
10
10
{
11
11
public static $ key = 'entry-collection ' ;
12
-
12
+
13
13
public static function match ($ target )
14
14
{
15
15
return $ target instanceof StatamicEntry;
16
16
}
17
-
17
+
18
18
public function dehydrate ($ entry )
19
19
{
20
- return [
20
+ return [
21
21
[
22
22
'collection ' => $ entry ->collection ()->handle () ?? null ,
23
23
'data ' => $ entry ->data ()->all (),
24
24
'date ' => $ entry ->collection ()->dated () ? $ entry ->date () : null ,
25
25
'id ' => $ entry ->id (),
26
26
'slug ' => $ entry ->slug () ?? null ,
27
- ], [] ];
27
+ ], []];
28
28
}
29
-
29
+
30
30
public function hydrate ($ value )
31
31
{
32
32
$ entry = Entry::make ()
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public function this(): string
46
46
{
47
47
$ instanceId = $ this ->context ['__livewire ' ]->getId ();
48
48
49
- if (!count ($ this ->params )) {
49
+ if (! count ($ this ->params )) {
50
50
return "window.Livewire.find(' {$ instanceId }') " ;
51
51
}
52
52
You can’t perform that action at this time.
0 commit comments