Apply fixes from StyleCI
This commit is contained in:
committed by
StyleCI Bot
parent
3ac7492858
commit
bdb3619bc9
@@ -18,7 +18,6 @@ use CachetHQ\Cachet\Models\Component;
|
||||
use GrahamCampbell\Binput\Facades\Binput;
|
||||
use Illuminate\Contracts\Auth\Guard;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
|
||||
|
||||
@@ -19,8 +19,6 @@ use CachetHQ\Cachet\Models\Component;
|
||||
use CachetHQ\Cachet\Models\ComponentGroup;
|
||||
use GrahamCampbell\Binput\Facades\Binput;
|
||||
use Illuminate\Routing\Controller;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\View;
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,13 +64,13 @@ class Tag extends Model
|
||||
public static function findOrCreate($values)
|
||||
{
|
||||
$tags = collect($values)->map(function ($value) {
|
||||
if ($value instanceof Tag) {
|
||||
if ($value instanceof self) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
$tag = static::where('name', '=', $value)->first();
|
||||
|
||||
if (!$tag instanceof Tag) {
|
||||
if (!$tag instanceof self) {
|
||||
$tag = static::create([
|
||||
'name' => $value,
|
||||
'slug' => Str::slug($value),
|
||||
|
||||
@@ -64,7 +64,7 @@ trait HasTags
|
||||
*/
|
||||
public function setTagsAttribute($tags)
|
||||
{
|
||||
if (! $this->exists) {
|
||||
if (!$this->exists) {
|
||||
$this->queuedTags = $tags;
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user