Passed
Push — master ( 2b0762...9c76a8 )
by Bertrand
26:13 queued 17:43
created
app/Http/Middleware/Authenticate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@
 block discarded – undo
14 14
      */
15 15
     protected function redirectTo($request)
16 16
     {
17
-        if($request->has('sso')){
17
+        if ($request->has('sso')) {
18 18
             session()->put('sso', $request->get('sso'));
19 19
             session()->put('sig', $request->get('sig'));
20 20
         }
21 21
 
22
-        if (! $request->expectsJson()) {
22
+        if (!$request->expectsJson()) {
23 23
             return route('login');
24 24
         }
25 25
     }
Please login to merge, or discard this patch.
app/Http/Middleware/FlashWikiCallback.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
      */
16 16
     public function handle($request, Closure $next)
17 17
     {
18
-        if(session()->has('wiki_callback')){
18
+        if (session()->has('wiki_callback')) {
19 19
             session()->keep(['wiki_callback', 'wiki_token']);
20 20
         }
21 21
 
22
-        if($request->has('sso')){
22
+        if ($request->has('sso')) {
23 23
             session()->put('sso', $request->get('sso'));
24 24
             session()->put('sig', $request->get('sig'));
25 25
         }
Please login to merge, or discard this patch.
app/Listeners/SendCustomEmailVerificationNotification.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 handle(Registered $event)
13 13
     {
14
-        if (($event->user->providers === null || empty($event->user->providers)) && $event->user instanceof MustVerifyEmail && ! $event->user->hasVerifiedEmail()) {
14
+        if (($event->user->providers === null || empty($event->user->providers)) && $event->user instanceof MustVerifyEmail && !$event->user->hasVerifiedEmail()) {
15 15
             $event->user->sendEmailVerificationNotification();
16 16
         }
17 17
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/LoginController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
 
25 25
     public function showLoginForm(Request $request)
26 26
     {
27
-        if($request->session()->has('should_attach_to_organization')) {
27
+        if ($request->session()->has('should_attach_to_organization')) {
28 28
             session()->reflash();
29 29
         }
30 30
 
31
-        if($request->has('wiki_callback')){
31
+        if ($request->has('wiki_callback')) {
32 32
             session()->flash('wiki_callback', $request->input('wiki_callback'));
33 33
             session()->flash('wiki_token', $request->input('wiki_token'));
34 34
         }
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     public function logout(Request $request)
39 39
     {
40
-        if($request->session()->has('should_attach_to_organization')) {
40
+        if ($request->session()->has('should_attach_to_organization')) {
41 41
             $shouldAttach = $request->session()->get('should_attach_to_organization');
42 42
             $shouldAttachToken = $request->session()->get('should_attach_to_organization_token');
43 43
             $linkToRedirect = $request->session()->get('should_attach_to_organization_redirect');
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
         $request->session()->regenerateToken();
51 51
 
52
-        if(isset($shouldAttach)){
52
+        if (isset($shouldAttach)) {
53 53
             $request->session()->flash('should_attach_to_organization', $shouldAttach);
54 54
             $request->session()->flash('should_attach_to_organization_token', $shouldAttachToken);
55 55
             $request->session()->flash('should_attach_to_organization_redirect', $linkToRedirect);
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     protected function loggedOut(Request $request)
68 68
     {
69 69
         $request->session()->reflash();
70
-        if($request->session()->has('should_attach_to_organization')){
70
+        if ($request->session()->has('should_attach_to_organization')) {
71 71
             $linkToRedirect = $request->session()->get('should_attach_to_organization_redirect');
72 72
             return $request->wantsJson()
73 73
                 ? new Response('', 204)
@@ -77,12 +77,12 @@  discard block
 block discarded – undo
77 77
 
78 78
     protected function authenticated(Request $request, $user)
79 79
     {
80
-        if($user->context_id === null){
80
+        if ($user->context_id === null) {
81 81
             return redirect()->route('wizard.profile');
82 82
         }
83 83
 
84
-        if($request->session()->has('sso')){
85
-            if(!$user->hasVerifiedEmail()){
84
+        if ($request->session()->has('sso')) {
85
+            if (!$user->hasVerifiedEmail()) {
86 86
                 $request->session()->flash('from_forum', true);
87 87
                 return redirect()->route('email.verify');
88 88
             }
@@ -91,14 +91,14 @@  discard block
 block discarded – undo
91 91
             return redirect('discourse/sso?sso='.$sso.'&sig='.$sig);
92 92
         }
93 93
 
94
-        if($request->session()->has('wiki_callback')){
94
+        if ($request->session()->has('wiki_callback')) {
95 95
             $user->wiki_token = $request->session()->get('wiki_token');
96 96
             $user->save();
97 97
             $callback = urldecode($request->session()->get('wiki_callback'));
98 98
             return redirect($callback);
99 99
         }
100 100
 
101
-        if($request->session()->has('should_attach_to_organization') && $request->session()->get('should_attach_to_organization') !== null){
101
+        if ($request->session()->has('should_attach_to_organization') && $request->session()->get('should_attach_to_organization') !== null) {
102 102
             $token = $request->session()->get('should_attach_to_organization_token');
103 103
             $link = route('organization.invite.show').'?&token='.$token;
104 104
             return $request->wantsJson()
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
     public function redirectToProvider(string $provider)
112 112
     {
113
-        if($provider === 'twitter'){
113
+        if ($provider === 'twitter') {
114 114
             config(['services.'.$provider.'.redirect' => env(strtoupper($provider).'_CALLBACK_LOGIN')]);
115 115
             return Socialite::driver($provider)->redirect();
116 116
         }
Please login to merge, or discard this patch.
app/Http/Middleware/CheckEmailVerified.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
     public function handle($request, Closure $next)
12 12
     {
13 13
         $user = Auth::user();
14
-        if(!$user->hasVerifiedEmail()){
14
+        if (!$user->hasVerifiedEmail()) {
15 15
             $request->session()->flash('from_forum', true);
16 16
             return redirect()->route('verification.notice');
17 17
         }
Please login to merge, or discard this patch.
app/User.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function adminlte_image()
38 38
     {
39 39
         $urlPicture = $this->path_picture != "" ? asset('storage/'.str_replace('app/public/', '', $this->path_picture)) : null;
40
-        if(!isset($urlPicture) || $urlPicture === ""){
40
+        if (!isset($urlPicture) || $urlPicture === "") {
41 41
             $urlPicture = url('').'/'.config('adminlte.logo_img');
42 42
         }
43 43
         return $urlPicture;
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     public function adminlte_desc()
47 47
     {
48 48
         $desc = $this->firstname.' '.$this->lastname;
49
-        if($this->organization_id !== null){
49
+        if ($this->organization_id !== null) {
50 50
             $organization = app(OrganizationRepository::class)->get($this->organization_id);
51 51
             $desc .= ' - organisme : '.$organization->name();
52 52
         }
@@ -76,11 +76,11 @@  discard block
 block discarded – undo
76 76
     public function sendEmailVerificationNotification()
77 77
     {
78 78
         $callback = '';
79
-        if(session()->has('wiki_callback')){
79
+        if (session()->has('wiki_callback')) {
80 80
             $callback = base64_encode(urldecode(session()->get('wiki_callback')));
81 81
         }
82 82
 
83
-        if(session()->has('sso')){
83
+        if (session()->has('sso')) {
84 84
             $sso = session()->get('sso');
85 85
             $sig = session()->get('sig');
86 86
             $callback = base64_encode(url('discourse/sso?sso='.$sso.'&sig='.$sig));
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
 
106 106
     public function addCharacteristics(array $characteristics)
107 107
     {
108
-        foreach($characteristics as $characteristicUuid){
109
-            $characteristic = CharacteristicsModel::where('uuid', (string)$characteristicUuid)->first();
110
-            if(isset($characteristic)) {
108
+        foreach ($characteristics as $characteristicUuid) {
109
+            $characteristic = CharacteristicsModel::where('uuid', (string) $characteristicUuid)->first();
110
+            if (isset($characteristic)) {
111 111
                 $this->characteristics()->save($characteristic);
112 112
             }
113 113
         }
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
     public function syncCharacteristics(array $characteristics)
117 117
     {
118 118
         $characteristicsToSync = [];
119
-        foreach($characteristics as $characteristicUuid){
120
-            $characteristicModel = CharacteristicsModel::where('uuid', (string)$characteristicUuid)->first();
121
-            if(isset($characteristicModel)) {
119
+        foreach ($characteristics as $characteristicUuid) {
120
+            $characteristicModel = CharacteristicsModel::where('uuid', (string) $characteristicUuid)->first();
121
+            if (isset($characteristicModel)) {
122 122
                 $characteristicsToSync[] = $characteristicModel->id;
123 123
             }
124 124
         }
Please login to merge, or discard this patch.