Completed
Push — master ( 60eb24...8a761d )
by Sherif
01:58
created
src/Modules/Users/Http/Resources/AclUser.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -9,32 +9,32 @@
 block discarded – undo
9 9
 
10 10
 class AclUser extends JsonResource
11 11
 {
12
-    /**
13
-     * Transform the resource into an array.
14
-     *
15
-     * @param Request $request
16
-     * @return array
17
-     */
18
-    public function toArray($request)
19
-    {
20
-        if (! $this->resource) {
21
-            return [];
22
-        }
12
+	/**
13
+	 * Transform the resource into an array.
14
+	 *
15
+	 * @param Request $request
16
+	 * @return array
17
+	 */
18
+	public function toArray($request)
19
+	{
20
+		if (! $this->resource) {
21
+			return [];
22
+		}
23 23
 
24
-        return [
25
-            'id' => $this->id,
26
-            'name' => $this->name,
27
-            'email' => $this->email,
28
-            'profilePicture' => $this->profile_picture ? url(\Storage::url($this->profile_picture)) : null,
29
-            'notifications' => NotificationResource::collection($this->whenLoaded('notifications')),
30
-            'readNotifications' => NotificationResource::collection($this->whenLoaded('readNotifications')),
31
-            'unreadNotifications' => NotificationResource::collection($this->whenLoaded('unreadNotifications')),
32
-            'roles' => RoleResource::collection($this->whenLoaded('roles')),
33
-            'oauthClients' => OauthClientResource::collection($this->whenLoaded('oauthClients')),
34
-            'locale' => $this->locale,
35
-            'timezone' => $this->timezone,
36
-            'created_at' => $this->created_at,
37
-            'updated_at' => $this->updated_at,
38
-        ];
39
-    }
24
+		return [
25
+			'id' => $this->id,
26
+			'name' => $this->name,
27
+			'email' => $this->email,
28
+			'profilePicture' => $this->profile_picture ? url(\Storage::url($this->profile_picture)) : null,
29
+			'notifications' => NotificationResource::collection($this->whenLoaded('notifications')),
30
+			'readNotifications' => NotificationResource::collection($this->whenLoaded('readNotifications')),
31
+			'unreadNotifications' => NotificationResource::collection($this->whenLoaded('unreadNotifications')),
32
+			'roles' => RoleResource::collection($this->whenLoaded('roles')),
33
+			'oauthClients' => OauthClientResource::collection($this->whenLoaded('oauthClients')),
34
+			'locale' => $this->locale,
35
+			'timezone' => $this->timezone,
36
+			'created_at' => $this->created_at,
37
+			'updated_at' => $this->updated_at,
38
+		];
39
+	}
40 40
 }
Please login to merge, or discard this patch.
src/Modules/Users/Proxy/LoginProxy.php 1 patch
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -7,64 +7,64 @@
 block discarded – undo
7 7
 
8 8
 class LoginProxy
