Test Failed
Pull Request — master (#39)
by guillaume
04:58
created
app/Http/Middleware/CheckRole.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public function handle($request, Closure $next)
18 18
     {
19
-        if(Auth::user() !== null && !Auth::user()->hasRole('admin')){
19
+        if (Auth::user() !== null && !Auth::user()->hasRole('admin')) {
20 20
             //return redirect(env('WIKI_URL'));
21 21
         }
22 22
         return $next($request);
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/ForgotPasswordController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         // need to show to the user. Finally, we'll send out a proper response.
39 39
         $response = $this->broker()->sendResetLink(
40 40
             $this->credentials($request),
41
-            function ($user, $token){
41
+            function($user, $token) {
42 42
                 Mail::to($user->email)
43 43
                     ->send(new PasswordResetLink($user, $token));
44 44
             }
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/RegisterController.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     {
33 33
         $email = $firstname = $lastname = '';
34 34
 
35
-        if($request->session()->has('user_to_register')){
35
+        if ($request->session()->has('user_to_register')) {
36 36
             $user = $request->session()->get('user_to_register');
37 37
             $email = $user['email'];
38 38
             $firstname = $user['firstname'];
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     protected function validator(array $data)
50 50
     {
51
-        if(session()->has('should_attach_to_organization')) {
51
+        if (session()->has('should_attach_to_organization')) {
52 52
             session()->reflash();
53 53
         }
54 54
         return Validator::make($data, [
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
 
71 71
     protected function registered(Request $request, $user)
72 72
     {
73
-        if($request->session()->has('should_attach_to_organization')){
73
+        if ($request->session()->has('should_attach_to_organization')) {
74 74
             app(AttachUserToAnOrganization::class)->attach($user->uuid, $request->session()->get('should_attach_to_organization'));
75 75
         }
76 76
 
77
-        if($request->session()->has('wiki_callback')){
77
+        if ($request->session()->has('wiki_callback')) {
78 78
             $user = Auth::user();
79 79
             $user->wiki_token = $request->session()->get('wiki_token');
80 80
             $user->save();
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     public function redirectToProvider(string $provider)
87 87
     {
88 88
         config(['services.'.$provider.'.redirect' => env(strtoupper($provider).'_CALLBACK')]);
89
-        if($provider === 'twitter'){
89
+        if ($provider === 'twitter') {
90 90
             return Socialite::driver($provider)->redirect();
91 91
         }
92 92
         return Socialite::driver($provider)->redirectUrl(config('services.'.$provider.'.redirect'))->redirect();
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             return $request->wantsJson()
113 113
                 ? new Response('', 201)
114 114
                 : redirect($this->redirectPath());*/
115
-        }catch (ValidationException $e) {
115
+        } catch (ValidationException $e) {
116 116
             $attributes = $e->validator->attributes();
117 117
             $attributes['provider'] = $provider;
118 118
             return redirect()->route('register-social-network')
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
             return $request->wantsJson()
113 113
                 ? new Response('', 201)
114 114
                 : redirect($this->redirectPath());*/
115
-        }catch (ValidationException $e) {
115
+        } catch (ValidationException $e) {
116 116
             $attributes = $e->validator->attributes();
117 117
             $attributes['provider'] = $provider;
118 118
             return redirect()->route('register-social-network')
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/LoginController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     public function showLoginForm(Request $request)
26 26
     {
27 27
         session()->reflash();
28
-        if($request->has('wiki_callback')){
28
+        if ($request->has('wiki_callback')) {
29 29
             session()->flash('wiki_callback', $request->input('wiki_callback'));
30 30
             session()->flash('wiki_token', $request->input('wiki_token'));
31 31
         }
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
     public function logout(Request $request)
36 36
     {
37
-        if($request->session()->has('should_attach_to_organization')) {
37
+        if ($request->session()->has('should_attach_to_organization')) {
38 38
             $shouldAttach = $request->session()->get('should_attach_to_organization');
39 39
             $shouldAttachToken = $request->session()->get('should_attach_to_organization_token');
40 40
             $linkToRedirect = $request->session()->get('should_attach_to_organization_redirect');
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
         $request->session()->regenerateToken();
48 48
 
49
-        if(isset($shouldAttach)){
49
+        if (isset($shouldAttach)) {
50 50
             $request->session()->flash('should_attach_to_organization', $shouldAttach);
51 51
             $request->session()->flash('should_attach_to_organization_token', $shouldAttachToken);
52 52
             $request->session()->flash('should_attach_to_organization_redirect', $linkToRedirect);
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     protected function loggedOut(Request $request)
65 65
     {
66 66
         $request->session()->reflash();
67
-        if($request->session()->has('should_attach_to_organization')){
67
+        if ($request->session()->has('should_attach_to_organization')) {
68 68
             $linkToRedirect = $request->session()->get('should_attach_to_organization_redirect');
69 69
             return $request->wantsJson()
70 70
                 ? new Response('', 204)
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
 
75 75
     protected function authenticated(Request $request, $user)
76 76
     {
77
-        if($request->session()->has('wiki_callback')){
77
+        if ($request->session()->has('wiki_callback')) {
78 78
             $user = Auth::user();
79 79
             $user->wiki_token = $request->session()->get('wiki_token');
80 80
             $user->save();
81 81
             $callback = urldecode($request->session()->get('wiki_callback'));
82 82
             //return redirect($callback);
83 83
         }
84
-        if($request->session()->has('should_attach_to_organization') && $request->session()->get('should_attach_to_organization') !== null){
84
+        if ($request->session()->has('should_attach_to_organization') && $request->session()->get('should_attach_to_organization') !== null) {
85 85
             $token = $request->session()->get('should_attach_to_organization_token');
86 86
             $link = route('organization.invite.show').'?&token='.$token;
87 87
             return $request->wantsJson()
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     public function redirectToProvider(string $provider)
94 94
     {
95
-        if($provider === 'twitter'){
95
+        if ($provider === 'twitter') {
96 96
             config(['services.'.$provider.'.redirect' => env(strtoupper($provider).'_CALLBACK_LOGIN')]);
97 97
             return Socialite::driver($provider)->redirect();
98 98
         }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     {
106 106
         config(['services.'.$provider.'.redirect' => env(strtoupper($provider).'_CALLBACK_LOGIN')]);
107 107
         $logUserFromSocialNetwork->log($provider);
108
-        if(session()->has('wiki_callback')){
108
+        if (session()->has('wiki_callback')) {
109 109
             return $this->authenticated(request(), null);
110 110
         }
111 111
         return redirect()->route('home');
Please login to merge, or discard this patch.