Completed
Push — master ( 2e36c4...3a8db8 )
by Sherif
02:08
created
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('skeleton.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('skeleton.confrim_email_url').'/'.$notifiable->confirmation_code);
48
+	}
49 49
 }
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('skeleton.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('skeleton.reset_password_url').'/'.$this->token);
50
+	}
51 51
 }
Please login to merge, or discard this patch.
src/Modules/Core/Interfaces/BaseFactoryInterface.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -2,15 +2,15 @@
 block discarded – undo
2 2
 
3 3
 interface BaseFactoryInterface
4 4
 {
5
-    /**
6
-     * Construct the repository class name based on
7
-     * the method name called, search in the
8
-     * given namespaces for the class and
9
-     * return an instance.
10
-     *
11
-     * @param  string $name the called method name
12
-     * @param  array  $arguments the method arguments
13
-     * @return object
14
-     */
15
-    public function __call($name, $arguments);
5
+	/**
6
+	 * Construct the repository class name based on
7
+	 * the method name called, search in the
8
+	 * given namespaces for the class and
9
+	 * return an instance.
10
+	 *
11
+	 * @param  string $name the called method name
12
+	 * @param  array  $arguments the method arguments
13
+	 * @return object
14
+	 */
15
+	public function __call($name, $arguments);
16 16
 }
Please login to merge, or discard this patch.
src/Modules/Reporting/Http/Controllers/ReportController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      *
34 34
      * @param Request $request
35 35
      * @param  string $reportName Name of the requested report
36
-     * @return \Illuminate\Http\Response
36
+     * @return \Illuminate\Http\JsonResponse
37 37
      */
38 38
     public function getReport(Request $request, $reportName)
39 39
     {
Please login to merge, or discard this patch.
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -8,33 +8,33 @@
 block discarded – undo
8 8
 
9 9
 class ReportController extends BaseApiController
10 10
 {
11
-    /**
12
-     * List of all route actions that the base api controller
13
-     * will skip permissions check for them.
14
-     * @var array
15
-     */
16
-    protected $skipPermissionCheck = ['getReport'];
11
+	/**
12
+	 * List of all route actions that the base api controller
13
+	 * will skip permissions check for them.
14
+	 * @var array
15
+	 */
16
+	protected $skipPermissionCheck = ['getReport'];
17 17
 
18
-    /**
19
-     * Init new object.
20
-     *
21
-     * @param   ReportRepository $repo
22
-     * @return  void
23
-     */
24
-    public function __construct(ReportRepository $repo)
25
-    {
26
-        parent::__construct($repo, 'App\Modules\Reporting\Http\Resources\Report');
27
-    }
18
+	/**
19
+	 * Init new object.
20
+	 *
21
+	 * @param   ReportRepository $repo
22
+	 * @return  void
23
+	 */
24
+	public function __construct(ReportRepository $repo)
25
+	{
26
+		parent::__construct($repo, 'App\Modules\Reporting\Http\Resources\Report');
27
+	}
28 28
 
29
-    /**
30
-     * Render the given report name with the given conditions.
31
-     *
32
-     * @param Request $request
33
-     * @param  string $reportName Name of the requested report
34
-     * @return \Illuminate\Http\Response
35
-     */
36
-    public function getReport(Request $request, $reportName)
37
-    {
38
-        return \Response::json($this->repo->getReport($reportName, $request->all(), $request->query('perPage')), 200);
39
-    }
29
+	/**
30
+	 * Render the given report name with the given conditions.
31
+	 *
32
+	 * @param Request $request
33
+	 * @param  string $reportName Name of the requested report
34
+	 * @return \Illuminate\Http\Response
35
+	 */
36
+	public function getReport(Request $request, $reportName)
37
+	{
38
+		return \Response::json($this->repo->getReport($reportName, $request->all(), $request->query('perPage')), 200);
39
+	}
40 40
 }
Please login to merge, or discard this patch.
src/Modules/Notifications/Database/Seeds/NotificationsTableSeeder.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -6,46 +6,46 @@
 block discarded – undo
6 6
 
7 7
 class NotificationsTableSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {
16
-        /**
17
-         * Insert the permissions related to settings table.
18
-         */
19
-        \DB::table('permissions')->insert(
20
-            [
21
-                /**
22
-                 * notifications model permissions.
23
-                 */
24
-                [
25
-                'name'       => 'all',
26
-                'model'      => 'notification',
27
-                'created_at' => \DB::raw('NOW()'),
28
-                'updated_at' => \DB::raw('NOW()')
29
-                ],
30
-                [
31
-                'name'       => 'unread',
32
-                'model'      => 'notification',
33
-                'created_at' => \DB::raw('NOW()'),
34
-                'updated_at' => \DB::raw('NOW()')
35
-                ],
36
-                [
37
-                'name'       => 'markAsRead',
38
-                'model'      => 'notification',
39
-                'created_at' => \DB::raw('NOW()'),
40
-                'updated_at' => \DB::raw('NOW()')
41
-                ],
42
-                [
43
-                'name'       => 'markAllAsRead',
44
-                'model'      => 'notification',
45
-                'created_at' => \DB::raw('NOW()'),
46
-                'updated_at' => \DB::raw('NOW()')
47
-                ]
48
-            ]
49
-        );
50
-    }
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{
16
+		/**
17
+		 * Insert the permissions related to settings table.
18
+		 */
19
+		\DB::table('permissions')->insert(
20
+			[
21
+				/**
22
+				 * notifications model permissions.
23
+				 */
24
+				[
25
+				'name'       => 'all',
26
+				'model'      => 'notification',
27
+				'created_at' => \DB::raw('NOW()'),
28
+				'updated_at' => \DB::raw('NOW()')
29
+				],
30
+				[
31
+				'name'       => 'unread',
32
+				'model'      => 'notification',
33
+				'created_at' => \DB::raw('NOW()'),
34
+				'updated_at' => \DB::raw('NOW()')
35
+				],
36
+				[
37
+				'name'       => 'markAsRead',
38
+				'model'      => 'notification',
39
+				'created_at' => \DB::raw('NOW()'),
40
+				'updated_at' => \DB::raw('NOW()')
41
+				],
42
+				[
43
+				'name'       => 'markAllAsRead',
44
+				'model'      => 'notification',
45
+				'created_at' => \DB::raw('NOW()'),
46
+				'updated_at' => \DB::raw('NOW()')
47
+				]
48
+			]
49
+		);
50
+	}
51 51
 }
Please login to merge, or discard this patch.
src/Modules/Notifications/Database/Seeds/AssignRelationsSeeder.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -6,27 +6,27 @@
 block discarded – undo
6 6
 
7 7
 class AssignRelationsSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {
16
-        $adminGroupId = \DB::table('groups')->where('name', 'admin')->select('id')->first()->id;
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{
16
+		$adminGroupId = \DB::table('groups')->where('name', 'admin')->select('id')->first()->id;
17 17
 
18
-        /**
19
-         * Assign the permissions to the admin group.
20
-         */
21
-        \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['notification', 'pushNotificationDevice'])->each(function ($permission) use ($adminGroupId) {
22
-            \DB::table('groups_permissions')->insert(
23
-                [
24
-                'permission_id' => $permission->id,
25
-                'group_id'      => $adminGroupId,
26
-                'created_at'    => \DB::raw('NOW()'),
27
-                'updated_at'    => \DB::raw('NOW()')
28
-                ]
29
-            );
30
-        });
31
-    }
18
+		/**
19
+		 * Assign the permissions to the admin group.
20
+		 */
21
+		\DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['notification', 'pushNotificationDevice'])->each(function ($permission) use ($adminGroupId) {
22
+			\DB::table('groups_permissions')->insert(
23
+				[
24
+				'permission_id' => $permission->id,
25
+				'group_id'      => $adminGroupId,
26
+				'created_at'    => \DB::raw('NOW()'),
27
+				'updated_at'    => \DB::raw('NOW()')
28
+				]
29
+			);
30
+		});
31
+	}
32 32
 }
Please login to merge, or discard this 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
          * Assign the permissions to the admin group.
20 20
          */
