Skip to content

Commit de22835

Browse files
tpetrygithub-actions[bot]
authored andcommitted
Fix styling
1 parent 492d45c commit de22835

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/Helpers/ApiHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function __construct(
2222
private ?string $domain = 'https://api.mysqlexplain.com',
2323
?Client $client = null,
2424
) {
25-
$this->client = $client ?? new Client();
25+
$this->client = $client ?? new Client;
2626
}
2727

2828
public function submitPlan(QueryMetrics $metrics): string

src/MysqlExplainServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MysqlExplainServiceProvider extends ServiceProvider
1616
*/
1717
public function register(): void
1818
{
19-
EloquentBuilder::mixin(new BuilderMixin());
20-
QueryBuilder::mixin(new BuilderMixin());
19+
EloquentBuilder::mixin(new BuilderMixin);
20+
QueryBuilder::mixin(new BuilderMixin);
2121
}
2222
}

tests/Mixins/EloquentBuilderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testDumpVisualExplain(): void
3232

3333
public function testExplainForHumans(): void
3434
{
35-
$model = new class() extends Model {};
35+
$model = new class extends Model {};
3636
$builder = $model->newQuery();
3737

3838
MysqlExplain::shouldReceive('submitBuilder')
@@ -47,7 +47,7 @@ public function testExplainForHumans(): void
4747

4848
public function testVisualExplain(): void
4949
{
50-
$model = new class() extends Model {};
50+
$model = new class extends Model {};
5151
$builder = $model->newQuery();
5252

5353
MysqlExplain::shouldReceive('submitBuilder')

tests/MysqlExplainTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function testSubmitQueryCollectsMetricsAndSubmitsThem(): void
7272
->andReturn('https://dummy-url-i5e6Kp3vJm.local/wowOFpsM2O');
7373
});
7474

75-
$url = (new MysqlExplain())->submitQuery($connection, 'SELECT * FROM customer WHERE last_name = ?', ['SMITH']);
75+
$url = (new MysqlExplain)->submitQuery($connection, 'SELECT * FROM customer WHERE last_name = ?', ['SMITH']);
7676

7777
$this->assertEquals('https://dummy-url-i5e6Kp3vJm.local/wowOFpsM2O', $url);
7878
}
@@ -82,7 +82,7 @@ public function testSubmitQueryForbidsNonMysqlDatabases(): void
8282
$this->expectException(NotMysqlException::class);
8383
$this->expectExceptionMessage('Only queries on mysql databases can be analyzed. pgsql query given.');
8484

85-
(new MysqlExplain())->submitQuery(DB::connection('pgsql'), 'SELECT * FROM actor');
85+
(new MysqlExplain)->submitQuery(DB::connection('pgsql'), 'SELECT * FROM actor');
8686
}
8787

8888
public function testSubmitQueryForbidsNonPdoConnections(): void
@@ -92,6 +92,6 @@ public function testSubmitQueryForbidsNonPdoConnections(): void
9292
$this->expectException(NotMysqlException::class);
9393
$this->expectExceptionMessage('Only queries on mysql databases can be analyzed. unknown query given.');
9494

95-
(new MysqlExplain())->submitQuery($connection, 'SELECT * FROM film');
95+
(new MysqlExplain)->submitQuery($connection, 'SELECT * FROM film');
9696
}
9797
}

0 commit comments

Comments
 (0)