9 9
 {
10
-    /**
11
-     * Attempt to create an access token using user credentials.
12
-     *
13
-     * @param  string  $email
14
-     * @param  string  $password
15
-     * @return array
16
-     */
17
-    public function login($email, $password)
18
-    {
19
-        return $this->proxy('password', [
20
-            'username' => $email,
21
-            'password' => $password
22
-        ]);
23
-    }
10
+	/**
11
+	 * Attempt to create an access token using user credentials.
12
+	 *
13
+	 * @param  string  $email
14
+	 * @param  string  $password
15
+	 * @return array
16
+	 */
17
+	public function login($email, $password)
18
+	{
19
+		return $this->proxy('password', [
20
+			'username' => $email,
21
+			'password' => $password
22
+		]);
23
+	}
24 24
 
25
-    /**
26
-     * Attempt to refresh the access token using the given refresh token.
27
-     *
28
-     * @param  string $refreshToken
29
-     * @return array
30
-     */
31
-    public function refreshToken($refreshToken)
32
-    {
33
-        return $this->proxy('refresh_token', [
34
-            'refresh_token' => $refreshToken
35
-        ]);
36
-    }
25
+	/**
26
+	 * Attempt to refresh the access token using the given refresh token.
27
+	 *
28
+	 * @param  string $refreshToken
29
+	 * @return array
30
+	 */
31
+	public function refreshToken($refreshToken)
32
+	{
33
+		return $this->proxy('refresh_token', [
34
+			'refresh_token' => $refreshToken
35
+		]);
36
+	}
37 37
 
38
-    /**
39
-     * Proxy a request to the OAuth server.
40
-     *
41
-     * @param string $grantType what type of grant type should be proxied
42
-     * @param array
43
-     */
44
-    public function proxy($grantType, array $data = [])
45
-    {
46
-        $data = array_merge($data, [
47
-            'client_id'     => config('user.passport_client_id'),
48
-            'client_secret' => config('user.passport_client_secret'),
49
-            'grant_type'    => $grantType
50
-        ]);
38
+	/**
39
+	 * Proxy a request to the OAuth server.
40
+	 *
41
+	 * @param string $grantType what type of grant type should be proxied
42
+	 * @param array
43
+	 */
44
+	public function proxy($grantType, array $data = [])
45
+	{
46
+		$data = array_merge($data, [
47
+			'client_id'     => config('user.passport_client_id'),
48
+			'client_secret' => config('user.passport_client_secret'),
49
+			'grant_type'    => $grantType
50
+		]);
51 51
 
52
-        $response = \ApiConsumer::post('/oauth/token', $data);
52
+		$response = \ApiConsumer::post('/oauth/token', $data);
53 53
 
54
-        if (! $response->isSuccessful()) {
55
-            if ($grantType == 'refresh_token') {
56
-                \Errors::invalidRefreshToken();
57
-            }
54
+		if (! $response->isSuccessful()) {
55
+			if ($grantType == 'refresh_token') {
56
+				\Errors::invalidRefreshToken();
57
+			}
58 58
 
59
-            \Errors::loginFailed();
60
-        }
59
+			\Errors::loginFailed();
60
+		}
61 61
 
62
-        $data = json_decode($response->getContent());
62
+		$data = json_decode($response->getContent());
63 63
 
64
-        return [
65
-            'access_token'  => $data->access_token,
66
-            'refresh_token' => $data->refresh_token,
67
-            'expires_in'    => $data->expires_in
68
-        ];
69
-    }
64
+		return [
65
+			'access_token'  => $data->access_token,
66
+			'refresh_token' => $data->refresh_token,
67
+			'expires_in'    => $data->expires_in
68
+		];
69
+	}
70 70
 }
Please login to merge, or discard this patch.
src/Modules/Notifications/Notifications/ResetPassword.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -9,43 +9,43 @@
 block discarded – undo
9 9
 
10 10
 class ResetPassword extends Notification implements ShouldQueue
11 11
 {
12
-    use Queueable;
12
+	use Queueable;
13 13
 
14
-    protected $token;
14
+	protected $token;
15 15
 
16
-    /**
17
-     * Init new object.
18
-     *
19
-     * @return  void
20
-     */
21
-    public function __construct($token)
22
-    {
23
-        $this->token = $token;
24
-    }
16
+	/**
17
+	 * Init new object.
18
+	 *
19
+	 * @return  void
20
+	 */
21
+	public function __construct($token)
22
+	{
23
+		$this->token = $token;
24
+	}
25 25
 
26
-    /**
27
-     * Get the notification's delivery channels.
28
-     *
29
-     * @param  mixed  $notifiable
30
-     * @return string[]
31
-     */
32
-    public function via($notifiable)
33
-    {
34
-        return ['mail'];
35
-    }
26
+	/**
27
+	 * Get the notification's delivery channels.
28
+	 *
29
+	 * @param  mixed  $notifiable
30
+	 * @return string[]
31
+	 */
32
+	public function via($notifiable)
33
+	{
34
+		return ['mail'];
35
+	}
36 36
 
37
-    /**
38
-     * Get the mail representation of the notification.
39
-     *
40
-     * @param  mixed  $notifiable
41
-     * @return \Illuminate\Notifications\Messages\MailMessage
42
-     */
43
-    public function toMail($notifiable)
44
-    {
45
-        return (new MailMessage)
46
-            ->subject('Reset passowrd')
47
-            ->line('Reset passowrd')
48
-            ->line('To reset your password click on the button below')
49
-            ->action('Reset password', config('user.reset_password_url').'/'.$this->token);
50
-    }
37
+	/**
38
+	 * Get the mail representation of the notification.
39
+	 *
40
+	 * @param  mixed  $notifiable
41
+	 * @return \Illuminate\Notifications\Messages\MailMessage
42
+	 */
43
+	public function toMail($notifiable)
44
+	{
45
+		return (new MailMessage)
46
+			->subject('Reset passowrd')
47
+			->line('Reset passowrd')
48
+			->line('To reset your password click on the button below')
49
+			->action('Reset password', config('user.reset_password_url').'/'.$this->token);
50
+	}
51 51
 }
