Commit 2afd74c
committed
Use constructor property promotion in module send friend graph ql
Replace allmost all properties with constructor property promotion in module send friend graph ql: https://stitcher.io/blog/constructor-promotion-in-php-8
Readable code
* Make Magento less complex by removing properties which take up a lot of lines.
* Imported all classes to make code more readable.
I think the code would be a lot cleaner if all modules start using constructor promotions, since of 2.4.6 php 7.4 is dropped we can now make use of it. So let's start on it right now.1 parent aab3ee6 commit 2afd74c
File tree
5 files changed
+19
-69
lines changed- app/code/Magento/SendFriendGraphQl
- Model
- Provider
- Resolver
- SendFriend
5 files changed
+19
-69
lines changedLines changed: 2 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 21 | | |
28 | 22 | | |
29 | 23 | | |
30 | 24 | | |
31 | 25 | | |
32 | | - | |
33 | | - | |
| 26 | + | |
| 27 | + | |
34 | 28 | | |
35 | | - | |
36 | | - | |
37 | 29 | | |
38 | 30 | | |
39 | 31 | | |
| |||
Lines changed: 2 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 24 | | |
35 | 25 | | |
36 | 26 | | |
37 | 27 | | |
38 | 28 | | |
39 | | - | |
40 | | - | |
| 29 | + | |
| 30 | + | |
41 | 31 | | |
42 | | - | |
43 | | - | |
44 | 32 | | |
45 | 33 | | |
46 | 34 | | |
| |||
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 20 | | |
26 | 21 | | |
27 | 22 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
31 | 26 | | |
32 | 27 | | |
33 | 28 | | |
| |||
Lines changed: 7 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 27 | | |
52 | 28 | | |
53 | 29 | | |
| |||
57 | 33 | | |
58 | 34 | | |
59 | 35 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
65 | 41 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 42 | | |
72 | 43 | | |
73 | 44 | | |
| |||
78 | 49 | | |
79 | 50 | | |
80 | 51 | | |
81 | | - | |
| 52 | + | |
82 | 53 | | |
83 | 54 | | |
84 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments