Test Setup Failed
Pull Request — master (#26)
by guillaume
05:28
created
app/Providers/AppServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 {
33 33
     public function register()
34 34
     {
35
-        if(config('app.env') === 'testing'){
35
+        if (config('app.env') === 'testing') {
36 36
             $this->app->singleton(OrganizationRepository::class, InMemoryOrganizationRepository::class);
37 37
             $this->app->singleton(PictureHandler::class, InMemoryPictureHandler::class);
38 38
             $this->app->singleton(UserRepository::class, InMemoryUserRepository::class);
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             $this->app->singleton(HashGen::class, InMemoryHashGen::class);
43 43
             $this->app->singleton(InvitationRepository::class, InMemoryInvitationRepository::class);
44 44
         }
45
-        if(config('app.env') === 'testing-ti'){
45
+        if (config('app.env') === 'testing-ti') {
46 46
             $this->app->singleton(OrganizationRepository::class, SqlOrganizationRepository::class);
47 47
             $this->app->singleton(InvitationRepository::class, InMemoryInvitationRepository::class);
48 48
             $this->app->singleton(PictureHandler::class, InMemoryPictureHandler::class);
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $this->app->singleton(SocialiteGateway::class, InMemorySocialiteGateway::class);
54 54
         }
55 55
 
56
-        if(config('app.env') === 'local' || config('app.env') === 'production'){
56
+        if (config('app.env') === 'local' || config('app.env') === 'production') {
57 57
             $this->app->singleton(OrganizationRepository::class, SqlOrganizationRepository::class);
58 58
             $this->app->singleton(InvitationRepository::class, InvitationRepositorySql::class);
59 59
             $this->app->singleton(PictureHandler::class, StoragePictureHandler::class);
Please login to merge, or discard this patch.
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/UsersController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
 
26 26
     public function listUsers(string $organizationId, Request $request, ListUsers $listUsers)
27 27
     {
28
-        $page = $request->input('start')/10 + 1;
28
+        $page = $request->input('start')/10+1;
29 29
 
30 30
         $users = $listUsers->list($organizationId, $page, 10);
31 31
         $total = isset($users['total']) ? $users['total'] : 0;
32 32
         $list = [];
33
-        foreach ($users['list'] as $user){
33
+        foreach ($users['list'] as $user) {
34 34
             $user = $user->toArray();
35 35
             $list[] = [
36 36
                 '',
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function editShowForm(string $userId, GetUser $getUser, GetOrganization $getOrganization, GetUserStats $getUserStats)
56 56
     {
57 57
         $user = $getUser->get($userId);
58
-        if($user->organizationId() !== null) {
58
+        if ($user->organizationId() !== null) {
59 59
             $organization = $getOrganization->get($user->organizationId());
60 60
         }
61 61
         $stats = $getUserStats->get($userId);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         $lastname = $request->input('lastname') !== null ? $request->input('lastname') : '';
74 74
         $email = $request->input('email') !== null ? $request->input('email') : '';
75 75
         $picture = [];
76
-        if($request->has('logo')){
76
+        if ($request->has('logo')) {
77 77
             $picture['path_picture'] = $request->file('logo')->path();
78 78
             $picture['original_name'] = $request->file('logo')->getClientOriginalName();
79 79
             $picture['mine_type'] = $request->file('logo')->getMimeType();
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
     public function delete(string $userId, Request $request, DeleteUser $deleteUser)
101 101
     {
102 102
         $redirect = 'back';
103
-        if($userId === Auth::id()){
103
+        if ($userId === Auth::id()) {
104 104
             $redirect = 'login';
105 105
         }
106 106
         $deleteUser->delete($userId);
107
-        if($redirect === 'login') {
107
+        if ($redirect === 'login') {
108 108
             return redirect()->route('login');
109 109
         }
110 110
         $request->session()->flash('notif_msg', __('users.message.user.deleted'));
Please login to merge, or discard this patch.