Skip to content

Commit e87ae35

Browse files
committed
psr2
1 parent 14728cf commit e87ae35

File tree

9 files changed

+15
-17
lines changed

9 files changed

+15
-17
lines changed

src/CleanActivitylogCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class CleanActivitylogCommand extends Command
1414
* @var string
1515
*/
1616
protected $signature = 'activitylog:clean';
17-
17+
1818
/**
1919
* The console command description.
2020
*

src/Exceptions/CouldNotLogActivity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ public static function couldNotDetermineUser($id)
1010
{
1111
return new static("Could not determine a user with identifier `{$id}`.");
1212
}
13-
}
13+
}

src/Models/Activity.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ public function causer(): MorphTo
2222
{
2323
return $this->morphTo();
2424
}
25-
25+
2626
/**
2727
* Get the extra properties with the given name.
2828
*
2929
* @param $propertyName
30+
*
3031
* @return mixed
3132
*/
3233
public function getExtraProperty(string $propertyName)

src/Traits/LogsActivity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ protected static function bootLogsActivity()
1919
if ($description == '') {
2020
return;
2121
}
22-
22+
2323
$extraProperties = [];
2424
if ($eventName != 'deleted') {
2525
$extraProperties['changes'] = $model->getChanges();

src/helpers.php

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

33
use Spatie\Activitylog\ActivityLogger;
44

5-
if (! function_exists('activity')) {
6-
7-
function activity(): ActivityLogger {
5+
if (!function_exists('activity')) {
6+
function activity(): ActivityLogger
7+
{
88
return app(ActivityLogger::class);
99
}
10-
1110
}

tests/ActivityloggerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ public function it_can_log_an_activity()
1515

1616
$this->assertEquals($activityDescription, Activity::first()->description);
1717
}
18-
}
18+
}

tests/Models/Article.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
class Article extends Model
88
{
99
protected $guarded = [];
10-
}
10+
}

tests/Models/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ class User extends Model
1010
use CausesActivity;
1111

1212
protected $guarded = [];
13-
}
13+
}

tests/TestCase.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function setUp()
2020
protected function getPackageProviders($app)
2121
{
2222
return [
23-
ActivitylogServiceProvider::class
23+
ActivitylogServiceProvider::class,
2424
];
2525
}
2626

@@ -30,7 +30,7 @@ public function getEnvironmentSetUp($app)
3030

3131
$app['config']->set('database.connections.sqlite', [
3232
'driver' => 'sqlite',
33-
'database' => $this->getTempDirectory() . '/database.sqlite',
33+
'database' => $this->getTempDirectory().'/database.sqlite',
3434
'prefix' => '',
3535
]);
3636
$app['config']->set('app.key', '6rE9Nz59bGRbeMATftriyQjrpF7DcOQm');
@@ -48,7 +48,7 @@ protected function setUpDatabase()
4848

4949
protected function resetDatabase()
5050
{
51-
file_put_contents($this->getTempDirectory() . '/database.sqlite', null);
51+
file_put_contents($this->getTempDirectory().'/database.sqlite', null);
5252
}
5353

5454
protected function createActivityLogTable()
@@ -60,7 +60,7 @@ protected function createActivityLogTable()
6060

6161
public function getTempDirectory(): string
6262
{
63-
return __DIR__ . '/temp';
63+
return __DIR__.'/temp';
6464
}
6565

6666
protected function createTables(...$tableNames)
@@ -82,6 +82,4 @@ protected function seedModels(...$modelClasses)
8282
}
8383
});
8484
}
85-
86-
8785
}

0 commit comments

Comments
 (0)