Completed
Push — master ( 87c960...50a753 )
by Can
03:58 queued 55s
created
src/CanRate.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Models/Rating.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
database/factories/SimplePageFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 |
11 11
 */
12 12
 
13
-$factory->define(\Canylmz\Rating\Test\Models\SimplePage::class, function () {
13
+$factory->define(\Canylmz\Rating\Test\Models\SimplePage::class, function() {
14 14
     return [
15 15
         'name' => 'Page'.str_random(5),
16 16
     ];
Please login to merge, or discard this patch.
database/factories/UserFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 |
11 11
 */
12 12
 
13
-$factory->define(\Canylmz\Rating\Test\Models\User::class, function () {
13
+$factory->define(\Canylmz\Rating\Test\Models\User::class, function() {
14 14
     return [
15 15
         'name'           => 'Name'.str_random(5),
16 16
         'email'          => str_random(5).'@gmail.com',
Please login to merge, or discard this patch.
database/factories/PageFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 |
11 11
 */
12 12
 
13
-$factory->define(\Canylmz\Rating\Test\Models\Page::class, function () {
13
+$factory->define(\Canylmz\Rating\Test\Models\Page::class, function() {
14 14
     return [
15 15
         'name' => 'Page'.str_random(5),
16 16
     ];
Please login to merge, or discard this patch.
database/migrations/2019_10_19_000000_create_rating_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
tests/database/factories/PostFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 |
15 15
 */
16 16
 
17
-$factory->define(Post::class, function () {
17
+$factory->define(Post::class, function() {
18 18
     return [
19 19
         'name' => 'Post '.Str::random(5),
20 20
     ];
Please login to merge, or discard this patch.
tests/database/migrations/2019_03_08_010000_create_posts_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('posts', function (Blueprint $table) {
16
+        Schema::create('posts', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->string('name');
19 19
             $table->timestamps();
Please login to merge, or discard this patch.
tests/database/migrations/2019_03_08_020000_create_members_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('members', function (Blueprint $table) {
16
+        Schema::create('members', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->string('name');
19 19
             $table->timestamps();
Please login to merge, or discard this patch.