File tree Expand file tree Collapse file tree 2 files changed +28
-28
lines changed
src/Standards/Squiz/Tests/WhiteSpace Expand file tree Collapse file tree 2 files changed +28
-28
lines changed Original file line number Diff line number Diff line change @@ -81,23 +81,23 @@ class MyOtherClass
81
81
$ varS ,
82
82
$ varT ,
83
83
$ varU ;
84
- }
85
84
86
- // Issue #3188 - static as return type.
87
- public static function fCreate ($ attributes = []): static
88
- {
89
- return static ::factory ()->create ($ attributes );
90
- }
85
+ // Issue #3188 - static as return type.
86
+ public static function staticAsReturnType ($ attributes = []): static
87
+ {
88
+ return static ::factory ()->create ($ attributes );
89
+ }
91
90
92
- public static function fCreate ($ attributes = []): ?static
93
- {
94
- return static ::factory ()->create ($ attributes );
95
- }
91
+ public static function nullableStaticReturnType ($ attributes = []): ?static
92
+ {
93
+ return static ::factory ()->create ($ attributes );
94
+ }
96
95
97
- // Also account for static used within union types.
98
- public function staticLast ($ attributes = []): object |static {}
99
- public function staticMiddle (): string |static |object {}
100
- public function staticFirst (): static |object {}
96
+ // Also account for static used within union types.
97
+ public function staticLast ($ attributes = []): object |static {}
98
+ public function staticMiddle (): string |static |object {}
99
+ public function staticFirst (): static |object {}
100
+ }
101
101
102
102
// Ensure that static as a scope keyword when preceeded by a colon which is not for a type declaration is still handled.
103
103
$ callback = $ cond ? get_fn_name () : static function ($ a ) { return $ a * 10 ; };
Original file line number Diff line number Diff line change @@ -76,23 +76,23 @@ class MyOtherClass
76
76
$varS,
77
77
$varT,
78
78
$varU;
79
- }
80
79
81
- // Issue #3188 - static as return type.
82
- public static function fCreate ($attributes = []): static
83
- {
84
- return static::factory()->create($attributes);
85
- }
80
+ // Issue #3188 - static as return type.
81
+ public static function staticAsReturnType ($attributes = []): static
82
+ {
83
+ return static::factory()->create($attributes);
84
+ }
86
85
87
- public static function fCreate ($attributes = []): ?static
88
- {
89
- return static::factory()->create($attributes);
90
- }
86
+ public static function nullableStaticReturnType ($attributes = []): ?static
87
+ {
88
+ return static::factory()->create($attributes);
89
+ }
91
90
92
- // Also account for static used within union types.
93
- public function staticLast($attributes = []): object|static {}
94
- public function staticMiddle(): string|static|object {}
95
- public function staticFirst(): static|object {}
91
+ // Also account for static used within union types.
92
+ public function staticLast($attributes = []): object|static {}
93
+ public function staticMiddle(): string|static|object {}
94
+ public function staticFirst(): static|object {}
95
+ }
96
96
97
97
// Ensure that static as a scope keyword when preceeded by a colon which is not for a type declaration is still handled.
98
98
$callback = $cond ? get_fn_name() : static function ($a) { return $a * 10; };
You can’t perform that action at this time.
0 commit comments