Skip to content

Commit df203a7

Browse files
authored
Merge pull request #646 from Codeception/document-parameters
Document parameters and return types
2 parents ded1de8 + 01531e1 commit df203a7

35 files changed

+7042
-2959
lines changed

composer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,17 @@
3232
"codeception/module-yii2": "*",
3333
"codeception/util-robohelpers": "dev-master",
3434
"knplabs/github-api": "^3.0",
35-
"guzzlehttp/guzzle": "^7.0.1",
36-
"http-interop/http-factory-guzzle": "^1.0"
35+
"guzzlehttp/guzzle": "^7.0.1"
3736
},
3837
"require-dev": {
39-
"consolidation/robo": "3.x-dev"
38+
"consolidation/robo": "dev-document-method-parameters"
4039
},
40+
"repositories": [
41+
{
42+
"type": "vcs",
43+
"url": "https://github.com/Naktibalda/robo.git"
44+
}
45+
],
4146
"config": {
4247
"platform": {
4348
"ext-phalcon": "4.1.1"

docs/modules/AMQP.md

Lines changed: 76 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,15 @@ To use this module with Composer you need <em>"php-amqplib/php-amqplib": "~2.4"<
6969
### Actions
7070

7171
#### bindQueueToExchange
72-
72+
73+
* `param string` $queue
74+
* `param string` $exchange
75+
* `param string` $routing_key
76+
* `param bool` $nowait
77+
* `param ?array` $arguments
78+
* `param ?int` $ticket
79+
* `return mixed`
80+
7381
Binds a queue to an exchange
7482

7583
This is an alias of method `queue_bind` of `PhpAmqpLib\Channel\AMQPChannel`.
@@ -86,9 +94,19 @@ $I->bindQueueToExchange(
8694
{% endhighlight %}
8795

8896

89-
9097
#### declareExchange
91-
98+
99+
* `param string` $exchange
100+
* `param string` $type
101+
* `param bool` $passive
102+
* `param bool` $durable
103+
* `param bool` $auto_delete
104+
* `param bool` $internal
105+
* `param bool` $nowait
106+
* `param ?array` $arguments
107+
* `param ?int` $ticket
108+
* `return mixed`
109+
92110
Declares an exchange
93111

94112
This is an alias of method `exchange_declare` of `PhpAmqpLib\Channel\AMQPChannel`.
@@ -104,9 +122,18 @@ $I->declareExchange(
104122
{% endhighlight %}
105123

106124

107-
108125
#### declareQueue
109-
126+
127+
* `param string` $queue
128+
* `param bool` $passive
129+
* `param bool` $durable
130+
* `param bool` $exclusive
131+
* `param bool` $auto_delete
132+
* `param bool` $nowait
133+
* `param ?array` $arguments
134+
* `param ?int` $ticket
135+
* `return mixed`
136+
110137
Declares queue, creates if needed
111138

112139
This is an alias of method `queue_declare` of `PhpAmqpLib\Channel\AMQPChannel`.
@@ -121,9 +148,11 @@ $I->declareQueue(
121148
{% endhighlight %}
122149

123150

124-
125151
#### dontSeeQueueIsEmpty
126-
152+
153+
* `param string` $queue
154+
* `return void`
155+
127156
Checks if queue is not empty.
128157

129158
{% highlight php %}
@@ -136,7 +165,10 @@ $I->dontSeeQueueIsEmpty('queue.emails');
136165

137166

138167
#### grabMessageFromQueue
139-
168+
169+
* `param string` $queue
170+
* `return ?\PhpAmqpLib\Message\AMQPMessage`
171+
140172
Takes last message from queue.
141173

142174
{% highlight php %}
@@ -148,7 +180,9 @@ $message = $I->grabMessageFromQueue('queue.emails');
148180

149181

150182
#### purgeAllQueues
151-
183+
184+
* `return void`
185+
152186
Purge all queues defined in config.
153187

154188
{% highlight php %}
@@ -160,7 +194,10 @@ $I->purgeAllQueues();
160194

161195

162196
#### purgeQueue
163-
197+
198+
* `param string` $queueName
199+
* `return void`
200+
164201
Purge a specific queue defined in config.
165202

166203
{% highlight php %}
@@ -172,7 +209,12 @@ $I->purgeQueue('queue.emails');
172209

173210

174211
#### pushToExchange
175-
212+
213+
* `param string` $exchange
214+
* `param \PhpAmqpLib\Message\AMQPMessage|string` $message
215+
* `param ?string` $routing_key
216+
* `return void`
217+
176218
Sends message to exchange by sending exchange name, message
177219
and (optionally) a routing key
178220

@@ -187,7 +229,11 @@ $I->pushToExchange('exchange.emails', new AMQPMessage('Thanks!'), 'severity');
187229

188230

189231
#### pushToQueue
190-
232+
233+
* `param string` $queue
234+
* `param \PhpAmqpLib\Message\AMQPMessage|string` $message
235+
* `return void`
236+
191237
Sends message to queue
192238

193239
{% highlight php %}
@@ -200,12 +246,19 @@ $I->pushToQueue('queue.jobs', new AMQPMessage('create'));
200246

201247

202248
#### scheduleQueueCleanup
203-
249+
250+
* `param string` $queue
251+
* `return void`
252+
204253
Add a queue to purge list
205254

206255

207256
#### seeMessageInQueueContainsText
208-
257+
258+
* `param string` $queue
259+
* `param string` $text
260+
* `return void`
261+
209262
Checks if message containing text received.
210263

211264
**This method drops message from queue**
@@ -221,7 +274,11 @@ $I->seeMessageInQueueContainsText('queue.emails','davert');
221274

222275

223276
#### seeNumberOfMessagesInQueue
224-
277+
278+
* `param string` $queue
279+
* `param int` $expected
280+
* `return void`
281+
225282
Checks that queue have expected number of message
226283

227284
{% highlight php %}
@@ -234,7 +291,10 @@ $I->seeNumberOfMessagesInQueue('queue.emails',1);
234291

235292

236293
#### seeQueueIsEmpty
237-
294+
295+
* `param string` $queue
296+
* `return void`
297+
238298
Checks that queue is empty
239299

240300
{% highlight php %}

docs/modules/Apc.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ Be sure you don't use the production server to connect.
5858
### Actions
5959

6060
#### dontSeeInApc
61-
61+
62+
* `param string` $key
63+
* `param mixed` $value
64+
* `return void`
65+
6266
Checks item in APCu doesn't exist or is the same as expected.
6367

6468
Examples:
@@ -76,12 +80,17 @@ $I->dontSeeInApc('users_count', 200);
7680

7781

7882
#### flushApc
79-
83+
84+
* `return void`
85+
8086
Clears the APCu cache
8187

8288

8389
#### grabValueFromApc
84-
90+
91+
* `param string` $key
92+
* `return mixed`
93+
8594
Grabs value from APCu by key.
8695

8796
Example:
@@ -95,7 +104,12 @@ $users_count = $I->grabValueFromApc('users_count');
95104

96105

97106
#### haveInApc
98-
107+
108+
* `param string` $key
109+
* `param mixed` $value
110+
* `param int` $expiration
111+
* `return string`
112+
99113
Stores an item `$value` with `$key` on the APCu.
100114

101115
Examples:
@@ -121,7 +135,11 @@ $I->haveInApc($entries, null);
121135

122136

123137
#### seeInApc
124-
138+
139+
* `param string` $key
140+
* `param mixed` $value
141+
* `return void`
142+
125143
Checks item in APCu exists and the same as expected.
126144

127145
Examples:
@@ -137,5 +155,4 @@ $I->seeInApc('users_count', 200);
137155

138156
{% endhighlight %}
139157

140-
141158
<p>&nbsp;</p><div class="alert alert-warning">Module reference is taken from the source code. <a href="https://github.com/Codeception/module-apc/tree/master/src/Codeception/Module/Apc.php">Help us to improve documentation. Edit module reference</a></div>

0 commit comments

Comments
 (0)