File tree Expand file tree Collapse file tree 4 files changed +20
-1
lines changed
src/Framework/MockObject/Runtime Expand file tree Collapse file tree 4 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,15 @@ interface InvocationStubber
24
24
public function method (Constraint |string $ constraint ): self ;
25
25
26
26
/**
27
+ * @param non-empty-string $id
28
+ *
27
29
* @return $this
28
30
*/
29
31
public function id (string $ id ): self ;
30
32
31
33
/**
34
+ * @param non-empty-string $id
35
+ *
32
36
* @return $this
33
37
*/
34
38
public function after (string $ id ): self ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ final class InvocationHandler
27
27
private array $ matchers = [];
28
28
29
29
/**
30
- * @var array<string,Matcher>
30
+ * @var array<non-empty- string, Matcher>
31
31
*/
32
32
private array $ matcherMap = [];
33
33
@@ -59,6 +59,8 @@ public function hasMatchers(): bool
59
59
60
60
/**
61
61
* Looks up the match builder with identification $id and returns it.
62
+ *
63
+ * @param non-empty-string $id
62
64
*/
63
65
public function lookupMatcher (string $ id ): ?Matcher
64
66
{
@@ -69,6 +71,8 @@ public function lookupMatcher(string $id): ?Matcher
69
71
* Registers a matcher with the identification $id. The matcher can later be
70
72
* looked up using lookupMatcher() to figure out if it has been invoked.
71
73
*
74
+ * @param non-empty-string $id
75
+ *
72
76
* @throws MatcherAlreadyRegisteredException
73
77
*/
74
78
public function registerMatcher (string $ id , Matcher $ matcher ): void
Original file line number Diff line number Diff line change @@ -96,6 +96,8 @@ public function method(Constraint|PropertyHook|string $constraint): InvocationSt
96
96
}
97
97
98
98
/**
99
+ * @param non-empty-string $id
100
+ *
99
101
* @throws MatcherAlreadyRegisteredException
100
102
*
101
103
* @return $this
@@ -108,6 +110,8 @@ public function id(string $id): InvocationStubber
108
110
}
109
111
110
112
/**
113
+ * @param non-empty-string $id
114
+ *
111
115
* @return $this
112
116
*/
113
117
public function after (string $ id ): InvocationStubber
Original file line number Diff line number Diff line change 29
29
final class Matcher
30
30
{
31
31
private readonly InvocationOrder $ invocationRule ;
32
+
33
+ /**
34
+ * @var ?non-empty-string
35
+ */
32
36
private ?string $ afterMatchBuilderId = null ;
33
37
private ?MethodName $ methodNameRule = null ;
34
38
private ?ParametersRule $ parametersRule = null ;
@@ -74,6 +78,9 @@ public function setStub(Stub $stub): void
74
78
$ this ->stub = $ stub ;
75
79
}
76
80
81
+ /**
82
+ * @param non-empty-string $id
83
+ */
77
84
public function setAfterMatchBuilderId (string $ id ): void
78
85
{
79
86
$ this ->afterMatchBuilderId = $ id ;
You can’t perform that action at this time.
0 commit comments