Passed
Pull Request — master (#227)
by Anton
02:58
created
src/Reacterable/ReacterableEloquentBuilderTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     ): Builder {
31 31
         return $this->whereHas(
32 32
             'loveReacter.reactions',
33
-            function (Builder $reactionsQuery) use ($reactable, $reactionTypeName): void {
33
+            function (Builder $reactionsQuery) use ($reactable, $reactionTypeName) : void {
34 34
                 $reactionsQuery->where('reactant_id', $reactable->getLoveReactant()->getId());
35 35
                 if ($reactionTypeName !== null) {
36 36
                     $reactionsQuery->where('reaction_type_id', ReactionType::fromName($reactionTypeName)->getId());
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     ): Builder {
46 46
         return $this->whereDoesntHave(
47 47
             'loveReacter.reactions',
48
-            function (Builder $reactionsQuery) use ($reactable, $reactionTypeName): void {
48
+            function (Builder $reactionsQuery) use ($reactable, $reactionTypeName) : void {
49 49
                 $reactionsQuery->where('reactant_id', $reactable->getLoveReactant()->getId());
50 50
                 if ($reactionTypeName !== null) {
51 51
                     $reactionsQuery->where('reaction_type_id', ReactionType::fromName($reactionTypeName)->getId());
@@ -67,14 +67,14 @@  discard block
 block discarded – undo
67 67
                 $reactedAtFrom,
68 68
                 $reactedAtTo,
69 69
                 $reactionTypeName,
70
-            ): void {
70
+            ) : void {
71 71
                 $reactionsQuery->where(
72 72
                     'reactant_id',
73 73
                     $reactable->getLoveReactant()->getId(),
74 74
                 );
75 75
 
76 76
                 $reactionsQuery->whereBetween(
77
-                    (new Reaction())->getTable() . '.created_at',
77
+                    (new Reaction())->getTable().'.created_at',
78 78
                     [$reactedAtFrom, $reactedAtTo],
79 79
                 );
80 80
 
Please login to merge, or discard this patch.
src/Reactable/ReactableEloquentBuilderTrait.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     ): Builder {
34 34
         return $this->whereHas(
35 35
             'loveReactant.reactions',
36
-            function (Builder $reactionsQuery) use ($reacterable, $reactionTypeName): void {
36
+            function (Builder $reactionsQuery) use ($reacterable, $reactionTypeName) : void {
37 37
                 $reactionsQuery->where('reacter_id', $reacterable->getLoveReacter()->getId());
38 38
                 if ($reactionTypeName !== null) {
39 39
                     $reactionsQuery->where('reaction_type_id', ReactionType::fromName($reactionTypeName)->getId());
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     ): Builder {
49 49
         return $this->whereDoesntHave(
50 50
             'loveReactant.reactions',
51
-            function (Builder $reactionsQuery) use ($reacterable, $reactionTypeName): void {
51
+            function (Builder $reactionsQuery) use ($reacterable, $reactionTypeName) : void {
52 52
                 $reactionsQuery->where('reacter_id', $reacterable->getLoveReacter()->getId());
53 53
                 if ($reactionTypeName !== null) {
54 54
                     $reactionsQuery->where('reaction_type_id', ReactionType::fromName($reactionTypeName)->getId());
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         ?string $alias = null,
63 63
     ): Builder {
64 64
         $reactionType = ReactionType::fromName($reactionTypeName);
65
-        $alias = $alias === null ? 'reaction_' . Str::snake($reactionType->getName()) : $alias;
65
+        $alias = $alias === null ? 'reaction_'.Str::snake($reactionType->getName()) : $alias;
66 66
 
67 67
         $select = $this->getQuery()->columns ?? ["{$this->getModel()->getTable()}.*"];
68 68
         $select[] = DB::raw("COALESCE({$alias}.count, 0) as {$alias}_count");
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
         return $this
72 72
             ->leftJoin(
73
-                (new ReactionCounter())->getTable() . ' as ' . $alias,
73
+                (new ReactionCounter())->getTable().' as '.$alias,
74 74
                 function (JoinClause $join) use ($reactionType, $alias): void {
75 75
                     $join->on("{$alias}.reactant_id", '=', "{$this->getModel()->getTable()}.love_reactant_id");
76 76
                     $join->where("{$alias}.reaction_type_id", $reactionType->getId());
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
         return $this
91 91
             ->leftJoin(
92
-                (new ReactionTotal())->getTable() . ' as ' . $alias,
92
+                (new ReactionTotal())->getTable().' as '.$alias,
93 93
                 "{$alias}.reactant_id",
94 94
                 '=',
95 95
                 "{$this->getModel()->getTable()}.love_reactant_id"
Please login to merge, or discard this patch.
src/Support/Database/AddForeignColumnStub.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 
59 59
     private function getStubsPath(): string
60 60
     {
61
-        return __DIR__ . '/Stubs';
61
+        return __DIR__.'/Stubs';
62 62
     }
63 63
 
64 64
     /**
Please login to merge, or discard this patch.
src/LoveServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
     {
96 96
         if ($this->app->runningInConsole()) {
97 97
             $this->publishes([
98
-                __DIR__ . '/../config/love.php' => config_path('love.php'),
98
+                __DIR__.'/../config/love.php' => config_path('love.php'),
99 99
             ], 'love-config');
100 100
 
101 101
             $this->publishes([
102
-                __DIR__ . '/../database/migrations' => database_path('migrations'),
102
+                __DIR__.'/../database/migrations' => database_path('migrations'),
103 103
             ], 'love-migrations');
104 104
         }
105 105
     }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     private function registerMigrations(): void
111 111
     {
112 112
         if ($this->app->runningInConsole() && $this->shouldLoadDefaultMigrations()) {
113
-            $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
113
+            $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
114 114
         }
115 115
     }
116 116
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     private function configure(): void
121 121
     {
122 122
         if (!$this->app->configurationIsCached()) {
123
-            $this->mergeConfigFrom(__DIR__ . '/../config/love.php', 'love');
123
+            $this->mergeConfigFrom(__DIR__.'/../config/love.php', 'love');
124 124
         }
125 125
     }
126 126
 }
Please login to merge, or discard this patch.