-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit 9bc8999
Switch to phpcs and upgrade codebase (#2596)
To be consistent with other MongoDB PHP projects, we use phpcs to analyze and fix the code style.
Summary of changes:
- added "declare(strict_types=1);" to all file headers
- added "use function" for all functions used in each file (performance gain for functions with specific opcode compilation)
- use of short closures
- remove `@var` annotations in tests, replaced by `assertInstanceOf` or `assert`
- Use early exit when appropriate, but disable the rule
- Remove `@param` & `@return` phpdoc when duplicate of native types1 parent 5394a8d commit 9bc8999
File tree
90 files changed
+2101
-1901
lines changed- .github/workflows
- src
- Auth
- Concerns
- Eloquent
- Casts
- Helpers
- Query
- Queue
- Failed
- Relations
- Schema
- Validation
- tests
- Casts
- Eloquent
- Models
- Query
- Seeder
- config
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
90 files changed
+2101
-1901
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | - | ||
11 | - | ||
12 | - | ||
13 | - | ||
14 | - | ||
15 | - | ||
16 | - | ||
17 | - | ||
18 | - | ||
19 | - | ||
20 | - | ||
21 | - | ||
22 | - | ||
23 | - | ||
24 | - | ||
25 | - | ||
26 | - | ||
27 | - | ||
28 | - | ||
29 | - | ||
30 | - | ||
31 | 10 | | |
32 | 11 | | |
33 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | ||
25 | + | ||
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 | + | ||
52 | + | ||
53 | + | ||
54 | + | ||
55 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | - | ||
8 | - | ||
7 | + | ||
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | - | ||
36 | + | ||
37 | + | ||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | - | ||
60 | + | ||
61 | + | ||
62 | + | ||
63 | + | ||
64 | + | ||
65 | + | ||
60 | 66 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | + | ||
4 | + | ||
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
13 | + | ||
14 | + | ||
15 | + | ||
11 | 16 | | |
12 | 17 | | |
13 | - | ||
14 | - | ||
15 | - | ||
18 | + | ||
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
25 | - | ||
26 | - | ||
27 | - | ||
28 | + | ||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | - | ||
36 | - | ||
37 | - | ||
36 | + | ||
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | - | ||
52 | + | ||
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| |||
0 commit comments