Please login to merge, or discard this patch.
src/Modules/Notifications/Notifications/ConfirmEmail.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -9,41 +9,41 @@
 block discarded – undo
9 9
 
10 10
 class ConfirmEmail extends Notification implements ShouldQueue
11 11
 {
12
-    use Queueable;
12
+	use Queueable;
13 13
 
14
-    /**
15
-     * Init new object.
16
-     *
17
-     * @return  void
18
-     */
19
-    public function __construct()
20
-    {
21
-        //
22
-    }
14
+	/**
15
+	 * Init new object.
16
+	 *
17
+	 * @return  void
18
+	 */
19
+	public function __construct()
20
+	{
21
+		//
22
+	}
23 23
 
24
-    /**
25
-     * Get the notification's delivery channels.
26
-     *
27
-     * @param  mixed  $notifiable
28
-     * @return string[]
29
-     */
30
-    public function via($notifiable)
31
-    {
32
-        return ['mail'];
33
-    }
24
+	/**
25
+	 * Get the notification's delivery channels.
26
+	 *
27
+	 * @param  mixed  $notifiable
28
+	 * @return string[]
29
+	 */
30
+	public function via($notifiable)
31
+	{
32
+		return ['mail'];
33
+	}
34 34
 
35
-    /**
36
-     * Get the mail representation of the notification.
37
-     *
38
-     * @param  mixed  $notifiable
39
-     * @return \Illuminate\Notifications\Messages\MailMessage
40
-     */
41
-    public function toMail($notifiable)
42
-    {
43
-        return (new MailMessage)
44
-            ->subject('Email verification')
45
-            ->line('Email verification')
46
-            ->line('To validate your email click on the button below')
47
-            ->action('Verify your email', config('user.confrim_email_url').'/'.$notifiable->confirmation_code);
48
-    }
35
+	/**
36
+	 * Get the mail representation of the notification.
37
+	 *
38
+	 * @param  mixed  $notifiable
39
+	 * @return \Illuminate\Notifications\Messages\MailMessage
40
+	 */
41
+	public function toMail($notifiable)
42
+	{
43
+		return (new MailMessage)
44
+			->subject('Email verification')
45
+			->line('Email verification')
46
+			->line('To validate your email click on the button below')
47
+			->action('Verify your email', config('user.confrim_email_url').'/'.$notifiable->confirmation_code);
48
+	}
49 49
 }
Please login to merge, or discard this patch.
src/Modules/Core/Errors/Errors.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -6,28 +6,28 @@
 block discarded – undo
6 6
 
7 7
 class Errors implements BaseFactoryInterface
8 8
 {
9
-    /**
10
-     * Construct the config class name based on
11
-     * the method name called, search in the
12
-     * given namespaces for the class and
13
-     * return an instance.
14
-     *
15
-     * @param  string $name the called method name
16
-     * @param  array  $arguments the method arguments
17
-     * @return object
18
-     */
19
-    public function __call($name, $arguments)
20
-    {
21
-        foreach (\Module::all() as $module) {
22
-            $nameSpace = 'App\\Modules\\' . $module['basename'];
23
-            $class = $nameSpace . '\\Errors\\' . $module['basename'] . 'Errors';
9
+	/**
10
+	 * Construct the config class name based on
11
+	 * the method name called, search in the
12
+	 * given namespaces for the class and
13
+	 * return an instance.
14
+	 *
15
+	 * @param  string $name the called method name
16
+	 * @param  array  $arguments the method arguments
17
+	 * @return object
18
+	 */
19
+	public function __call($name, $arguments)
20
+	{
21
+		foreach (\Module::all() as $module) {
22
+			$nameSpace = 'App\\Modules\\' . $module['basename'];
23
+			$class = $nameSpace . '\\Errors\\' . $module['basename'] . 'Errors';
24 24
 
25
-            if (class_exists($class)) {
26
-                $class = \App::make($class);
27
-                if (method_exists($class, $name)) {
28
-                    return call_user_func_array([$class, $name], $arguments);
29
-                }
30
-            }
31
-        }
32
-    }
25
+			if (class_exists($class)) {
26
+				$class = \App::make($class);
27
+				if (method_exists($class, $name)) {
28
+					return call_user_func_array([$class, $name], $arguments);
29
+				}
30
+			}
31
+		}
32
+	}
33 33
 }
