Skip to content

Commit 9aec20f

Browse files
authored
Merge pull request #5912 from huzaifaalmesbah/fix-Inline-comments
2 parents a76265b + 2643f56 commit 9aec20f

File tree

6 files changed

+70
-70
lines changed

6 files changed

+70
-70
lines changed

tests/test-commandfactory.php

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -99,39 +99,39 @@ public function testGetDocComment() {
9999
require __DIR__ . '/data/commandfactory-doc_comment-class-win.php';
100100
}
101101

102-
// Class 1
102+
// Class 1.
103103

104104
$reflection = new \ReflectionClass( 'CommandFactoryTests_Get_Doc_Comment_1_Command' );
105105
$expected = $reflection->getDocComment();
106106

107107
$actual = $get_doc_comment->invoke( null, $reflection );
108108
$this->assertSame( $expected, $actual );
109109

110-
// Class method 1
110+
// Class method 1.
111111

112112
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command', 'command1' );
113113
$expected = $reflection->getDocComment();
114114

115115
$actual = $get_doc_comment->invoke( null, $reflection );
116116
$this->assertSame( $expected, $actual );
117117

118-
// Class method 2
118+
// Class method 2.
119119

120120
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command', 'command2' );
121121
$expected = $reflection->getDocComment();
122122

123123
$actual = $get_doc_comment->invoke( null, $reflection );
124124
$this->assertSame( $expected, $actual );
125125

126-
// Class method 3
126+
// Class method 3.
127127

128128
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command', 'command3' );
129129
$expected = $reflection->getDocComment();
130130

131131
$actual = $get_doc_comment->invoke( null, $reflection );
132132
$this->assertSame( $expected, $actual );
133133

134-
// Class method 4
134+
// Class method 4.
135135

