Completed
Push — master ( 09a64e...d2b124 )
by Sherif
02:30
created
src/Modules/Users/Errors/UsersErrors.php 1 patch
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -4,68 +4,68 @@
 block discarded – undo
4 4
 
5 5
 class UsersErrors
6 6
 {
7
-    public function unAuthorized()
8
-    {
9
-        abort(401, trans('users::errors.unAuthorized'));
10
-    }
7
+	public function unAuthorized()
8
+	{
9
+		abort(401, trans('users::errors.unAuthorized'));
10
+	}
11 11
 
12
-    public function noPermissions()
13
-    {
14
-        abort(403, trans('users::errors.noPermissions'));
15
-    }
12
+	public function noPermissions()
13
+	{
14
+		abort(403, trans('users::errors.noPermissions'));
15
+	}
16 16
 
17
-    public function userIsBlocked()
18
-    {
19
-        abort(403, trans('users::errors.userIsBlocked'));
20
-    }
17
+	public function userIsBlocked()
18
+	{
19
+		abort(403, trans('users::errors.userIsBlocked'));
20
+	}
21 21
 
22
-    public function emailNotConfirmed()
23
-    {
24
-        abort(403, trans('users::errors.emailNotConfirmed'));
25
-    }
22
+	public function emailNotConfirmed()
23
+	{
24
+		abort(403, trans('users::errors.emailNotConfirmed'));
25
+	}
26 26
 
27
-    public function loginFailed()
28
-    {
29
-        abort(400, trans('users::errors.loginFailed'));
30
-    }
27
+	public function loginFailed()
28
+	{
29
+		abort(400, trans('users::errors.loginFailed'));
30
+	}
31 31
 
32
-    public function emailAlreadyConfirmed()
33
-    {
34
-        abort(400, trans('users::errors.emailAlreadyConfirmed'));
35
-    }
32
+	public function emailAlreadyConfirmed()
33
+	{
34
+		abort(400, trans('users::errors.emailAlreadyConfirmed'));
35
+	}
36 36
 
37
-    public function noSocialEmail()
38
-    {
39
-        abort(400, trans('users::errors.noSocialEmail'));
40
-    }
37
+	public function noSocialEmail()
38
+	{
39
+		abort(400, trans('users::errors.noSocialEmail'));
40
+	}
41 41
 
42
-    public function userAlreadyRegistered()
43
-    {
44
-        abort(400, trans('users::errors.userAlreadyRegistered'));
45
-    }
42
+	public function userAlreadyRegistered()
43
+	{
44
+		abort(400, trans('users::errors.userAlreadyRegistered'));
45
+	}
46 46
 
47
-    public function invalidRefreshToken()
48
-    {
49
-        abort(422, trans('users::errors.invalidRefreshToken'));
50
-    }
47
+	public function invalidRefreshToken()
48
+	{
49
+		abort(422, trans('users::errors.invalidRefreshToken'));
50
+	}
51 51
 
52
-    public function invalidResetToken()
53
-    {
54
-        abort(422, trans('users::errors.invalidResetToken'));
55
-    }
52
+	public function invalidResetToken()
53
+	{
54
+		abort(422, trans('users::errors.invalidResetToken'));
55
+	}
56 56
 
57
-    public function invalidResetPassword()
58
-    {
59
-        abort(422, trans('users::errors.invalidResetPassword'));
60
-    }
57
+	public function invalidResetPassword()
58
+	{
59
+		abort(422, trans('users::errors.invalidResetPassword'));
60
+	}
61 61
 
62
-    public function invalidOldPassword()
63
-    {
64
-        abort(422, trans('users::errors.invalidOldPassword'));
65
-    }
62
+	public function invalidOldPassword()
63
+	{
64
+		abort(422, trans('users::errors.invalidOldPassword'));
65
+	}
66 66
 
67
-    public function invalidConfirmationCode()
68
-    {
69
-        abort(422, trans('users::errors.invalidConfirmationCode'));
70
-    }
67
+	public function invalidConfirmationCode()
68
+	{
69
+		abort(422, trans('users::errors.invalidConfirmationCode'));
70
+	}
71 71
 }
Please login to merge, or discard this patch.
src/Modules/Reporting/Services/ReportService.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -8,49 +8,49 @@
 block discarded – undo
8 8
 
9 9
 class ReportService extends BaseService
