Skip to content

Commit 1d92999

Browse files
committed
php-cs-fixer fix
1 parent 58147c8 commit 1d92999

File tree

5 files changed

+19
-20
lines changed

5 files changed

+19
-20
lines changed

.php_cs.dist

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
require __DIR__ . '/vendor/autoload.php';
33

44
$finder = PhpCsFixer\Finder::create()
5-
->in(__DIR__)
6-
->exclude('tests');
5+
->in(__DIR__);
76

87
$config = require __DIR__ . '/.php_cs.common.php';
98

tests/HttpLog/LogWriterTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function testGetMessages()
6363
],
6464
[],
6565
[
66-
'file' => $testFile
66+
'file' => $testFile,
6767
]
6868
);
6969
$message = $logWriter->testGetMessages($request, 'test-uniqid');
@@ -74,12 +74,12 @@ public function testGetMessages()
7474
'uri' => $request->getPathInfo(),
7575
'body' => [
7676
'name' => 'Name',
77-
'file' => $testFile
77+
'file' => $testFile,
7878
],
7979
'headers' => $request->headers->all(),
8080
'files' => [
81-
'test.txt'
82-
]
81+
'test.txt',
82+
],
8383
], $message);
8484
}
8585

@@ -94,10 +94,10 @@ public function testFormatMessage()
9494
'name' => 'Name',
9595
],
9696
'headers' => [
97-
'accept' => 'text/html'
97+
'accept' => 'text/html',
9898
],
9999
'files' => [
100-
'test.txt'
100+
'test.txt',
101101
],
102102
]);
103103

@@ -109,7 +109,7 @@ public function testFormatMessage()
109109

110110
private function getLogWriter(): LogWriter
111111
{
112-
return new class extends LogWriter {
112+
return new class() extends LogWriter {
113113
public function testGetMessages(Request $request, string $uniqId): array
114114
{
115115
return $this->getMessages($request, $uniqId);

tests/PerformanceLog/LogWriterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function testFormatMessage()
8989

9090
private function getLogWriter(): LogWriter
9191
{
92-
return new class extends LogWriter {
92+
return new class() extends LogWriter {
9393
public function getStart()
9494
{
9595
return $this->start;

tests/QueryLog/LogWriterTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ public function testLog()
3737
->andReturn('mysql')
3838
->once();
3939
$query = new QueryExecuted(
40-
"SELECT * FROM users WHERE id = :id",
40+
'SELECT * FROM users WHERE id = :id',
4141
[
42-
'id' => 1
42+
'id' => 1,
4343
],
4444
10,
4545
$connection
@@ -69,7 +69,7 @@ public function testGetMessage()
6969
->once();
7070

7171
$query = new QueryExecuted(
72-
"SELECT * FROM users WHERE id = :id AND name = :name",
72+
'SELECT * FROM users WHERE id = :id AND name = :name',
7373
[
7474
'id' => 1,
7575
'name' => 'Name',
@@ -84,7 +84,7 @@ public function testGetMessage()
8484
$this->assertSame([
8585
'time' => 10,
8686
'connection_name' => 'mysql',
87-
'sql' => "SELECT * FROM users WHERE id = 1 AND name = 'Name'"
87+
'sql' => "SELECT * FROM users WHERE id = 1 AND name = 'Name'",
8888
], $messages);
8989
}
9090

@@ -95,7 +95,7 @@ public function testFormatMessage()
9595
$message = $logWriter->testFormatMessage([
9696
'time' => 10,
9797
'connection_name' => 'mysql',
98-
'sql' => "SELECT * FROM users WHERE id = 1 AND name = 'Name'"
98+
'sql' => "SELECT * FROM users WHERE id = 1 AND name = 'Name'",
9999
]);
100100

101101
$this->assertSame(
@@ -116,7 +116,7 @@ public function testQuote()
116116

117117
private function getLogWriter(): LogWriter
118118
{
119-
return new class extends LogWriter {
119+
return new class() extends LogWriter {
120120
public function testGetMessages(QueryExecuted $query): array
121121
{
122122
return $this->getMessages($query);

tests/TestCase.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717

1818
abstract class TestCase extends Testbench
1919
{
20-
const TEST_URI = 'test/uri';
20+
public const TEST_URI = 'test/uri';
2121

2222
protected function setupRoutes()
2323
{
2424
Route::match(['get', 'post', 'put', 'patch', 'delete'], self::TEST_URI, function () {
2525
return ['health' => 1];
2626
})->middleware([
27-
AppLogger::class
27+
AppLogger::class,
2828
]);
2929
}
3030

@@ -38,7 +38,7 @@ protected function getEnvironmentSetUp($app)
3838
'driver' => 'sqlite',
3939
'database' => ':memory:',
4040
'prefix' => '',
41-
'foreign_key_constraints' => true
41+
'foreign_key_constraints' => true,
4242
]);
4343

4444
$app['config']->set('database.default', 'sqlite');
@@ -73,7 +73,7 @@ protected function getEnvironmentSetUp($app)
7373
protected function getPackageProviders($app)
7474
{
7575
return [
76-
AppLoggerServiceProvider::class
76+
AppLoggerServiceProvider::class,
7777
];
7878
}
7979

0 commit comments

Comments
 (0)