Skip to content
Permalink
Browse files

Merge pull request #1 from akoSalman/analysis-z4P25P

Apply fixes from StyleCI
  • Loading branch information...
akoSalman committed Apr 11, 2019
2 parents 5159749 + 0abada0 commit fa619b49db91f877244894a0e36cfd7dc5d2700d
Showing with 6 additions and 7 deletions.
  1. +5 −5 src/Traits/LogsActivity.php
  2. +1 −2 tests/LogsActivityTest.php
@@ -34,7 +34,7 @@ protected static function bootLogsActivity()
$attrs = $model->attributeValuesToBeLogged($eventName);
if ($model->isLogEmpty($attrs) && !$model->shouldSubmitEmptyLogs()) {
if ($model->isLogEmpty($attrs) && ! $model->shouldSubmitEmptyLogs()) {
return;
}
@@ -52,14 +52,14 @@ protected static function bootLogsActivity()
});
}
public function shouldSubmitEmptyLogs (): bool
public function shouldSubmitEmptyLogs(): bool
{
return !isset(static::$submitEmptyLogs) ? true : static::$submitEmptyLogs;
return ! isset(static::$submitEmptyLogs) ? true : static::$submitEmptyLogs;
}
public function isLogEmpty ($attrs): bool
public function isLogEmpty($attrs): bool
{
return empty($attrs['attributes'] ?? []) && !count($attrs['old'] ?? []);
return empty($attrs['attributes'] ?? []) && ! count($attrs['old'] ?? []);
}
public function disableLogging()
@@ -330,7 +330,7 @@ public function tapActivity(Activity $activity, string $eventName)
$this->assertEquals(Carbon::yesterday()->startOfDay()->format('Y-m-d H:i:s'), $firstActivity->created_at->format('Y-m-d H:i:s'));
}
/** @test */
/** @test */
public function it_will_not_submit_log_when_there_is_no_changes()
{
$model = new class() extends Article {
@@ -339,7 +339,6 @@ public function it_will_not_submit_log_when_there_is_no_changes()
protected static $submitEmptyLogs = false;
protected static $logAttributes = ['text'];
protected static $logOnlyDirty = true;
};
$entity = new $model();

0 comments on commit fa619b4

Please sign in to comment.
You can’t perform that action at this time.