@@ -30,7 +30,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -58,7 +58,7 @@ |
||
58 | 58 | |
59 | 59 | private function getStubsPath(): string |
60 | 60 | { |
61 | - return __DIR__ . '/Stubs'; |
|
61 | + return __DIR__.'/Stubs'; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
@@ -95,11 +95,11 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | ): Builder { |
33 | 33 | return $this->whereHas( |
34 | 34 | 'loveReactant.reactions', |
35 | - function (Builder $reactionsQuery) use ($reacterable, $reactionTypeName): void { |
|
35 | + function (Builder $reactionsQuery) use ($reacterable, $reactionTypeName) : void { |
|
36 | 36 | $reactionsQuery->where('reacter_id', $reacterable->getLoveReacter()->getId()); |
37 | 37 | if ($reactionTypeName !== null) { |
38 | 38 | $reactionsQuery->where('reaction_type_id', ReactionType::fromName($reactionTypeName)->getId()); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | ): Builder { |
48 | 48 | return $this->whereDoesntHave( |
49 | 49 | 'loveReactant.reactions', |
50 | - function (Builder $reactionsQuery) use ($reacterable, $reactionTypeName): void { |
|
50 | + function (Builder $reactionsQuery) use ($reacterable, $reactionTypeName) : void { |
|
51 | 51 | $reactionsQuery->where('reacter_id', $reacterable->getLoveReacter()->getId()); |
52 | 52 | if ($reactionTypeName !== null) { |
53 | 53 | $reactionsQuery->where('reaction_type_id', ReactionType::fromName($reactionTypeName)->getId()); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | ?string $alias = null, |
62 | 62 | ): Builder { |
63 | 63 | $reactionType = ReactionType::fromName($reactionTypeName); |
64 | - $alias = $alias === null ? 'reaction_' . Str::snake($reactionType->getName()) : $alias; |
|
64 | + $alias = $alias === null ? 'reaction_'.Str::snake($reactionType->getName()) : $alias; |
|
65 | 65 | |
66 | 66 | $select = $this->getQuery()->columns ?? ["{$this->getModel()->getTable()}.*"]; |
67 | 67 | $select[] = $this->raw("COALESCE({$alias}.count, 0) as {$alias}_count"); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | return $this |
71 | 71 | ->leftJoin( |
72 | - (new ReactionCounter())->getTable() . ' as ' . $alias, |
|
72 | + (new ReactionCounter())->getTable().' as '.$alias, |
|
73 | 73 | function (JoinClause $join) use ($reactionType, $alias): void { |
74 | 74 | $join->on("{$alias}.reactant_id", '=', "{$this->getModel()->getTable()}.love_reactant_id"); |
75 | 75 | $join->where("{$alias}.reaction_type_id", $reactionType->getId()); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | return $this |
90 | 90 | ->leftJoin( |
91 | - (new ReactionTotal())->getTable() . ' as ' . $alias, |
|
91 | + (new ReactionTotal())->getTable().' as '.$alias, |
|
92 | 92 | "{$alias}.reactant_id", |
93 | 93 | '=', |
94 | 94 | "{$this->getModel()->getTable()}.love_reactant_id" |