136136
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command', 'command4' );
137137
$expected = $reflection->getDocComment();
@@ -140,39 +140,39 @@ public function testGetDocComment() {
140140
$this->assertSame( $expected, $actual );
141141
$this->assertFalse( $actual );
142142

143-
// Class 1 Windows
143+
// Class 1 Windows.
144144

145145
$reflection = new \ReflectionClass( 'CommandFactoryTests_Get_Doc_Comment_1_Command_Win' );
146146
$expected = $reflection->getDocComment();
147147

148148
$actual = $get_doc_comment->invoke( null, $reflection );
149149
$this->assertSame( $expected, $actual );
150150

151-
// Class method 1
151+
// Class method 1.
152152

153153
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command_Win', 'command1' );
154154
$expected = $reflection->getDocComment();
155155

156156
$actual = $get_doc_comment->invoke( null, $reflection );
157157
$this->assertSame( $expected, $actual );
158158

159-
// Class method 2
159+
// Class method 2.
160160

161161
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command_Win', 'command2' );
162162
$expected = $reflection->getDocComment();
163163

164164
$actual = $get_doc_comment->invoke( null, $reflection );
165165
$this->assertSame( $expected, $actual );
166166

167-
// Class method 3
167+
// Class method 3.
168168

169169
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command_Win', 'command3' );
170170
$expected = $reflection->getDocComment();
171171

172172
$actual = $get_doc_comment->invoke( null, $reflection );
173173
$this->assertSame( $expected, $actual );
174174

175-
// Class method 4
175+
// Class method 4.
176176

177177
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command_Win', 'command4' );
178178
$expected = $reflection->getDocComment();
@@ -181,15 +181,15 @@ public function testGetDocComment() {
181181
$this->assertSame( $expected, $actual );
182182
$this->assertFalse( $actual );
183183

184-
// Class 2
184+
// Class 2.
185185

186186
$reflection = new \ReflectionClass( 'CommandFactoryTests_Get_Doc_Comment_2_Command' );
187187
$expected = $reflection->getDocComment();
188188

189189
$actual = $get_doc_comment->invoke( null, $reflection );
190190
$this->assertSame( $expected, $actual );
191191

192-
// Class method 1
192+
// Class method 1.
193193

194194
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_2_Command', 'command1' );
195195
$expected = $reflection->getDocComment();
@@ -198,15 +198,15 @@ public function testGetDocComment() {
198198
$this->assertSame( $expected, $actual );
199199
$this->assertFalse( $actual );
200200

201-
// Class 2 Windows
201+
// Class 2 Windows.
202202

203203
$reflection = new \ReflectionClass( 'CommandFactoryTests_Get_Doc_Comment_2_Command_Win' );
204204
$expected = $reflection->getDocComment();
205205

206206
$actual = $get_doc_comment->invoke( null, $reflection );
207207
$this->assertSame( $expected, $actual );
208208

209-
// Class method 1
209+
// Class method 1.
210210

211211
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_2_Command_Win', 'command1' );
212212
$expected = $reflection->getDocComment();
@@ -215,27 +215,27 @@ public function testGetDocComment() {
215215
$this->assertSame( $expected, $actual );
216216
$this->assertFalse( $actual );
217217

218-
// Functions
218+
// Functions.
219219

220220
require __DIR__ . '/data/commandfactory-doc_comment-function.php';
221221

222-
// Function 1
222+
// Function 1.
223223

224224
$reflection = new \ReflectionFunction( 'commandfactorytests_get_doc_comment_func_1' );
225225
$expected = $reflection->getDocComment();
226226

227227
$actual = $get_doc_comment->invoke( null, $reflection );
228228
$this->assertSame( $expected, $actual );
229229

230-
// Function 2
230+
// Function 2.
231231

232232
$reflection = new \ReflectionFunction( 'commandfactorytests_get_doc_comment_func_2' );
233233
$expected = $reflection->getDocComment();
234234

235235
$actual = $get_doc_comment->invoke( null, $reflection );
236236
$this->assertSame( $expected, $actual );
237237

238-
// Function 3
238+
// Function 3.
239239

240240
$reflection = new \ReflectionFunction( $commandfactorytests_get_doc_comment_func_3 );
241241
$expected = $reflection->getDocComment();
@@ -267,39 +267,39 @@ public function testGetDocCommentWin() {
267267
require __DIR__ . '/data/commandfactory-doc_comment-class-win.php';
268268
}
269269

270-
// Class 1
270+
// Class 1.
271271

272272
$reflection = new \ReflectionClass( 'CommandFactoryTests_Get_Doc_Comment_1_Command' );
273273
$expected = $reflection->getDocComment();
274274

275275
$actual = $get_doc_comment->invoke( null, $reflection );
276276
$this->assertSame( $expected, $actual );
277277

278-
// Class method 1
278+
// Class method 1.
279279

280280
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command', 'command1' );
281281
$expected = $reflection->getDocComment();
282282

283283
$actual = $get_doc_comment->invoke( null, $reflection );
284284
$this->assertSame( $expected, $actual );
285285

286-
// Class method 2
286+
// Class method 2.
287287

288288
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command', 'command2' );
289289
$expected = $reflection->getDocComment();
290290

291291
$actual = $get_doc_comment->invoke( null, $reflection );
292292
$this->assertSame( $expected, $actual );
293293

294-
// Class method 3
294+
// Class method 3.
295295

296296
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command', 'command3' );
297297
$expected = $reflection->getDocComment();
298298

299299
$actual = $get_doc_comment->invoke( null, $reflection );
300300
$this->assertSame( $expected, $actual );
301301

302-
// Class method 4
302+
// Class method 4.
303303

304304
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command', 'command4' );
305305
$expected = $reflection->getDocComment();
@@ -308,39 +308,39 @@ public function testGetDocCommentWin() {
308308
$this->assertSame( $expected, $actual );
309309
$this->assertFalse( $actual );
310310

311-
// Class 1 Windows
311+
// Class 1 Windows.
312312

313313
$reflection = new \ReflectionClass( 'CommandFactoryTests_Get_Doc_Comment_1_Command_Win' );
314314
$expected = $reflection->getDocComment();
315315

316316
$actual = $get_doc_comment->invoke( null, $reflection );
317317
$this->assertSame( $expected, $actual );
318318

319-
// Class method 1
319+
// Class method 1.
320320

321321
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command_Win', 'command1' );
322322
$expected = $reflection->getDocComment();
323323

324324
$actual = $get_doc_comment->invoke( null, $reflection );
325325
$this->assertSame( $expected, $actual );
326326

327-
// Class method 2
327+
// Class method 2.
328328

329329
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command_Win', 'command2' );
330330
$expected = $reflection->getDocComment();
331331

332332
$actual = $get_doc_comment->invoke( null, $reflection );
333333
$this->assertSame( $expected, $actual );
334334

335-
// Class method 3
335+
// Class method 3.
336336

337337
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command_Win', 'command3' );
338338
$expected = $reflection->getDocComment();
339339

340340
$actual = $get_doc_comment->invoke( null, $reflection );
341341
$this->assertSame( $expected, $actual );
342342

343-
// Class method 4
343+
// Class method 4.
344344

345345
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_1_Command_Win', 'command4' );
346346
$expected = $reflection->getDocComment();
@@ -349,15 +349,15 @@ public function testGetDocCommentWin() {
349349
$this->assertSame( $expected, $actual );
350350
$this->assertFalse( $actual );
351351

352-
// Class 2
352+
// Class 2.
353353

354354
$reflection = new \ReflectionClass( 'CommandFactoryTests_Get_Doc_Comment_2_Command' );
355355
$expected = $reflection->getDocComment();
356356

357357
$actual = $get_doc_comment->invoke( null, $reflection );
358358
$this->assertSame( $expected, $actual );
359359

360-
// Class method 1
360+
// Class method 1.
361361

362362
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_2_Command', 'command1' );
363363
$expected = $reflection->getDocComment();
@@ -366,15 +366,15 @@ public function testGetDocCommentWin() {
366366
$this->assertSame( $expected, $actual );
367367
$this->assertFalse( $actual );
368368

369-
// Class 2 Windows
369+
// Class 2 Windows.
370370

371371
$reflection = new \ReflectionClass( 'CommandFactoryTests_Get_Doc_Comment_2_Command_Win' );
372372
$expected = $reflection->getDocComment();
373373

374374
$actual = $get_doc_comment->invoke( null, $reflection );
375375
$this->assertSame( $expected, $actual );
376376

377-
// Class method 1
377+
// Class method 1.
378378

379379
$reflection = new \ReflectionMethod( 'CommandFactoryTests_Get_Doc_Comment_2_Command_Win', 'command1' );
380380
$expected = $reflection->getDocComment();
@@ -383,27 +383,27 @@ public function testGetDocCommentWin() {
383383
$this->assertSame( $expected, $actual );
384384
$this->assertFalse( $actual );
385385

386-
// Functions
386+
// Functions.
387387

388388
require __DIR__ . '/data/commandfactory-doc_comment-function-win.php';
389389

390-
// Function 1 Windows
390+
// Function 1 Windows.
391391

392392
$reflection = new \ReflectionFunction( 'commandfactorytests_get_doc_comment_func_1_win' );
393393
$expected = $reflection->getDocComment();
394394

395395
$actual = $get_doc_comment->invoke( null, $reflection );
396396
$this->assertSame( $expected, $actual );
397397

398-
// Function 2
398+
// Function 2.
399399

400400
$reflection = new \ReflectionFunction( 'commandfactorytests_get_doc_comment_func_2_win' );
401401
$expected = $reflection->getDocComment();
402402

403403
$actual = $get_doc_comment->invoke( null, $reflection );
404404
$this->assertSame( $expected, $actual );
405405

406-
// Function 3
406+
// Function 3.
407407

408408
$reflection = new \ReflectionFunction( $commandfactorytests_get_doc_comment_func_3_win );
409409
$expected = $reflection->getDocComment();

tests/test-configurator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function testNullGetConfig() {
6868
$runner = WP_CLI::get_runner();
6969
$runner->init_config();
7070

71-
// Previous
71+
// Previous.
7272
$prev_logger = WP_CLI::get_logger();
7373

7474
$logger = new Loggers\Execution();
@@ -81,7 +81,7 @@ public function testNullGetConfig() {
8181
$this->assertTrue( false === strpos( $logger->stderr, 'Warning' ), 'Logger contains a "Warning"' );
8282
$this->assertNull( $get_config, 'get_config() is not null' );
8383

84-
// Restore
84+
// Restore.
8585
WP_CLI::set_logger( $prev_logger );
8686
}
8787
}

tests/test-file-cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function test_ensure_dir_exists() {
7474
$expected = "/^Warning: Failed to create directory '.+': mkdir\(\): File exists\.$/";
7575
$this->assertMatchesRegularExpression( $expected, $logger->stderr );
7676

77-
// Restore
77+
// Restore.
7878
chmod( $cache_dir . '/test1', 0755 );
7979
rmdir( $cache_dir . '/test1' );
8080
unlink( $cache_dir . '/test2' );

tests/test-inflector.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ public function testPluralize( $singular, $expected ) {
1414

1515
public function dataProviderPluralize() {
1616
return [
17-
[ 'string', 'strings' ], // regular
18-
[ 'person', 'people' ], // irregular
19-
[ 'scissors', 'scissors' ], // uncountable
17+
[ 'string', 'strings' ], // Regular.
18+
[ 'person', 'people' ], // Irregular.
19+
[ 'scissors', 'scissors' ], // Uncountable.
2020
];
2121
}
2222

@@ -29,9 +29,9 @@ public function testSingularize( $singular, $expected ) {
2929

3030
public function dataProviderSingularize() {
3131
return [
32-
[ 'strings', 'string' ], // regular
33-
[ 'people', 'person' ], // irregular
34-
[ 'scissors', 'scissors' ], // uncountable
32+
[ 'strings', 'string' ], // Regular.
33+
[ 'people', 'person' ], // Irregular.
34+
[ 'scissors', 'scissors' ], // Uncountable.
3535
];
3636
}
3737
}

tests/test-synopsis.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testFlag() {
3434
$this->assertEquals( 'flag', $param['type'] );
3535
$this->assertTrue( $param['optional'] );
3636

37-
// flags can't be mandatory
37+
// Flags can't be mandatory.
3838
$r = SynopsisParser::parse( '--foo' );
3939

4040
$this->assertCount( 1, $r );

0 commit comments

Comments
 (0)