Completed
Push — master ( f8ccd7...a2ea8b )
by Sherif
13:39
created
src/Modules/V1/Core/Utl/ErrorHandler.php 1 patch
Indentation   +113 added lines, -113 removed lines patch added patch discarded remove patch
@@ -2,117 +2,117 @@
 block discarded – undo
2 2
 
3 3
 class ErrorHandler
4 4
 {
5
-    public function unAuthorized()
6
-    {
7
-        $error = ['status' => 401, 'message' => trans('errors.unAuthorized')];
8
-        abort($error['status'], $error['message']);
9
-    }
10
-
11
-    public function invalidRefreshToken()
12
-    {
13
-        $error = ['status' => 401, 'message' => trans('errors.invalidRefreshToken')];
14
-        abort($error['status'], $error['message']);
15
-    }
16
-
17
-     public function noPermissions()
18
-    {
19
-        $error = ['status' => 403, 'message' => trans('errors.noPermissions')];
20
-        abort($error['status'], $error['message']);
21
-    }
22
-
23
-    public function loginFailed()
24
-    {
25
-        $error = ['status' => 400, 'message' => trans('errors.loginFailed')];
26
-        abort($error['status'], $error['message']);
27
-    }
28
-
29
-    public function noSocialEmail()
30
-    {
31
-        $error = ['status' => 400, 'message' => trans('errors.noSocialEmail')];
32
-        abort($error['status'], $error['message']);
33
-    }
34
-
35
-    public function userAlreadyRegistered()
36
-    {
37
-        $error = ['status' => 400, 'message' => trans('errors.userAlreadyRegistered')];
38
-        abort($error['status'], $error['message']);
39
-    }
40
-
41
-    public function connectionError()
42
-    {
43
-        $error = ['status' => 400, 'message' => trans('errors.connectionError')];
44
-        abort($error['status'], $error['message']);
45
-    }
46
-
47
-    public function redisNotRunning()
48
-    {
49
-        $error = ['status' => 400, 'message' => trans('errors.redisNotRunning')];
50
-        abort($error['status'], $error['message']);
51
-    }
52
-
53
-    public function dbQueryError()
54
-    {
55
-        $error = ['status' => 400, 'message' => trans('errors.dbQueryError')];
56
-        abort($error['status'], $error['message']);
57
-    }
58
-
59
-    public function cannotCreateSetting()
60
-    {
61
-        $error = ['status' => 400, 'message' => trans('errors.cannotCreateSetting')];
62
-        abort($error['status'], $error['message']);
63
-    }
64
-
65
-    public function cannotUpdateSettingKey()
66
-    {
67
-        $error = ['status' => 400, 'message' => trans('errors.cannotUpdateSettingKey')];
68
-        abort($error['status'], $error['message']);
69
-    }
70
-
71
-    public function userIsBlocked()
72
-    {
73
-        $error = ['status' => 403, 'message' => trans('errors.userIsBlocked')];
74
-        abort($error['status'], $error['message']);
75
-    }
76
-
77
-    public function emailNotConfirmed()
78
-    {
79
-        $error = ['status' => 403, 'message' => trans('errors.emailNotConfirmed')];
80
-        abort($error['status'], $error['message']);
81
-    }
82
-
83
-    public function emailAlreadyConfirmed()
84
-    {
85
-        $error = ['status' => 403, 'message' => trans('errors.emailAlreadyConfirmed')];
86
-        abort($error['status'], $error['message']);
87
-    }
88
-
89
-    public function invalidResetToken()
90
-    {
91
-        $error = ['status' => 400, 'message' => trans('errors.invalidResetToken')];
92
-        abort($error['status'], $error['message']);
93
-    }
94
-
95
-    public function invalidResetPassword()
96
-    {
97
-        $error = ['status' => 400, 'message' => trans('errors.invalidResetPassword')];
98
-        abort($error['status'], $error['message']);
99
-    }
100
-
101
-    public function invalidOldPassword()
102
-    {
103
-        $error = ['status' => 400, 'message' => trans('errors.invalidOldPassword')];
104
-        abort($error['status'], $error['message']);
105
-    }
106
-
107
-    public function notFound($text)
108
-    {
109
-        $error = ['status' => 404, 'message' => trans('errors.notFound', ['replace' => $text])];
110
-        abort($error['status'], $error['message']);
111
-    }
112
-
113
-    public function generalError()
114
-    {
115
-        $error = ['status' => 400, 'message' => trans('errors.generalError')];
116
-        abort($error['status'], $error['message']);
117
-    }
5
+	public function unAuthorized()
6
+	{
7
+		$error = ['status' => 401, 'message' => trans('errors.unAuthorized')];
8
+		abort($error['status'], $error['message']);
9
+	}
10
+
11
+	public function invalidRefreshToken()
12
+	{
13
+		$error = ['status' => 401, 'message' => trans('errors.invalidRefreshToken')];
14
+		abort($error['status'], $error['message']);
15
+	}
16
+
17
+	 public function noPermissions()
18
+	{
19
+		$error = ['status' => 403, 'message' => trans('errors.noPermissions')];
20
+		abort($error['status'], $error['message']);
21
+	}
22
+
23
+	public function loginFailed()
24
+	{
25
+		$error = ['status' => 400, 'message' => trans('errors.loginFailed')];
26
+		abort($error['status'], $error['message']);
27
+	}
28
+
29
+	public function noSocialEmail()
30
+	{
31
+		$error = ['status' => 400, 'message' => trans('errors.noSocialEmail')];
32
+		abort($error['status'], $error['message']);
33
+	}
34
+
35
+	public function userAlreadyRegistered()
36
+	{
37
+		$error = ['status' => 400, 'message' => trans('errors.userAlreadyRegistered')];
38
+		abort($error['status'], $error['message']);
39
+	}
40
+
41
+	public function connectionError()
42
+	{
43
+		$error = ['status' => 400, 'message' => trans('errors.connectionError')];
44
+		abort($error['status'], $error['message']);
45
+	}
46
+
47
+	public function redisNotRunning()
48
+	{
49
+		$error = ['status' => 400, 'message' => trans('errors.redisNotRunning')];
50
+		abort($error['status'], $error['message']);
51
+	}
52
+
53
+	public function dbQueryError()
54
+	{
55
+		$error = ['status' => 400, 'message' => trans('errors.dbQueryError')];
56
+		abort($error['status'], $error['message']);
57
+	}
58
+
59
+	public function cannotCreateSetting()
60
+	{
61
+		$error = ['status' => 400, 'message' => trans('errors.cannotCreateSetting')];
62
+		abort($error['status'], $error['message']);
63
+	}
64
+
65
+	public function cannotUpdateSettingKey()
66
+	{
67
+		$error = ['status' => 400, 'message' => trans('errors.cannotUpdateSettingKey')];
68
+		abort($error['status'], $error['message']);
69
+	}
70
+
71
+	public function userIsBlocked()
72
+	{
73
+		$error = ['status' => 403, 'message' => trans('errors.userIsBlocked')];
74
+		abort($error['status'], $error['message']);
75
+	}
76
+
77
+	public function emailNotConfirmed()
78
+	{
79
+		$error = ['status' => 403, 'message' => trans('errors.emailNotConfirmed')];
80
+		abort($error['status'], $error['message']);
81
+	}
82
+
83
+	public function emailAlreadyConfirmed()
84
+	{
85
+		$error = ['status' => 403, 'message' => trans('errors.emailAlreadyConfirmed')];
86
+		abort($error['status'], $error['message']);
87
+	}
88
+
89
+	public function invalidResetToken()
90
+	{
91
+		$error = ['status' => 400, 'message' => trans('errors.invalidResetToken')];
92
+		abort($error['status'], $error['message']);
93
+	}
94
+
95
+	public function invalidResetPassword()
96
+	{
97
+		$error = ['status' => 400, 'message' => trans('errors.invalidResetPassword')];
98
+		abort($error['status'], $error['message']);
99
+	}
100
+
101
+	public function invalidOldPassword()
102
+	{
103
+		$error = ['status' => 400, 'message' => trans('errors.invalidOldPassword')];
104
+		abort($error['status'], $error['message']);
105
+	}
106
+
107
+	public function notFound($text)
108
+	{
109
+		$error = ['status' => 404, 'message' => trans('errors.notFound', ['replace' => $text])];
110
+		abort($error['status'], $error['message']);
111
+	}
112
+
113
+	public function generalError()
114
+	{
115
+		$error = ['status' => 400, 'message' => trans('errors.generalError')];
116
+		abort($error['status'], $error['message']);
117
+	}
118 118
 }
