@@ -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(),  | 
                                                        
@@ -78,7 +78,7 @@  | 
                                                    ||
| 78 | 78 | |
| 79 | 79 |          Mail::to(config('xetaravel.site.contact_email'))->send(new Contact($details)); | 
                                                        
| 80 | 80 | |
| 81 | - return redirect()  | 
                                                        |
| 81 | + return redirect()  | 
                                                        |
| 82 | 82 |              ->route('page.contact') | 
                                                        
| 83 | 83 |              ->with('success', 'Thanks for contacting me ! I will answer you as fast as I can !'); | 
                                                        
| 84 | 84 | }  | 
                                                        
@@ -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,7 +85,7 @@ discard block  | 
                                                    ||
| 85 | 85 | ->preservingOriginal()  | 
                                                        
| 86 | 86 | ->setName(substr(md5($article->slug), 0, 10))  | 
                                                        
| 87 | 87 | ->setFileName(  | 
                                                        
| 88 | - substr(md5($article->slug), 0, 10) . '.' . (is_string($banner) ? 'jpg' : $banner->extension())  | 
                                                        |
| 88 | + substr(md5($article->slug), 0, 10) . '.' . (is_string($banner) ? 'jpg' : $banner->extension())  | 
                                                        |
| 89 | 89 | )  | 
                                                        
| 90 | 90 |              ->toMediaCollection('article'); | 
                                                        
| 91 | 91 | |
@@ -162,7 +162,7 @@ discard block  | 
                                                    ||
| 162 | 162 | ->preservingOriginal()  | 
                                                        
| 163 | 163 | ->setName(substr(md5($article->slug), 0, 10))  | 
                                                        
| 164 | 164 | ->setFileName(  | 
                                                        
| 165 | - substr(md5($article->slug), 0, 10) . '.' . (is_string($banner) ? 'jpg' : $banner->extension())  | 
                                                        |
| 165 | + substr(md5($article->slug), 0, 10) . '.' . (is_string($banner) ? 'jpg' : $banner->extension())  | 
                                                        |
| 166 | 166 | )  | 
                                                        
| 167 | 167 |                  ->toMediaCollection('article'); | 
                                                        
| 168 | 168 | }  | 
                                                        
@@ -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;  | 
                                                        
@@ -8,7 +8,7 @@  | 
                                                    ||
| 8 | 8 | final class GithubPullRequestParser implements InlineParserInterface  | 
                                                        
| 9 | 9 |  { | 
                                                        
| 10 | 10 | // Regex used to match Github pull request link.  | 
                                                        
| 11 | - const REGEXP_PURLLREQUEST = '\bhttps?:\/\/github\.com\/(?<repo>[\w-]+\/[\w-]+)\/'.  | 
                                                        |
| 11 | + const REGEXP_PURLLREQUEST = '\bhttps?:\/\/github\.com\/(?<repo>[\w-]+\/[\w-]+)\/' .  | 
                                                        |
| 12 | 12 | '(?<type>issues|pull)\/(?<issue>\d+)';  | 
                                                        
| 13 | 13 | |
| 14 | 14 | public function getMatchDefinition(): InlineParserMatch  | 
                                                        
@@ -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 | }  | 
                                                        
@@ -95,7 +95,7 @@  | 
                                                    ||
| 95 | 95 |          } elseif ($level['matchExactXPLevel'] == true) { | 
                                                        
| 96 | 96 | $level['currentProgression'] = 0;  | 
                                                        
| 97 | 97 |          } else { | 
                                                        
| 98 | - $level['currentProgression'] = ($level['currentUserExperience'] / $level['nextLevelExperience'])*100;  | 
                                                        |
| 98 | + $level['currentProgression'] = ($level['currentUserExperience'] / $level['nextLevelExperience']) * 100;  | 
                                                        |
| 99 | 99 | }  | 
                                                        
| 100 | 100 | |
| 101 | 101 | return view(  | 
                                                        
@@ -225,8 +225,7 @@  | 
                                                    ||
| 225 | 225 |                  if ($type == 'success') { | 
                                                        
| 226 | 226 | session()->flash(  | 
                                                        
| 227 | 227 | 'success',  | 
                                                        
| 228 | - $this->isCreating ? "The category has been created successfully !" :  | 
                                                        |
| 229 | -                            "The category <b>{$this->model->title}</b> has been edited successfully !" | 
                                                        |
| 228 | +                        $this->isCreating ? "The category has been created successfully !" : "The category <b>{$this->model->title}</b> has been edited successfully !" | 
                                                        |
| 230 | 229 | );  | 
                                                        
| 231 | 230 |                  } else { | 
                                                        
| 232 | 231 |                      session()->flash('danger', "An error occurred while saving the category !"); |