10 10
 {
11
-    /**
12
-     * @var UserService
13
-     */
14
-    protected $userService;
11
+	/**
12
+	 * @var UserService
13
+	 */
14
+	protected $userService;
15 15
 
16
-    /**
17
-     * Init new object.
18
-     *
19
-     * @param   ReportRepository $repo
20
-     * @return  void
21
-     */
22
-    public function __construct(ReportRepository $repo, UserService $userService)
23
-    {
24
-        $this->userService = $userService;
25
-        parent::__construct($repo);
26
-    }
16
+	/**
17
+	 * Init new object.
18
+	 *
19
+	 * @param   ReportRepository $repo
20
+	 * @return  void
21
+	 */
22
+	public function __construct(ReportRepository $repo, UserService $userService)
23
+	{
24
+		$this->userService = $userService;
25
+		parent::__construct($repo);
26
+	}
27 27
 
28
-    /**
29
-     * Render the given report db view based on the given
30
-     * condition.
31
-     *
32
-     * @param  string  $reportName
33
-     * @param  array   $conditions
34
-     * @param  integer $perPage
35
-     * @param  boolean $skipPermission
36
-     * @return object
37
-     */
38
-    public function getReport($reportName, $conditions = [], $perPage = 0, $skipPermission = false)
39
-    {
40
-        /**
41
-         * Fetch the report from db.
42
-         */
43
-        $report = $this->repo->first(['report_name' => $reportName]);
28
+	/**
29
+	 * Render the given report db view based on the given
30
+	 * condition.
31
+	 *
32
+	 * @param  string  $reportName
33
+	 * @param  array   $conditions
34
+	 * @param  integer $perPage
35
+	 * @param  boolean $skipPermission
36
+	 * @return object
37
+	 */
38
+	public function getReport($reportName, $conditions = [], $perPage = 0, $skipPermission = false)
39
+	{
40
+		/**
41
+		 * Fetch the report from db.
42
+		 */
43
+		$report = $this->repo->first(['report_name' => $reportName]);
44 44
 
45
-        /**
46
-         * Check report existance and permission.
47
-         */
48
-        if (! $report) {
49
-            \Errors::notFound('report');
50
-        } elseif (! $skipPermission && ! $this->userService->can($report->view_name, 'report')) {
51
-            \Errors::noPermissions();
52
-        }
45
+		/**
46
+		 * Check report existance and permission.
47
+		 */
48
+		if (! $report) {
49
+			\Errors::notFound('report');
50
+		} elseif (! $skipPermission && ! $this->userService->can($report->view_name, 'report')) {
51
+			\Errors::noPermissions();
52
+		}
53 53
 
54
-        return $this->repo->renderReport($report, $conditions, $perPage);
55
-    }
54
+		return $this->repo->renderReport($report, $conditions, $perPage);
55
+	}
56 56
 }
Please login to merge, or discard this patch.
src/Modules/Roles/Resources/Lang/en/errors.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
     
5
-    /**
6
-     * Here goes your error messages.
7
-     */
5
+	/**
6
+	 * Here goes your error messages.
7
+	 */
8 8
 
9 9
 ];
Please login to merge, or discard this patch.
src/Modules/Roles/Resources/Lang/ar/errors.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
     
5
-    /**
6
-     * Here goes your error messages.
7
-     */
5
+	/**
6
+	 * Here goes your error messages.
7
+	 */
8 8
 
9 9
 ];
Please login to merge, or discard this patch.
src/Modules/Notifications/Resources/Lang/en/errors.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
     
5
-    /**
6
-     * Here goes your error messages.
7
-     */
5
+	/**
6
+	 * Here goes your error messages.
7
+	 */
8 8
 
9 9
 ];
Please login to merge, or discard this patch.
src/Modules/Notifications/Resources/Lang/ar/errors.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
     
5
-    /**
6
-     * Here goes your error messages.
7
-     */
5
+	/**
6
+	 * Here goes your error messages.
7
+	 */
8 8
 
9 9
 ];
Please login to merge, or discard this patch.
src/Modules/PushNotificationDevices/Resources/Lang/en/errors.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
     
5
-    /**
6
-     * Here goes your error messages.
7
-     */
5
+	/**
6
+	 * Here goes your error messages.
7
+	 */
8 8
 
9 9
 ];
Please login to merge, or discard this patch.
src/Modules/PushNotificationDevices/Resources/Lang/ar/errors.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
     
5
-    /**
6
-     * Here goes your error messages.
7
-     */
5
+	/**
6
+	 * Here goes your error messages.
7
+	 */
8 8
 
9 9
 ];
Please login to merge, or discard this patch.
src/Modules/OauthClients/Resources/Lang/en/errors.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
     
5
-    /**
6
-     * Here goes your error messages.
7
-     */
5
+	/**
6
+	 * Here goes your error messages.
7
+	 */
8 8
 
9 9
 ];
Please login to merge, or discard this patch.