Skip to content

Commit 0dd71ef

Browse files
authored
apply Pint rule "single_line_comment_style" (#54969)
`FrequencyTest` is the outlier here, as it retains the `/**` syntax so the docbloc is picked up. This maintains consistency with other similar uses in the framework, such as in https://github.com/laravel/framework/blob/12.x/src/Illuminate/Collections/LazyCollection.php#L233 https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/rules/comment/single_line_comment_style.rst
1 parent 33f3dc8 commit 0dd71ef

File tree

10 files changed

+64
-192
lines changed

10 files changed

+64
-192
lines changed

tests/Broadcasting/BroadcasterTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ public function testExtractingParametersWhileCheckingForUserAccess()
6161
$parameters = $this->broadcaster->extractAuthParameters('asd', 'asd', $callback);
6262
$this->assertEquals([], $parameters);
6363

64-
/*
65-
* Test Explicit Binding...
66-
*/
64+
// Test Explicit Binding...
6765
$container = new Container;
6866
Container::setInstance($container);
6967
$binder = m::mock(BindingRegistrar::class);

tests/Cache/CacheRepositoryTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,7 @@ public function testRememberMethodCallsPutAndReturnsDefault()
128128
});
129129
$this->assertSame('qux', $result);
130130

131-
/*
132-
* Use a callable...
133-
*/
131+
// Use a callable...
134132
$repo = $this->getRepository();
135133
$repo->getStore()->shouldReceive('get')->once()->andReturn(null);
136134
$repo->getStore()->shouldReceive('put')->once()->with('foo', 'bar', 10);

tests/Console/Scheduling/FrequencyTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010

