Test Setup Failed
Pull Request — master (#26)
by guillaume
16:27 queued 10:25
created
app/Http/Middleware/RedirectIfAuthenticated.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     public function handle($request, Closure $next, $guard = null)
20 20
     {
21
-        if($request->has('wiki_callback') && Auth::user() !== null){
21
+        if ($request->has('wiki_callback') && Auth::user() !== null) {
22 22
             return $this->redirectToWiki($request);
23 23
         }
24 24
 
Please login to merge, or discard this patch.
app/Http/Controllers/OrganizationsController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function listOrganizations(Request $request, ListOrganizations $listOrganizations)
53 53
     {
54
-        $page = $request->input('start')/10 + 1;
54
+        $page = $request->input('start')/10+1;
55 55
         $organizations = $listOrganizations->list($page, 10);
56 56
         $total = isset($organizations['total']) ? $organizations['total'] : 0;
57 57
         $list = [];
58
-        foreach ($organizations['list'] as $organization){
58
+        foreach ($organizations['list'] as $organization) {
59 59
             $org = $organization->toArray();
60 60
             $list[] = [
61 61
                 $org['name'],
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         return format($total, $list);
70 70
     }
71 71
 
72
-    public function prepareInvitation(Request $request,  PrepareInvitationUsersInOrganization $prepareInvitationUsersInOrganization)
72
+    public function prepareInvitation(Request $request, PrepareInvitationUsersInOrganization $prepareInvitationUsersInOrganization)
73 73
     {
74 74
         $users = $request->input('users');
75 75
         $users = explode(PHP_EOL, $users);
@@ -96,19 +96,19 @@  discard block
 block discarded – undo
96 96
     public function acceptInvite(Request $request, RespondInvitationToAnOrganization $respondInvitationToAnOrganization)
97 97
     {
98 98
         $action = $respondInvitationToAnOrganization->respond($token = $request->input('token'));
99
-        if($action['action'] == 'register'){
99
+        if ($action['action'] == 'register') {
100 100
             $request->session()->flash('should_attach_to_organization', $action['organization_id']);
101 101
             $request->session()->flash('user_to_register', $action['user']);
102 102
             return redirect()->route('register');
103 103
         }
104
-        if($action['action'] == 'accept_or_decline'){
104
+        if ($action['action'] == 'accept_or_decline') {
105 105
             $request->session()->flash('should_attach_to_organization', $action['organization_to_join']->id());
106 106
             return view('organizations.accept-or-decline-invitation', [
107 107
                 'old_organisation' => isset($action['old_organisation']) ? $action['old_organisation']->toArray() : null,
108 108
                 'organization_to_join' => isset($action['organization_to_join']) ? $action['organization_to_join']->toArray() : null
109 109
             ]);
110 110
         }
111
-        if($action['action'] == 'logout-login'){
111
+        if ($action['action'] == 'logout-login') {
112 112
             $request->session()->flash('should_attach_to_organization', $action['organization_to_join']->id());
113 113
             $request->session()->flash('should_attach_to_organization_token', $token);
114 114
             $request->session()->flash('should_attach_to_organization_redirect', route('login'));
@@ -117,14 +117,14 @@  discard block
 block discarded – undo
117 117
             ]);
118 118
         }
119 119
 
120
-        if($action['action'] == 'login'){
120
+        if ($action['action'] == 'login') {
121 121
             $request->session()->flash('should_attach_to_organization', $action['organization_to_join']->id());
122 122
             $request->session()->flash('should_attach_to_organization_token', $token);
123 123
             $request->session()->flash('should_attach_to_organization_redirect', route('login'));
124 124
             return redirect()->route('login');
125 125
         }
126 126
 
127
-        if($action['action'] == 'logout-register'){
127
+        if ($action['action'] == 'logout-register') {
128 128
             $request->session()->flash('should_attach_to_organization', $action['organization_to_join']->id());
129 129
             $request->session()->flash('should_attach_to_organization_token', $token);
130 130
             $request->session()->flash('should_attach_to_organization_redirect', route('register'));
Please login to merge, or discard this patch.
app/Http/Controllers/UsersController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function listUsers(string $organizationId, Request $request, ListUsers $listUsers)
28 28
     {
29
-        $page = $request->input('start')/10 + 1;
29
+        $page = $request->input('start')/10+1;
30 30
 
31 31
         $users = $listUsers->list($organizationId, $page, 10);
32 32
         $total = isset($users['total']) ? $users['total'] : 0;
33 33
         $list = [];
34
-        foreach ($users['list'] as $user){
34
+        foreach ($users['list'] as $user) {
35 35
             $user = $user->toArray();
36 36
             $list[] = [
37 37
                 '',
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function editShowForm(string $userId, GetUser $getUser, GetOrganization $getOrganization, GetUserStats $getUserStats)
52 52
     {
53 53
         $user = $getUser->get($userId);
54
-        if($user->organizationId() !== null) {
54
+        if ($user->organizationId() !== null) {
55 55
             $organization = $getOrganization->get($user->organizationId());
56 56
         }
57 57
         $stats = $getUserStats->get($userId);
@@ -88,11 +88,11 @@  discard block
 block discarded – undo
88 88
     public function delete(string $userId, Request $request, DeleteUser $deleteUser)
89 89
     {
90 90
         $redirect = 'back';
91
-        if($userId === Auth::id()){
91
+        if ($userId === Auth::id()) {
92 92
             $redirect = 'login';
93 93
         }
94 94
         $deleteUser->delete($userId);
95
-        if($redirect === 'login') {
95
+        if ($redirect === 'login') {
96 96
             return redirect()->route('login');
97 97
         }
98 98
         $request->session()->flash('notif_msg', __('users.message.user.deleted'));
Please login to merge, or discard this patch.
app/Http/Controllers/ProfileController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     public function showEditProfile(GetUser $getUser, GetOrganization $getOrganization, GetUserStats $getUserStats)
18 18
     {
19 19
         $user = $getUser->get(Auth::user()->uuid);
20
-        if($user->organizationId() !== null) {
20
+        if ($user->organizationId() !== null) {
21 21
             $organization = $getOrganization->get($user->organizationId());
22 22
         }
23 23
         $stats = $getUserStats->get(Auth::user()->uuid);
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
     {
35 35
         $this->registerHelpers();
36 36
 
37
-        if(config('app.env') === 'testing'){
37
+        if (config('app.env') === 'testing') {
38 38
             $this->tuBinding();
39 39
         }
40
-        if(config('app.env') === 'testing-ti'){
40
+        if (config('app.env') === 'testing-ti') {
41 41
             $this->tiBinding();
42 42
         }
43
-        if(config('app.env') === 'local' || config('app.env') === 'production'){
43
+        if (config('app.env') === 'local' || config('app.env') === 'production') {
44 44
             $this->prodBinding();
45 45
         }
46 46
     }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     private function registerHelpers(): void
53 53
     {
54
-        foreach (glob(app_path() . '/Src/Utils/Helpers/*.php') as $filename) {
54
+        foreach (glob(app_path().'/Src/Utils/Helpers/*.php') as $filename) {
55 55
             require_once($filename);
56 56
         }
57 57
     }
Please login to merge, or discard this patch.