21
-        \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['notification', 'pushNotificationDevice'])->each(function ($permission) use ($adminGroupId) {
21
+        \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['notification', 'pushNotificationDevice'])->each(function($permission) use ($adminGroupId) {
22 22
             \DB::table('groups_permissions')->insert(
23 23
                 [
24 24
                 'permission_id' => $permission->id,
Please login to merge, or discard this patch.
src/Modules/Notifications/Database/Seeds/ClearDataSeeder.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
 
7 7
 class ClearDataSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {
16
-        $permissions = \DB::table('permissions')->whereIn('model', ['notification', 'pushNotificationDevice']);
17
-        \DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete();
18
-        $permissions->delete();
19
-    }
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{
16
+		$permissions = \DB::table('permissions')->whereIn('model', ['notification', 'pushNotificationDevice']);
17
+		\DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete();
18
+		$permissions->delete();
19
+	}
20 20
 }
Please login to merge, or discard this patch.
src/Modules/Reporting/Database/Seeds/ReportsTableSeeder.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -6,40 +6,40 @@
 block discarded – undo
6 6
 
7 7
 class ReportsTableSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {
16
-        /**
17
-         * Insert the permissions related to settings table.
18
-         */
19
-        \DB::table('permissions')->insert(
20
-            [
21
-                /**
22
-                 * Reports model permissions.
23
-                 */
24
-                [
25
-                'name'       => 'index',
26
-                'model'      => 'report',
27
-                'created_at' => \DB::raw('NOW()'),
28
-                'updated_at' => \DB::raw('NOW()')
29
-                ],
30
-                [
31
-                'name'       => 'find',
32
-                'model'      => 'report',
33
-                'created_at' => \DB::raw('NOW()'),
34
-                'updated_at' => \DB::raw('NOW()')
35
-                ],
36
-                [
37
-                'name'       => 'admin_count',
38
-                'model'      => 'report',
39
-                'created_at' => \DB::raw('NOW()'),
40
-                'updated_at' => \DB::raw('NOW()')
41
-                ]
42
-            ]
43
-        );
44
-    }
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{
16
+		/**
17
+		 * Insert the permissions related to settings table.
18
+		 */
19
+		\DB::table('permissions')->insert(
20
+			[
21
+				/**
22
+				 * Reports model permissions.
23
+				 */
24
+				[
25
+				'name'       => 'index',
26
+				'model'      => 'report',
27
+				'created_at' => \DB::raw('NOW()'),
28
+				'updated_at' => \DB::raw('NOW()')
29
+				],
30
+				[
31
+				'name'       => 'find',
32
+				'model'      => 'report',
33
+				'created_at' => \DB::raw('NOW()'),
34
+				'updated_at' => \DB::raw('NOW()')
35
+				],
36
+				[
37
+				'name'       => 'admin_count',
38
+				'model'      => 'report',
39
+				'created_at' => \DB::raw('NOW()'),
40
+				'updated_at' => \DB::raw('NOW()')
41
+				]
42
+			]
43
+		);
44
+	}
45 45
 }
Please login to merge, or discard this patch.
src/Modules/Reporting/Database/Seeds/AssignRelationsSeeder.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -6,27 +6,27 @@
 block discarded – undo
6 6
 
7 7
 class AssignRelationsSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {
16
-        $adminGroupId = \DB::table('groups')->where('name', 'admin')->select('id')->first()->id;
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{
16
+		$adminGroupId = \DB::table('groups')->where('name', 'admin')->select('id')->first()->id;
17 17
 
18
-        /**
19
-         * Assign the permissions to the admin group.
20
-         */
21
-        \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['report'])->each(function ($permission) use ($adminGroupId) {
22
-            \DB::table('groups_permissions')->insert(
23
-                [
24
-                'permission_id' => $permission->id,
25
-                'group_id'      => $adminGroupId,
26
-                'created_at'    => \DB::raw('NOW()'),
27
-                'updated_at'    => \DB::raw('NOW()')
28
-                ]
29
-            );
30
-        });
31
-    }
18
+		/**
19
+		 * Assign the permissions to the admin group.
20
+		 */
21
+		\DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['report'])->each(function ($permission) use ($adminGroupId) {
22
+			\DB::table('groups_permissions')->insert(
23
+				[
24
+				'permission_id' => $permission->id,
25
+				'group_id'      => $adminGroupId,
26
+				'created_at'    => \DB::raw('NOW()'),
27
+				'updated_at'    => \DB::raw('NOW()')
28
+				]
29
+			);
30
+		});
31
+	}
32 32
 }
Please login to merge, or discard this 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
          * Assign the permissions to the admin group.
20 20
          */
21
-        \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['report'])->each(function ($permission) use ($adminGroupId) {
21
+        \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['report'])->each(function($permission) use ($adminGroupId) {
22 22
             \DB::table('groups_permissions')->insert(
23 23
                 [
24 24
                 'permission_id' => $permission->id,
Please login to merge, or discard this patch.