@@ -69,7 +69,7 @@ public function testBuildingMandatoryParameter()
69
69
{
70
70
$ this ->extractorDefinitionShouldBuildOn ('type ' );
71
71
72
- $ spec = $ this ->builder ->build ('type param ' );
72
+ $ spec = $ this ->builder ->build ('param: type ' );
73
73
74
74
$ this ->assertInstanceOf (MandatoryParameterSpec::class, $ spec );
75
75
@@ -81,7 +81,7 @@ public function testBuildingMandatoryParameterWithComplexType()
81
81
{
82
82
$ this ->extractorDefinitionShouldBuildOn ('instance( Some\Class ) ' );
83
83
84
- $ spec = $ this ->builder ->build ('instance( Some\Class ) param ' );
84
+ $ spec = $ this ->builder ->build ('param : instance( Some\Class ) ' );
85
85
86
86
$ this ->assertInstanceOf (MandatoryParameterSpec::class, $ spec );
87
87
@@ -93,7 +93,7 @@ public function testBuildingMandatoryParameterWithVaryingType()
93
93
{
94
94
$ this ->extractorDefinitionShouldBuildOn ('foo|bar ' );
95
95
96
- $ spec = $ this ->builder ->build ('foo|bar param ' );
96
+ $ spec = $ this ->builder ->build ('param: foo|bar ' );
97
97
98
98
$ this ->assertInstanceOf (MandatoryParameterSpec::class, $ spec );
99
99
@@ -111,7 +111,7 @@ public function testBuildingOptionalParameter(string $raw_default, $expected_def
111
111
{
112
112
$ this ->extractorDefinitionShouldBuildOn ('type ' );
113
113
114
- $ spec = $ this ->builder ->build ('type param = ' . $ raw_default );
114
+ $ spec = $ this ->builder ->build ('param = ' . $ raw_default . ' : type ' );
115
115
116
116
$ this ->assertInstanceOf (OptionalParameterSpec::class, $ spec );
117
117
@@ -124,7 +124,7 @@ public function testBuildingVariadicParameter()
124
124
{
125
125
$ this ->extractorDefinitionShouldBuildOn ('type ' );
126
126
127
- $ spec = $ this ->builder ->build ('type ...param ' );
127
+ $ spec = $ this ->builder ->build ('...param: type ' );
128
128
129
129
$ this ->assertInstanceOf (VariadicParameterSpec::class, $ spec );
130
130
@@ -138,7 +138,7 @@ public function testBuildingVariadicParameter()
138
138
*/
139
139
public function testBuildingVariadicParameterWithDefaultValueShouldThrowException ()
140
140
{
141
- $ this ->builder ->build ('type ...param = [] ' );
141
+ $ this ->builder ->build ('...param = []: type ' );
142
142
}
143
143
144
144
/**
@@ -149,7 +149,7 @@ public function testBuildingWhenExtractorFailsShouldAlsoFail()
149
149
{
150
150
$ this ->extractorDefinitionShouldThrowOn ('fail ' );
151
151
152
- $ this ->builder ->build ('fail param ' );
152
+ $ this ->builder ->build ('param :fail ' );
153
153
}
154
154
155
155
0 commit comments