Please login to merge, or discard this patch.
src/Modules/OauthClients/Providers/ModuleServiceProvider.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -6,30 +6,30 @@
 block discarded – undo
6 6
 
7 7
 class ModuleServiceProvider extends ServiceProvider
8 8
 {
9
-    /**
10
-     * Bootstrap the module services.
11
-     *
12
-     * @return void
13
-     */
14
-    public function boot()
15
-    {
16
-        $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'oauth-clients');
17
-        $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'oauth-clients');
9
+	/**
10
+	 * Bootstrap the module services.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function boot()
15
+	{
16
+		$this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'oauth-clients');
17
+		$this->loadViewsFrom(__DIR__.'/../Resources/Views', 'oauth-clients');
18 18
 
19
-        $this->loadMigrationsFrom(module_path('oauth-clients', 'Database/Migrations', 'app'));
20
-        $this->loadFactoriesFrom(module_path('oauth-clients', 'Database/Factories', 'app'));
21
-        if (!$this->app->configurationIsCached()) {
22
-            $this->loadConfigsFrom(module_path('oauth-clients', 'Config', 'app'));
23
-        }
24
-    }
19
+		$this->loadMigrationsFrom(module_path('oauth-clients', 'Database/Migrations', 'app'));
20
+		$this->loadFactoriesFrom(module_path('oauth-clients', 'Database/Factories', 'app'));
21
+		if (!$this->app->configurationIsCached()) {
22
+			$this->loadConfigsFrom(module_path('oauth-clients', 'Config', 'app'));
23
+		}
24
+	}
25 25
 
26
-    /**
27
-     * Register the module services.
28
-     *
29
-     * @return void
30
-     */
31
-    public function register()
32
-    {
33
-        $this->app->register(RouteServiceProvider::class);
34
-    }
26
+	/**
27
+	 * Register the module services.
28
+	 *
29
+	 * @return void
30
+	 */
31
+	public function register()
32
+	{
33
+		$this->app->register(RouteServiceProvider::class);
34
+	}
35 35
 }
Please login to merge, or discard this patch.
src/Modules/PushNotificationDevices/Providers/ModuleServiceProvider.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -6,30 +6,30 @@
 block discarded – undo
6 6
 
7 7
 class ModuleServiceProvider extends ServiceProvider
8 8
 {
9
-    /**
10
-     * Bootstrap the module services.
11
-     *
12
-     * @return void
13
-     */
14
-    public function boot()
15
-    {
16
-        $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'push-notification-devices');
17
-        $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'push-notification-devices');
9
+	/**
10
+	 * Bootstrap the module services.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function boot()
15
+	{
16
+		$this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'push-notification-devices');
17
+		$this->loadViewsFrom(__DIR__.'/../Resources/Views', 'push-notification-devices');
18 18
 
19
-        $this->loadMigrationsFrom(module_path('push-notification-devices', 'Database/Migrations', 'app'));
20
-        $this->loadFactoriesFrom(module_path('push-notification-devices', 'Database/Factories', 'app'));
21
-        if (!$this->app->configurationIsCached()) {
22
-            $this->loadConfigsFrom(module_path('push-notification-devices', 'Config', 'app'));
23
-        }
24
-    }
19
+		$this->loadMigrationsFrom(module_path('push-notification-devices', 'Database/Migrations', 'app'));
20
+		$this->loadFactoriesFrom(module_path('push-notification-devices', 'Database/Factories', 'app'));
21
+		if (!$this->app->configurationIsCached()) {
22
+			$this->loadConfigsFrom(module_path('push-notification-devices', 'Config', 'app'));
23
+		}
24
+	}
25 25
 
26
-    /**
27
-     * Register the module services.
28
-     *
29
-     * @return void
30
-     */
31
-    public function register()
32
-    {
33
-        $this->app->register(RouteServiceProvider::class);
34
-    }
26
+	/**
27
+	 * Register the module services.
28
+	 *
29
+	 * @return void
30
+	 */
31
+	public function register()
32
+	{
33
+		$this->app->register(RouteServiceProvider::class);
34
+	}
35 35
 }