1111
class FrequencyTest extends TestCase
1212
{
13-
/*
14-
* @var \Illuminate\Console\Scheduling\Event
15-
*/
13+
/** @var \Illuminate\Console\Scheduling\Event */
1614
protected $event;
1715

1816
protected function setUp(): void

tests/Container/ContainerCallTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,7 @@ public function testCallWithDependencies()
146146
$this->assertInstanceOf(stdClass::class, $result[0]);
147147
$this->assertSame($stub, $result[1]);
148148

149-
/*
150-
* Wrap a function...
151-
*/
149+
// Wrap a function...
152150
$result = $container->wrap(function (stdClass $foo, $bar = []) {
153151
return func_get_args();
154152
}, ['bar' => 'taylor']);

tests/Container/ContextualBindingTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ public function testContainerCanInjectDifferentImplementationsDependingOnContext
2323
$this->assertInstanceOf(ContainerContextImplementationStub::class, $one->impl);
2424
$this->assertInstanceOf(ContainerContextImplementationStubTwo::class, $two->impl);
2525

26-
/*
27-
* Test With Closures
28-
*/
26+
// Test With Closures
2927
$container = new Container;
3028

3129
$container->bind(IContainerContextContractStub::class, ContainerContextImplementationStub::class);
@@ -41,9 +39,7 @@ public function testContainerCanInjectDifferentImplementationsDependingOnContext
4139
$this->assertInstanceOf(ContainerContextImplementationStub::class, $one->impl);
4240
$this->assertInstanceOf(ContainerContextImplementationStubTwo::class, $two->impl);
4341

44-
/*
45-
* Test nesting to make the same 'abstract' in different context
46-
*/
42+
// Test nesting to make the same 'abstract' in different context
4743
$container = new Container;
4844

4945
$container->bind(IContainerContextContractStub::class, ContainerContextImplementationStub::class);

tests/Database/DatabaseEloquentSoftDeletesIntegrationTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -957,9 +957,7 @@ public function testMorphToNonSoftDeletingModel()
957957

958958
public function testSelfReferencingRelationshipWithSoftDeletes()
959959
{
960-
/*
961-
* https://github.com/laravel/framework/issues/42075
962-
*/
960+
// https://github.com/laravel/framework/issues/42075
963961
[$taylor, $abigail] = $this->createUsers();
964962

965963
$this->assertCount(1, $abigail->self_referencing);

tests/Database/DatabaseQueryBuilderTest.php

Lines changed: 18 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -2475,9 +2475,7 @@ public function testOrWheresHaveConsistentResults()
24752475

24762476
public function testWhereWithArrayConditions()
24772477
{
2478-
/*
2479-
* where(key, value)
2480-
*/
2478+
// where(key, value)
24812479

24822480
$builder = $this->getBuilder();
24832481
$builder->select('*')->from('users')->where([['foo', 1], ['bar', 2]]);
@@ -2509,9 +2507,7 @@ public function testWhereWithArrayConditions()
25092507
$this->assertSame('select * from "users" where ("foo" = ? and "bar" = ?)', $builder->toSql());
25102508
$this->assertEquals([0 => 1, 1 => 2], $builder->getBindings());
25112509

2512-
/*
2513-
* where(key, <, value)
2514-
*/
2510+
// where(key, <, value)
25152511

25162512
$builder = $this->getBuilder();
25172513
$builder->select('*')->from('users')->where([['foo', 1], ['bar', '<', 2]]);
@@ -2528,9 +2524,7 @@ public function testWhereWithArrayConditions()
25282524
$this->assertSame('select * from "users" where ("foo" = ? and "bar" < ?)', $builder->toSql());
25292525
$this->assertEquals([0 => 1, 1 => 2], $builder->getBindings());
25302526

2531-
/*
2532-
* whereNot(key, value)
2533-
*/
2527+
// whereNot(key, value)
25342528

25352529
$builder = $this->getBuilder();
25362530
$builder->select('*')->from('users')->whereNot([['foo', 1], ['bar', 2]]);
@@ -2562,9 +2556,7 @@ public function testWhereWithArrayConditions()
25622556
$this->assertSame('select * from "users" where not (("foo" = ? and "bar" = ?))', $builder->toSql());
25632557
$this->assertEquals([0 => 1, 1 => 2], $builder->getBindings());
25642558

2565-
/*
2566-
* whereNot(key, <, value)
2567-
*/
2559+
// whereNot(key, <, value)
25682560

25692561
$builder = $this->getBuilder();
25702562
$builder->select('*')->from('users')->whereNot([['foo', 1], ['bar', '<', 2]]);
@@ -2581,9 +2573,7 @@ public function testWhereWithArrayConditions()
25812573
$this->assertSame('select * from "users" where not (("foo" = ? and "bar" < ?))', $builder->toSql());
25822574
$this->assertEquals([0 => 1, 1 => 2], $builder->getBindings());
25832575

2584-
/*
2585-
* whereColumn(col1, col2)
2586-
*/
2576+
// whereColumn(col1, col2)
25872577

25882578
$builder = $this->getBuilder();
25892579
$builder->select('*')->from('users')->whereColumn([['foo', '_foo'], ['bar', '_bar']]);
@@ -2615,9 +2605,7 @@ public function testWhereWithArrayConditions()
26152605
$this->assertSame('select * from "users" where ("foo" = "_foo" and "bar" = "_bar")', $builder->toSql());
26162606
$this->assertEquals([], $builder->getBindings());
26172607

2618-
/*
2619-
* whereColumn(col1, <, col2)
2620-
*/
2608+
// whereColumn(col1, <, col2)
26212609

26222610
$builder = $this->getBuilder();
26232611
$builder->select('*')->from('users')->whereColumn([['foo', '_foo'], ['bar', '<', '_bar']]);
@@ -2634,9 +2622,7 @@ public function testWhereWithArrayConditions()
26342622
$this->assertSame('select * from "users" where ("foo" = "_foo" and "bar" < "_bar")', $builder->toSql());
26352623
$this->assertEquals([], $builder->getBindings());
26362624

2637-
/*
2638-
* whereAll([...keys], value)
2639-
*/
2625+
// whereAll([...keys], value)
26402626

26412627
$builder = $this->getBuilder();
26422628
$builder->select('*')->from('users')->whereAll(['foo', 'bar'], 2);
@@ -2648,9 +2634,7 @@ public function testWhereWithArrayConditions()
26482634
$this->assertSame('select * from "users" where ("foo" = ? and "bar" = ?)', $builder->toSql());
26492635
$this->assertEquals([0 => 2, 1 => 2], $builder->getBindings());
26502636

2651-
/*
2652-
* whereAny([...keys], value)
2653-
*/
2637+
// whereAny([...keys], value)
26542638

26552639
$builder = $this->getBuilder();
26562640
$builder->select('*')->from('users')->whereAny(['foo', 'bar'], 2);
@@ -2662,9 +2646,7 @@ public function testWhereWithArrayConditions()
26622646
$this->assertSame('select * from "users" where ("foo" = ? or "bar" = ?)', $builder->toSql());
26632647
$this->assertEquals([0 => 2, 1 => 2], $builder->getBindings());
26642648

2665-
/*
2666-
* whereNone([...keys], value)
2667-
*/
2649+
// whereNone([...keys], value)
26682650

26692651
$builder = $this->getBuilder();
26702652
$builder->select('*')->from('users')->whereNone(['foo', 'bar'], 2);
@@ -2676,9 +2658,7 @@ public function testWhereWithArrayConditions()
26762658
$this->assertSame('select * from "users" where not ("foo" = ? or "bar" = ?)', $builder->toSql());
26772659
$this->assertEquals([0 => 2, 1 => 2], $builder->getBindings());
26782660

2679-
/*
2680-
* where()->orWhere(key, value)
2681-
*/
2661+
// where()->orWhere(key, value)
26822662

26832663
$builder = $this->getBuilder();
26842664
$builder->select('*')->from('users')->where('xxxx', 'xxxx')->orWhere([['foo', 1], ['bar', 2]]);
@@ -2690,18 +2670,14 @@ public function testWhereWithArrayConditions()
26902670
$this->assertSame('select * from "users" where "xxxx" = ? or ("foo" = ? or "bar" = ?)', $builder->toSql());
26912671
$this->assertEquals([0 => 'xxxx', 1 => 1, 2 => 2], $builder->getBindings());
26922672

2693-
/*
2694-
* where()->orWhere(key, <, value)
2695-
*/
2673+
// where()->orWhere(key, <, value)
26962674

26972675
$builder = $this->getBuilder();
26982676
$builder->select('*')->from('users')->where('xxxx', 'xxxx')->orWhere([['foo', 1], ['bar', '<', 2]]);
26992677
$this->assertSame('select * from "users" where "xxxx" = ? or ("foo" = ? or "bar" < ?)', $builder->toSql());
27002678
$this->assertEquals([0 => 'xxxx', 1 => 1, 2 => 2], $builder->getBindings());
27012679

2702-
/*
2703-
* where()->orWhereColumn(col1, col2)
2704-
*/
2680+
// where()->orWhereColumn(col1, col2)
27052681

27062682
$builder = $this->getBuilder();
27072683
$builder->select('*')->from('users')->where('xxxx', 'xxxx')->orWhereColumn([['foo', '_foo'], ['bar', '_bar']]);
@@ -2713,18 +2689,14 @@ public function testWhereWithArrayConditions()
27132689
$this->assertSame('select * from "users" where "xxxx" = ? or ("foo" = "_foo" or "bar" = "_bar")', $builder->toSql());
27142690
$this->assertEquals([0 => 'xxxx'], $builder->getBindings());
27152691

2716-
/*
2717-
* where()->orWhere(key, <, value)
2718-
*/
2692+
// where()->orWhere(key, <, value)
27192693

27202694
$builder = $this->getBuilder();
27212695
$builder->select('*')->from('users')->where('xxxx', 'xxxx')->orWhere([['foo', 1], ['bar', '<', 2]]);
27222696
$this->assertSame('select * from "users" where "xxxx" = ? or ("foo" = ? or "bar" < ?)', $builder->toSql());
27232697
$this->assertEquals([0 => 'xxxx', 1 => 1, 2 => 2], $builder->getBindings());
27242698

2725-
/*
2726-
* where()->orWhereNot(key, value)
2727-
*/
2699+
// where()->orWhereNot(key, value)
27282700

27292701
$builder = $this->getBuilder();
27302702
$builder->select('*')->from('users')->where('xxxx', 'xxxx')->orWhereNot([['foo', 1], ['bar', 2]]);
@@ -2736,18 +2708,14 @@ public function testWhereWithArrayConditions()
27362708
$this->assertSame('select * from "users" where "xxxx" = ? or not (("foo" = ? or "bar" = ?))', $builder->toSql());
27372709
$this->assertEquals([0 => 'xxxx', 1 => 1, 2 => 2], $builder->getBindings());
27382710

2739-
/*
2740-
* where()->orWhereNot(key, <, value)
2741-
*/
2711+
// where()->orWhereNot(key, <, value)
27422712

27432713
$builder = $this->getBuilder();
27442714
$builder->select('*')->from('users')->where('xxxx', 'xxxx')->orWhereNot([['foo', 1], ['bar', '<', 2]]);
27452715
$this->assertSame('select * from "users" where "xxxx" = ? or not (("foo" = ? or "bar" < ?))', $builder->toSql());
27462716
$this->assertEquals([0 => 'xxxx', 1 => 1, 2 => 2], $builder->getBindings());
27472717

2748-
/*
2749-
* where()->orWhereAll([...keys], value)
2750-
*/
2718+
// where()->orWhereAll([...keys], value)
27512719

27522720
$builder = $this->getBuilder();
27532721
$builder->select('*')->from('users')->where('xxxx', 'xxxx')->orWhereAll(['foo', 'bar'], 2);
@@ -2759,9 +2727,7 @@ public function testWhereWithArrayConditions()
27592727
$this->assertSame('select * from "users" where "xxxx" = ? or ("foo" = ? and "bar" = ?)', $builder->toSql());
27602728
$this->assertEquals([0 => 'xxxx', 1 => 2, 2 => 2], $builder->getBindings());
27612729

2762-
/*
2763-
* where()->orWhereAny([...keys], value)
2764-
*/
2730+
// where()->orWhereAny([...keys], value)
27652731

27662732
$builder = $this->getBuilder();
27672733
$builder->select('*')->from('users')->where('xxxx', 'xxxx')->orWhereAny(['foo', 'bar'], 2);
@@ -2773,9 +2739,7 @@ public function testWhereWithArrayConditions()
27732739
$this->assertSame('select * from "users" where "xxxx" = ? or ("foo" = ? or "bar" = ?)', $builder->toSql());
27742740
$this->assertEquals([0 => 'xxxx', 1 => 2, 2 => 2], $builder->getBindings());
27752741

2776-
/*
2777-
* where()->orWhereNone([...keys], value)
2778-
*/
2742+
// where()->orWhereNone([...keys], value)
27792743

27802744
$builder = $this->getBuilder();
27812745
$builder->select('*')->from('users')->where('xxxx', 'xxxx')->orWhereNone(['foo', 'bar'], 2);

tests/Pagination/UrlWindowTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ public function testPresenterCanGetAUrlRangeForAWindowOfLinks()
3737

3838
$this->assertEquals(['first' => [1 => '/?page=1', 2 => '/?page=2'], 'slider' => $slider, 'last' => [19 => '/?page=19', 20 => '/?page=20']], $window->get());
3939

40-
/*
41-
* Test Being Near The End Of The List
42-
*/
40+
// Test Being Near The End Of The List
4341
$array = [];
4442
for ($i = 1; $i <= 20; $i++) {
4543
$array[$i] = 'item'.$i;

0 commit comments

Comments
 (0)