@@ -15,11 +15,11 @@ |
||
15 | 15 | */ |
16 | 16 | public static function update(array $data, Session $session): Session |
17 | 17 | { |
18 | - $session->method = $data['method']; |
|
19 | - $session->url = $data['url']; |
|
18 | + $session->method = $data['method']; |
|
19 | + $session->url = $data['url']; |
|
20 | 20 | |
21 | 21 | if (isset($data['created_at'])) { |
22 | - $session->created_at = $data['created_at']; |
|
22 | + $session->created_at = $data['created_at']; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | $session->save(); |
@@ -35,9 +35,7 @@ |
||
35 | 35 | foreach ($records as $record) { |
36 | 36 | $agent->setUserAgent($record->user_agent); |
37 | 37 | |
38 | - $device_type = ($agent->isDesktop() ? 'desktop' : |
|
39 | - $agent->isPhone()) ? 'phone' : |
|
40 | - ($agent->isTablet() ? 'tablet' : 'unknown'); |
|
38 | + $device_type = ($agent->isDesktop() ? 'desktop' : $agent->isPhone()) ? 'phone' : ($agent->isTablet() ? 'tablet' : 'unknown'); |
|
41 | 39 | |
42 | 40 | $infos = [ |
43 | 41 | 'platform' => $agent->platform(), |
@@ -2,7 +2,7 @@ |
||
2 | 2 | namespace Xetaravel\Http\Controllers; |
3 | 3 | |
4 | 4 | use Illuminate\Http\RedirectResponse; |
5 | -use Illuminate\Http\Request ; |
|
5 | +use Illuminate\Http\Request; |
|
6 | 6 | use Illuminate\Support\Facades\App; |
7 | 7 | use Illuminate\Support\Facades\Auth; |
8 | 8 | use Illuminate\Support\Facades\Mail; |
@@ -85,8 +85,8 @@ |
||
85 | 85 | Mail::to(config('xetaravel.site.contact_email'))->send(new Contact($details)); |
86 | 86 | |
87 | 87 | return redirect() |
88 | - ->route('page.contact') |
|
89 | - ->with('success', 'Thanks for contacting me ! I will answer you as fast as I can !'); |
|
88 | + ->route('page.contact') |
|
89 | + ->with('success', 'Thanks for contacting me ! I will answer you as fast as I can !'); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
@@ -2,7 +2,7 @@ |
||
2 | 2 | namespace Xetaravel\Http\Controllers; |
3 | 3 | |
4 | 4 | use Illuminate\Http\RedirectResponse; |
5 | -use Illuminate\Http\Request ; |
|
5 | +use Illuminate\Http\Request; |
|
6 | 6 | use Xetaravel\Models\Newsletter; |
7 | 7 | use Xetaravel\Models\Repositories\NewsletterRepository; |
8 | 8 | use Xetaravel\Models\Validators\NewsletterValidator; |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function download($fileName) |
16 | 16 | { |
17 | - $filePath = public_path('files/'.$fileName); |
|
17 | + $filePath = public_path('files/' . $fileName); |
|
18 | 18 | |
19 | 19 | return response()->download($filePath); |
20 | 20 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | final class GithubPullRequestParser implements InlineParserInterface |
10 | 10 | { |
11 | 11 | // Regex used to match Github pull request link. |
12 | - public const REGEXP_PURLLREQUEST = '\bhttps?:\/\/github\.com\/(?<repo>[\w-]+\/[\w-]+)\/'. |
|
12 | + public const REGEXP_PURLLREQUEST = '\bhttps?:\/\/github\.com\/(?<repo>[\w-]+\/[\w-]+)\/' . |
|
13 | 13 | '(?<type>issues|pull)\/(?<issue>\d+)'; |
14 | 14 | |
15 | 15 | public function getMatchDefinition(): InlineParserMatch |
@@ -21,7 +21,7 @@ |
||
21 | 21 | * |
22 | 22 | * @return Response|RedirectResponse |
23 | 23 | */ |
24 | - public function handle(Request $request, Closure $next): Response|RedirectResponse |
|
24 | + public function handle(Request $request, Closure $next): Response | RedirectResponse |
|
25 | 25 | { |
26 | 26 | BlogArticle::addGlobalScope(new DisplayScope()); |
27 | 27 |
@@ -7,7 +7,7 @@ |
||
7 | 7 | use Psr\Container\NotFoundExceptionInterface; |
8 | 8 | use Xetaravel\Settings\Settings; |
9 | 9 | |
10 | -if (! function_exists('settings')) { |
|
10 | +if (!function_exists('settings')) { |
|
11 | 11 | /** |
12 | 12 | * @throws ContainerExceptionInterface |
13 | 13 | * @throws NotFoundExceptionInterface |
@@ -11,13 +11,13 @@ discard block |
||
11 | 11 | |
12 | 12 | class Settings |
13 | 13 | { |
14 | - protected null|array $context = [ |
|
14 | + protected null | array $context = [ |
|
15 | 15 | 'model_type' => null, |
16 | 16 | 'model_id' => null |
17 | 17 | ]; |
18 | 18 | |
19 | 19 | /** @var null|int */ |
20 | - protected null|int $siteId = null; |
|
20 | + protected null | int $siteId = null; |
|
21 | 21 | |
22 | 22 | public function __construct( |
23 | 23 | protected Cache $cache, |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * |
76 | 76 | * @return $this |
77 | 77 | */ |
78 | - public function setContext(Model|array|null $context = null): self |
|
78 | + public function setContext(Model | array | null $context = null): self |
|
79 | 79 | { |
80 | 80 | if ($context instanceof Model) { |
81 | 81 | $this->context['model_type'] = get_class($context); |