Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.x] apply Pint rule "single_line_comment_style" #54969

Open
wants to merge 1 commit into
base: 12.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions tests/Broadcasting/BroadcasterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ public function testExtractingParametersWhileCheckingForUserAccess()
$parameters = $this->broadcaster->extractAuthParameters('asd', 'asd', $callback);
$this->assertEquals([], $parameters);

/*
* Test Explicit Binding...
*/
// Test Explicit Binding...
$container = new Container;
Container::setInstance($container);
$binder = m::mock(BindingRegistrar::class);
Expand Down
4 changes: 1 addition & 3 deletions tests/Cache/CacheRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ public function testRememberMethodCallsPutAndReturnsDefault()
});
$this->assertSame('qux', $result);

/*
* Use a callable...
*/
// Use a callable...
$repo = $this->getRepository();
$repo->getStore()->shouldReceive('get')->once()->andReturn(null);
$repo->getStore()->shouldReceive('put')->once()->with('foo', 'bar', 10);
Expand Down
4 changes: 1 addition & 3 deletions tests/Console/Scheduling/FrequencyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

class FrequencyTest extends TestCase
{
/*
* @var \Illuminate\Console\Scheduling\Event
*/
/** @var \Illuminate\Console\Scheduling\Event */
protected $event;

protected function setUp(): void
Expand Down
4 changes: 1 addition & 3 deletions tests/Container/ContainerCallTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ public function testCallWithDependencies()
$this->assertInstanceOf(stdClass::class, $result[0]);
$this->assertSame($stub, $result[1]);

/*
* Wrap a function...
*/
// Wrap a function...
$result = $container->wrap(function (stdClass $foo, $bar = []) {
return func_get_args();
}, ['bar' => 'taylor']);
Expand Down
8 changes: 2 additions & 6 deletions tests/Container/ContextualBindingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ public function testContainerCanInjectDifferentImplementationsDependingOnContext
$this->assertInstanceOf(ContainerContextImplementationStub::class, $one->impl);
$this->assertInstanceOf(ContainerContextImplementationStubTwo::class, $two->impl);

/*
* Test With Closures
*/
// Test With Closures
$container = new Container;

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

/*
* Test nesting to make the same 'abstract' in different context
*/
// Test nesting to make the same 'abstract' in different context
$container = new Container;

$container->bind(IContainerContextContractStub::class, ContainerContextImplementationStub::class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -957,9 +957,7 @@ public function testMorphToNonSoftDeletingModel()

public function testSelfReferencingRelationshipWithSoftDeletes()
{
/*
* https://github.com/laravel/framework/issues/42075
*/
// https://github.com/laravel/framework/issues/42075
[$taylor, $abigail] = $this->createUsers();

$this->assertCount(1, $abigail->self_referencing);
Expand Down
72 changes: 18 additions & 54 deletions tests/Database/DatabaseQueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2475,9 +2475,7 @@ public function testOrWheresHaveConsistentResults()

public function testWhereWithArrayConditions()
{
/*
* where(key, value)
*/
// where(key, value)

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

/*
* where(key, <, value)
*/
// where(key, <, value)

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

/*
* whereNot(key, value)
*/
// whereNot(key, value)

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

/*
* whereNot(key, <, value)
*/
// whereNot(key, <, value)

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

/*
* whereColumn(col1, col2)
*/
// whereColumn(col1, col2)

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

/*
* whereColumn(col1, <, col2)
*/
// whereColumn(col1, <, col2)

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

/*
* whereAll([...keys], value)
*/
// whereAll([...keys], value)

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

/*
* whereAny([...keys], value)
*/
// whereAny([...keys], value)

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

/*
* whereNone([...keys], value)
*/
// whereNone([...keys], value)

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

/*
* where()->orWhere(key, value)
*/
// where()->orWhere(key, value)

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

/*
* where()->orWhere(key, <, value)
*/
// where()->orWhere(key, <, value)

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

/*
* where()->orWhereColumn(col1, col2)
*/
// where()->orWhereColumn(col1, col2)

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

/*
* where()->orWhere(key, <, value)
*/
// where()->orWhere(key, <, value)

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

/*
* where()->orWhereNot(key, value)
*/
// where()->orWhereNot(key, value)

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

/*
* where()->orWhereNot(key, <, value)
*/
// where()->orWhereNot(key, <, value)

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

/*
* where()->orWhereAll([...keys], value)
*/
// where()->orWhereAll([...keys], value)

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

/*
* where()->orWhereAny([...keys], value)
*/
// where()->orWhereAny([...keys], value)

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

/*
* where()->orWhereNone([...keys], value)
*/
// where()->orWhereNone([...keys], value)

$builder = $this->getBuilder();
$builder->select('*')->from('users')->where('xxxx', 'xxxx')->orWhereNone(['foo', 'bar'], 2);
Expand Down
4 changes: 1 addition & 3 deletions tests/Pagination/UrlWindowTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ public function testPresenterCanGetAUrlRangeForAWindowOfLinks()

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

/*
* Test Being Near The End Of The List
*/
// Test Being Near The End Of The List
$array = [];
for ($i = 1; $i <= 20; $i++) {
$array[$i] = 'item'.$i;
Expand Down
Loading
Loading