119 119
\ No newline at end of file
Please login to merge, or discard this patch.
src/Modules/V1/Notifications/Notifications/ConfirmEmail.php 2 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -10,41 +10,41 @@
 block discarded – undo
10 10
 
11 11
 class ConfirmEmail extends Notification implements ShouldQueue
12 12
 {
13
-    use Queueable;
13
+	use Queueable;
14 14
 
15
-    /**
16
-     * Create a new notification instance.
17
-     *
18
-     * @return void
19
-     */
20
-    public function __construct()
21
-    {
22
-        //
23
-    }
15
+	/**
16
+	 * Create a new notification instance.
17
+	 *
18
+	 * @return void
19
+	 */
20
+	public function __construct()
21
+	{
22
+		//
23
+	}
24 24
 
25
-    /**
26
-     * Get the notification's delivery channels.
27
-     *
28
-     * @param  mixed  $notifiable
29
-     * @return array
30
-     */
31
-    public function via($notifiable)
32
-    {
33
-        return ['mail'];
34
-    }
25
+	/**
26
+	 * Get the notification's delivery channels.
27
+	 *
28
+	 * @param  mixed  $notifiable
29
+	 * @return array
30
+	 */
31
+	public function via($notifiable)
32
+	{
33
+		return ['mail'];
34
+	}
35 35
 
36
-    /**
37
-     * Get the mail representation of the notification.
38
-     *
39
-     * @param  mixed  $notifiable
40
-     * @return \Illuminate\Notifications\Messages\MailMessage
41
-     */
42
-    public function toMail($notifiable)
43
-    {
44
-        return (new MailMessage)
45
-            ->subject('Email verification')
46
-            ->line('Email verification')
47
-            ->line('To validate your email click on the button below')
48
-            ->action('Verify your email', env('CONFIRM_EMAIL_URL') . '/' . $notifiable->confirmation_code));
49
-    }
36
+	/**
37
+	 * Get the mail representation of the notification.
38
+	 *
39
+	 * @param  mixed  $notifiable
40
+	 * @return \Illuminate\Notifications\Messages\MailMessage
41
+	 */
42
+	public function toMail($notifiable)
43
+	{
44
+		return (new MailMessage)
45
+			->subject('Email verification')
46
+			->line('Email verification')
47
+			->line('To validate your email click on the button below')
48
+			->action('Verify your email', env('CONFIRM_EMAIL_URL') . '/' . $notifiable->confirmation_code));
49
+	}
50 50
 }
51 51
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,6 +45,6 @@
 block discarded – undo
45 45
             ->subject('Email verification')
46 46
             ->line('Email verification')
47 47
             ->line('To validate your email click on the button below')
48
-            ->action('Verify your email', env('CONFIRM_EMAIL_URL') . '/' . $notifiable->confirmation_code));
48
+            ->action('Verify your email', env('CONFIRM_EMAIL_URL').'/'.$notifiable->confirmation_code));
49 49
     }
50 50
 }
51 51
\ No newline at end of file
Please login to merge, or discard this patch.