@@ -11,7 +11,7 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | public function up() |
| 13 | 13 | { |
| 14 | - Schema::create(config('rating.table_name', 'ratings'), function (Blueprint $table) { |
|
| 14 | + Schema::create(config('rating.table_name', 'ratings'), function(Blueprint $table) { |
|
| 15 | 15 | $table->increments('id'); |
| 16 | 16 | $table->string('rater_type')->nullable(); |
| 17 | 17 | $table->integer('rater_id')->nullable(); |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function __construct(array $attributes = []) |
| 10 | 10 | { |
| 11 | - if (! isset($this->table)) { |
|
| 11 | + if (!isset($this->table)) { |
|
| 12 | 12 | $this->setTable(config('rating.table_name')); |
| 13 | 13 | } |
| 14 | 14 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | public function isRateable($model): bool |
| 33 | 33 | { |
| 34 | - if (! $model instanceof Rateable && ! $model instanceof Rating) { |
|
| 34 | + if (!$model instanceof Rateable && !$model instanceof Rating) { |
|
| 35 | 35 | throw ModelNotRateable::create($model); |
| 36 | 36 | } |
| 37 | 37 | |
@@ -46,11 +46,11 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function hasRated($model): bool |
| 48 | 48 | { |
| 49 | - if (! $this->isRateable($model)) { |
|
| 49 | + if (!$this->isRateable($model)) { |
|
| 50 | 50 | return false; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - return (bool) ! is_null($this->ratings($model->getMorphClass())->find($model->getKey())); |
|
| 53 | + return (bool) !is_null($this->ratings($model->getMorphClass())->find($model->getKey())); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function addRatingFor($model, $rating): bool |
| 64 | 64 | { |
| 65 | - if (! $this->isRateable($model)) { |
|
| 65 | + if (!$this->isRateable($model)) { |
|
| 66 | 66 | return false; |
| 67 | 67 | } |
| 68 | 68 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | public function updateRatingFor($model, $rating): bool |
| 91 | 91 | { |
| 92 | - if (! $this->isRateable($model)) { |
|
| 92 | + if (!$this->isRateable($model)) { |
|
| 93 | 93 | return false; |
| 94 | 94 | } |
| 95 | 95 | |
@@ -125,11 +125,11 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | public function deleteRatingFor($model): bool |
| 127 | 127 | { |
| 128 | - if (! $this->isRateable($model)) { |
|
| 128 | + if (!$this->isRateable($model)) { |
|
| 129 | 129 | return false; |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | - if (! $this->hasRated($model)) { |
|
| 132 | + if (!$this->hasRated($model)) { |
|
| 133 | 133 | return false; |
| 134 | 134 | } |
| 135 | 135 | |