@@ -90,14 +90,15 @@ public function numberSuccess()
9090 return $ this ->numberTokensSuccess + count ($ this ->tokensToModify );
9191 }
9292
93- /**
94- * Get the number of device which thrown an error.
95- *
96- * @return int
97- */ public function numberFailure ()
98- {
99- return count ($ this ->tokensToDelete ()) + count ($ this ->tokensWithError );
100- }
93+ /**
94+ * Get the number of device which thrown an error.
95+ *
96+ * @return int
97+ */
98+ public function numberFailure ()
99+ {
100+ return count ($ this ->tokensToDelete ()) + count ($ this ->tokensWithError );
101+ }
101102
102103 /**
103104 * Get the number of device that you need to modify their token.
@@ -113,10 +114,12 @@ public function numberModification()
113114 * Add a token to delete.
114115 *
115116 * @param $token
117+ * @return MockDownstreamResponse
116118 */
117119 public function addTokenToDelete ($ token )
118120 {
119121 $ this ->tokensToDelete [] = $ token ;
122+ return $ this ;
120123 }
121124
122125 /**
@@ -135,10 +138,12 @@ public function tokensToDelete()
135138 *
136139 * @param $oldToken
137140 * @param $newToken
141+ * @return MockDownstreamResponse
138142 */
139143 public function addTokenToModify ($ oldToken , $ newToken )
140144 {
141145 $ this ->tokensToModify [$ oldToken ] = $ newToken ;
146+ return $ this ;
142147 }
143148
144149 /**
@@ -158,10 +163,12 @@ public function tokensToModify()
158163 * Add a token to retry.
159164 *
160165 * @param $token
166+ * @return MockDownstreamResponse
161167 */
162168 public function addTokenToRetry ($ token )
163169 {
164170 $ this ->tokensToRetry [] = $ token ;
171+ return $ this ;
165172 }
166173
167174 /**
@@ -179,10 +186,12 @@ public function tokensToRetry()
179186 *
180187 * @param $token
181188 * @param $message
189+ * @return MockDownstreamResponse
182190 */
183191 public function addTokenWithError ($ token , $ message )
184192 {
185193 $ this ->tokensWithError [$ token ] = $ message ;
194+ return $ this ;
186195 }
187196
188197 /**
@@ -202,10 +211,12 @@ public function tokensWithError()
202211 * change missing token state.
203212 *
204213 * @param $hasMissingToken
214+ * @return MockDownstreamResponse
205215 */
206216 public function setMissingToken ($ hasMissingToken )
207217 {
208218 $ this ->hasMissingToken = $ hasMissingToken ;
219+ return $ this ;
209220 }
210221
211222 /**
0 commit comments