@@ -19,22 +19,22 @@ class Metadata
1919 protected int |string |null $ index = null ;
2020
2121 protected array $ params = [
22- 'env ' => [],
23- 'group ' => [],
24- 'depends ' => [],
25- 'skip ' => null ,
22+ 'env ' => [],
23+ 'group ' => [],
24+ 'depends ' => [],
25+ 'skip ' => null ,
2626 'incomplete ' => null ,
2727 ];
2828
29- protected array $ current = [];
29+ protected array $ current = [];
3030 protected array $ services = [];
31- protected array $ reports = [];
31+ protected array $ reports = [];
3232
3333 /** @var string[] */
3434 private array $ beforeClassMethods = [];
3535
3636 /** @var string[] */
37- private array $ afterClassMethods = [];
37+ private array $ afterClassMethods = [];
3838
3939 public function getEnv (): array
4040 {
@@ -126,6 +126,16 @@ public function isBlocked(): bool
126126 return $ this ->getSkip () !== null || $ this ->getIncomplete () !== null ;
127127 }
128128
129+ public function getIndexTextSuffix (): string
130+ {
131+ if (is_int ($ this ->index )) {
132+ return '# ' . $ this ->index ;
133+ } elseif (is_string ($ this ->index )) {
134+ return '@ ' . $ this ->index ;
135+ }
136+ return '' ;
137+ }
138+
129139 public function getFeature (): string
130140 {
131141 return $ this ->feature ;
@@ -172,7 +182,7 @@ public function setParamsFromAnnotations($annotations): void
172182 {
173183 $ this ->params = array_merge_recursive (
174184 $ this ->params ,
175- Annotation::fetchAllAnnotationsFromDocblock ((string ) $ annotations )
185+ Annotation::fetchAllAnnotationsFromDocblock ((string )$ annotations )
176186 );
177187 $ this ->setSingularValueForSomeParams ();
178188 }
@@ -191,7 +201,7 @@ public function setParamsFromAttributes($attributes): void
191201 {
192202 $ params = [];
193203 foreach ($ attributes as $ attribute ) {
194- $ name = lcfirst (str_replace ('Codeception \\Attribute \\' , '' , (string ) $ attribute ->getName ()));
204+ $ name = lcfirst (str_replace ('Codeception \\Attribute \\' , '' , (string )$ attribute ->getName ()));
195205 $ arguments = $ attribute ->getArguments ();
196206
197207 if ($ attribute ->isRepeated ()) {
@@ -206,7 +216,7 @@ public function setParamsFromAttributes($attributes): void
206216 foreach (['group ' , 'env ' , 'before ' , 'after ' , 'prepare ' ] as $ single ) {
207217 if (isset ($ this ->params [$ single ]) && is_array ($ this ->params [$ single ])) {
208218 $ this ->params [$ single ] = array_merge (
209- ...array_map (static fn ($ a ): array => (array ) $ a , $ this ->params [$ single ])
219+ ...array_map (static fn ($ a ): array => (array )$ a , $ this ->params [$ single ])
210220 );
211221 }
212222 }
0 commit comments