Please login to merge, or discard this patch.
src/Modules/Roles/Providers/ModuleServiceProvider.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -6,30 +6,30 @@
 block discarded – undo
6 6
 
7 7
 class ModuleServiceProvider extends ServiceProvider
8 8
 {
9
-    /**
10
-     * Bootstrap the module services.
11
-     *
12
-     * @return void
13
-     */
14
-    public function boot()
15
-    {
16
-        $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'roles');
17
-        $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'roles');
9
+	/**
10
+	 * Bootstrap the module services.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function boot()
15
+	{
16
+		$this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'roles');
17
+		$this->loadViewsFrom(__DIR__.'/../Resources/Views', 'roles');
18 18
 
19
-        $this->loadMigrationsFrom(module_path('roles', 'Database/Migrations', 'app'));
20
-        $this->loadFactoriesFrom(module_path('roles', 'Database/Factories', 'app'));
21
-        if (!$this->app->configurationIsCached()) {
22
-            $this->loadConfigsFrom(module_path('roles', 'Config', 'app'));
23
-        }
24
-    }
19
+		$this->loadMigrationsFrom(module_path('roles', 'Database/Migrations', 'app'));
20
+		$this->loadFactoriesFrom(module_path('roles', 'Database/Factories', 'app'));
21
+		if (!$this->app->configurationIsCached()) {
22
+			$this->loadConfigsFrom(module_path('roles', 'Config', 'app'));
23
+		}
24
+	}
25 25
 
26
-    /**
27
-     * Register the module services.
28
-     *
29
-     * @return void
30
-     */
31
-    public function register()
32
-    {
33
-        $this->app->register(RouteServiceProvider::class);
34
-    }
26
+	/**
27
+	 * Register the module services.
28
+	 *
29
+	 * @return void
30
+	 */
31
+	public function register()
32
+	{
33
+		$this->app->register(RouteServiceProvider::class);
34
+	}
35 35
 }
Please login to merge, or discard this patch.
src/Modules/Reporting/Providers/ModuleServiceProvider.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -6,30 +6,30 @@
 block discarded – undo
6 6
 
7 7
 class ModuleServiceProvider extends ServiceProvider
8 8
 {
9
-    /**
10
-     * Bootstrap the module services.
11
-     *
12
-     * @return void
13
-     */
14
-    public function boot()
15
-    {
16
-        $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'reporting');
17
-        $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'reporting');
9
+	/**
10
+	 * Bootstrap the module services.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function boot()
15
+	{
16
+		$this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'reporting');
17
+		$this->loadViewsFrom(__DIR__.'/../Resources/Views', 'reporting');
18 18
 
19
-        $this->loadMigrationsFrom(module_path('reporting', 'Database/Migrations', 'app'));
20
-        $this->loadFactoriesFrom(module_path('reporting', 'Database/Factories', 'app'));
21
-        if (!$this->app->configurationIsCached()) {
22
-            $this->loadConfigsFrom(module_path('reporting', 'Config', 'app'));
23
-        }
24
-    }
19
+		$this->loadMigrationsFrom(module_path('reporting', 'Database/Migrations', 'app'));
20
+		$this->loadFactoriesFrom(module_path('reporting', 'Database/Factories', 'app'));
21
+		if (!$this->app->configurationIsCached()) {
22
+			$this->loadConfigsFrom(module_path('reporting', 'Config', 'app'));
23
+		}
24
+	}
25 25
 
26
-    /**
27
-     * Register the module services.
28
-     *
29
-     * @return void
30
-     */
31
-    public function register()
32
-    {
33
-        $this->app->register(RouteServiceProvider::class);
34
-    }
26
+	/**
27
+	 * Register the module services.
28
+	 *
29
+	 * @return void
30
+	 */
31
+	public function register()
32
+	{
33
+		$this->app->register(RouteServiceProvider::class);
34
+	}
35 35
 }
Please login to merge, or discard this patch.