Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:austintoddj/canvas into develop
Browse files Browse the repository at this point in the history
* 'develop' of github.com:austintoddj/canvas:
  Apply fixes from StyleCI (#992)
  • Loading branch information
austintoddj committed Sep 3, 2021
2 parents fc77470 + 9694a30 commit 7148abf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Models/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Post extends Model
* @var array
*/
protected $appends = [
'read_time'
'read_time',
];

/**
Expand Down Expand Up @@ -161,10 +161,10 @@ public function getReadTimeAttribute(): string
// The user is optional since we append this attribute
// to every model and we may be creating a new one
return vsprintf('%d %s %s', [
$minutes,
Str::plural(trans('canvas::app.min', [], optional(request()->user())->locale), $minutes),
trans('canvas::app.read', [], optional(request()->user())->locale),
]
$minutes,
Str::plural(trans('canvas::app.min', [], optional(request()->user())->locale), $minutes),
trans('canvas::app.read', [], optional(request()->user())->locale),
]
);
}

Expand All @@ -175,7 +175,7 @@ public function getReadTimeAttribute(): string
*/
public function getPublishedAttribute(): bool
{
return !is_null($this->published_at) && $this->published_at <= now()->toDateTimeString();
return ! is_null($this->published_at) && $this->published_at <= now()->toDateTimeString();
}

/**
Expand Down

0 comments on commit 7148abf

Please sign in to comment.