Passed
Push — master ( 2b0762...9c76a8 )
by Bertrand
26:13 queued 17:43
created
app/Console/Commands/ImportUsersStatsFromWiki.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
 
29 29
         $this->dbWiki->table('user')
30 30
             ->orderBy('user.user_id', 'desc')
31
-            ->chunk(200, function ($records){
31
+            ->chunk(200, function($records) {
32 32
                 foreach ($records as $record) {
33 33
 
34 34
                     $user = $this->userRepository->getByEmail($record->user_email);
35
-                    if(!isset($user)){
35
+                    if (!isset($user)) {
36 36
                         continue;
37 37
                     }
38 38
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
                     $editsOnWiki = $this->getEditsOnWikiNumber($record->user_id);
43 43
 
44 44
 
45
-                    $numberContributions = $questions + $answers + $votes + $editsOnWiki;
45
+                    $numberContributions = $questions+$answers+$votes+$editsOnWiki;
46 46
                     $fields = [
47 47
                         'number_contributions' => $numberContributions,
48 48
                         'number_questions' => $questions,
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/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/Http/Controllers/OrganizationsController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 
53 53
     public function listOrganizations(Request $request, ListOrganizations $listOrganizations)
54 54
     {
55
-        $page = $request->input('start')/10 + 1;
55
+        $page = $request->input('start')/10+1;
56 56
         $organizations = $listOrganizations->list($page, 10);
57 57
         $total = isset($organizations['total']) ? $organizations['total'] : 0;
58 58
         $list = [];
59
-        foreach ($organizations['list'] as $organization){
59
+        foreach ($organizations['list'] as $organization) {
60 60
             $org = $organization->toArray();
61 61
             $list[] = [
62 62
                 $org['name'],
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         return format($total, $list);
71 71
     }
72 72
 
73
-    public function prepareInvitation(Request $request,  PrepareInvitationUsersInOrganization $prepareInvitationUsersInOrganization)
73
+    public function prepareInvitation(Request $request, PrepareInvitationUsersInOrganization $prepareInvitationUsersInOrganization)
74 74
     {
75 75
         $users = $request->input('users');
76 76
         $users = explode(PHP_EOL, $users);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     public function acceptInvite(Request $request, RespondInvitationToAnOrganization $respondInvitationToAnOrganization)
98 98
     {
99 99
         $action = $respondInvitationToAnOrganization->respond($token = $request->input('token'));
100
-        switch($action['action']){
100
+        switch ($action['action']) {
101 101
             case 'register':
102 102
                 return $this->redirectToRegisterPage($request, $action);
103 103
             case 'accept_or_decline':
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 = init($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/Providers/AppServiceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,31 +36,31 @@
 block discarded – undo
36 36
     {
37 37
         $this->registerHelpers();
38 38
 
39
-        if(config('app.env') === 'testing'){
39
+        if (config('app.env') === 'testing') {
40 40
             $this->tuBinding();
41 41
         }
42
-        if(config('app.env') === 'testing-ti'){
42
+        if (config('app.env') === 'testing-ti') {
43 43
             $this->tiBinding();
44 44
         }
45
-        if(config('app.env') === 'local' || config('app.env') === 'production'){
45
+        if (config('app.env') === 'local' || config('app.env') === 'production') {
46 46
             $this->prodBinding();
47 47
         }
48 48
     }
49 49
 
50 50
     public function boot()
51 51
     {
52
-        if(config('app.env') !== 'testing' && config('app.env') !== 'testing-ti') {
52
+        if (config('app.env') !== 'testing' && config('app.env') !== 'testing-ti') {
53 53
             Schema::defaultStringLength(191);
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
             URL::forceScheme('https');
58 58
         }
59 59
     }
60 60
 
61 61
     private function registerHelpers(): void
62 62
     {
63
-        foreach (glob(app_path() . '/Src/Utils/Helpers/*.php') as $filename) {
63
+        foreach (glob(app_path().'/Src/Utils/Helpers/*.php') as $filename) {
64 64
             require_once($filename);
65 65
         }
66 66
     }
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Auth/SocialiteUser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         return $this->providerId;
28 28
     }
29 29
 
30
-    public function email():? string
30
+    public function email(): ? string
31 31
     {
32 32
         return $this->email;
33 33
     }
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Auth/LogUserFromSocialNetwork.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         $socialiteUser = $this->socialiteGateway->user($provider);
41 41
 
42 42
         $user = $this->userRepository->getByProvider($provider, $socialiteUser->providerId());
43
-        if($user === null){
43
+        if ($user === null) {
44 44
             app(RegisterUserFromSocialNetworkService::class)->register($provider, $socialiteUser);
45 45
             $user = $this->userRepository->getByProvider($provider, $socialiteUser->providerId());
46 46
         }
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.