Skip to content

Commit c2520e6

Browse files
committed
Fix style
1 parent 9990e80 commit c2520e6

File tree

7 files changed

+15
-25
lines changed

7 files changed

+15
-25
lines changed

tests/Concerns/AutoloadsRelationshipsTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public function testGetRelationshipFromMethodUnderThresholdDoesAutoLoad()
5151

5252
public function testGetRelationshipFromMethodUnderThresholdDoesAutoLoadWithLogging()
5353
{
54-
5554
$message = "[LARAVEL-JIT-LOADER] Relationship " . TraitModel::class . "::myRelationship was JIT-loaded. Called in " . __FILE__ . " on line " . (__LINE__ + 12);
5655

5756
$driver = $this->getMockBuilder(LoggerInterface::class)->getMock();
@@ -115,4 +114,4 @@ public function testPerformance()
115114
$this->assertTrue($traitedCount < $traitlessCount);
116115
$this->assertTrue($traitedTime < $traitlessTime);
117116
}
118-
}
117+
}

tests/CoverageCheck.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
exit(1);
2929
}
3030

31-
echo 'Code coverage is ' . $coverage . '% - OK!' . PHP_EOL;
31+
echo 'Code coverage is ' . $coverage . '% - OK!' . PHP_EOL;

tests/DummyModel.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
namespace LiamWiltshire\LaravelJitLoader\Tests;
44

5-
65
use LiamWiltshire\LaravelJitLoader\Model;
76

8-
class DummyModel extends Model {
9-
7+
class DummyModel extends Model
8+
{
109
protected $fillable = ['dummy_model_id'];
1110

1211
public function myRelationship()
@@ -23,4 +22,4 @@ public function setAutoloadThreshold(int $autoloadThreshold)
2322
{
2423
$this->autoloadThreshold = $autoloadThreshold;
2524
}
26-
}
25+
}

tests/ModelTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace LiamWiltshire\LaravelJitLoader\Tests;
44

5-
65
class ModelTest extends TestCase
76
{
87
public function testGetRelationshipFromMethodWithNonExistentRelationshipThrowsException()
@@ -39,5 +38,3 @@ public function testGetRelationshipFromMethodUnderThresholdDoesAutoLoad()
3938
$this->assertTrue($models[1]->relationLoaded('myRelationship'));
4039
}
4140
}
42-
43-

tests/TestCase.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88

99
namespace LiamWiltshire\LaravelJitLoader\Tests;
1010

11-
1211
use Illuminate\Database\Capsule\Manager;
1312

1413
class TestCase extends \PHPUnit\Framework\TestCase
1514
{
16-
1715
public $db;
1816

1917
public $messages = [];
@@ -42,7 +40,7 @@ protected function configureDatabase()
4240

4341
public function migrateIdentitiesTable()
4442
{
45-
Manager::schema()->create('dummy_models', function($table) {
43+
Manager::schema()->create('dummy_models', function ($table) {
4644
$table->increments('id');
4745
$table->integer('dummy_model_id');
4846
$table->timestamps();
@@ -54,7 +52,7 @@ public function migrateIdentitiesTable()
5452
$x--;
5553
}
5654

57-
Manager::schema()->create('trait_models', function($table) {
55+
Manager::schema()->create('trait_models', function ($table) {
5856
$table->increments('id');
5957
$table->integer('trait_model_id');
6058
$table->timestamps();
@@ -66,7 +64,7 @@ public function migrateIdentitiesTable()
6664
$x--;
6765
}
6866

69-
Manager::schema()->create('traitless_models', function($table) {
67+
Manager::schema()->create('traitless_models', function ($table) {
7068
$table->increments('id');
7169
$table->integer('traitless_model_id');
7270
$table->timestamps();
@@ -77,7 +75,6 @@ public function migrateIdentitiesTable()
7775
TraitlessModel::create(array('traitless_model_id' => $x));
7876
$x--;
7977
}
80-
8178
}
8279

8380
public function __destruct()
@@ -89,4 +86,4 @@ public function __destruct()
8986
}
9087
parent::tearDown(); // TODO: Change the autogenerated stub
9188
}
92-
}
89+
}

tests/TraitModel.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
namespace LiamWiltshire\LaravelJitLoader\Tests;
44

5-
65
use Illuminate\Database\Eloquent\Model;
76
use LiamWiltshire\LaravelJitLoader\Concerns\AutoloadsRelationships;
87
use Psr\Log\LoggerInterface;
98

10-
class TraitModel extends Model {
11-
9+
class TraitModel extends Model
10+
{
1211
use AutoloadsRelationships;
1312

1413
protected $fillable = ['trait_model_id'];
@@ -33,4 +32,4 @@ public function setLogging(string $channel, LoggerInterface $logger)
3332
$this->logChannel = $channel;
3433
$this->logDriver = $logger;
3534
}
36-
}
35+
}

tests/TraitlessModel.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
namespace LiamWiltshire\LaravelJitLoader\Tests;
44

5-
65
use Illuminate\Database\Eloquent\Model;
76
use Psr\Log\LoggerInterface;
87

9-
class TraitlessModel extends Model {
10-
8+
class TraitlessModel extends Model
9+
{
1110
protected $fillable = ['traitless_model_id'];
1211

1312
public function myRelationship()
@@ -30,4 +29,4 @@ public function setLogging(string $channel, LoggerInterface $logger)
3029
$this->logChannel = $channel;
3130
$this->logDriver = $logger;
3231
}
33-
}
32+
}

0 commit comments

Comments
 (0)