Completed
Push — master ( 91df31...876b8b )
by Sherif
01:12
created
Modules/Reporting/Database/Migrations/2016_01_19_112603_sampel_report.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@  discard block
 block discarded – undo
5 5
 
6 6
 class SampelReport extends Migration
7 7
 {
8
-    /**
9
-     * Run the migrations.
10
-     *
11
-     * @return void
12
-     */
13
-    public function up()
14
-    {
15
-        DB::statement("CREATE VIEW admin_count AS  
8
+	/**
9
+	 * Run the migrations.
10
+	 *
11
+	 * @return void
12
+	 */
13
+	public function up()
14
+	{
15
+		DB::statement("CREATE VIEW admin_count AS  
16 16
 			select count(u.id)
17 17
 			from users u, roles g ,role_user ug
18 18
 			where
@@ -20,25 +20,25 @@  discard block
 block discarded – undo
20 20
 			ug.role_id = g.id 
21 21
 			");
22 22
         
23
-        DB::table('reports')->insert(
24
-            [
25
-                [
26
-                'report_name' => 'admin_count',
27
-                'view_name'   => 'admin_count',
28
-                'created_at'  => \DB::raw('NOW()'),
29
-                'updated_at'  => \DB::raw('NOW()')
30
-                ]
31
-            ]
32
-        );
33
-    }
23
+		DB::table('reports')->insert(
24
+			[
25
+				[
26
+				'report_name' => 'admin_count',
27
+				'view_name'   => 'admin_count',
28
+				'created_at'  => \DB::raw('NOW()'),
29
+				'updated_at'  => \DB::raw('NOW()')
30
+				]
31
+			]
32
+		);
33
+	}
34 34
 
35
-    /**
36
-     * Reverse the migrations.
37
-     *
38
-     * @return void
39
-     */
40
-    public function down()
41
-    {
42
-        DB::statement("DROP VIEW IF EXISTS admin_count");
43
-    }
35
+	/**
36
+	 * Reverse the migrations.
37
+	 *
38
+	 * @return void
39
+	 */
40
+	public function down()
41
+	{
42
+		DB::statement("DROP VIEW IF EXISTS admin_count");
43
+	}
44 44
 }
Please login to merge, or discard this patch.
src/Modules/Reporting/Http/Resources/View.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@
 block discarded – undo
6 6
 
7 7
 class View extends JsonResource
8 8
 {
9
-    /**
10
-     * Transform the resource into an array.
11
-     *
12
-     * @param Request $request
13
-     * @return array
14
-     */
15
-    public function toArray($request)
16
-    {
17
-        return [$this->resource];
18
-    }
9
+	/**
10
+	 * Transform the resource into an array.
11
+	 *
12
+	 * @param Request $request
13
+	 * @return array
14
+	 */
15
+	public function toArray($request)
16
+	{
17
+		return [$this->resource];
18
+	}
19 19
 }
Please login to merge, or discard this patch.
src/Modules/Reporting/Http/Controllers/ReportController.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -9,40 +9,40 @@
 block discarded – undo
9 9
 
10 10
 class ReportController extends BaseApiController
11 11
 {
12
-    /**
13
-     * Path of the model resource
14
-     *
15
-     * @var string
16
-     */
17
-    protected $modelResource = 'App\Modules\Reporting\Http\Resources\Report';
12
+	/**
13
+	 * Path of the model resource
14
+	 *
15
+	 * @var string
16
+	 */
17
+	protected $modelResource = 'App\Modules\Reporting\Http\Resources\Report';
18 18
 
19
-    /**
20
-     * List of all route actions that the base api controller
21
-     * will skip permissions check for them.
22
-     * @var array
23
-     */
24
-    protected $skipPermissionCheck = ['getReport'];
19
+	/**
20
+	 * List of all route actions that the base api controller
21
+	 * will skip permissions check for them.
22
+	 * @var array
23
+	 */
24
+	protected $skipPermissionCheck = ['getReport'];
25 25
 
26
-    /**
27
-     * Init new object.
28
-     *
29
-     * @param   ReportService $service
30
-     * @return  void
31
-     */
32
-    public function __construct(ReportService $service)
33
-    {
34
-        parent::__construct($service);
35
-    }
26
+	/**
27
+	 * Init new object.
28
+	 *
29
+	 * @param   ReportService $service
30
+	 * @return  void
31
+	 */
32
+	public function __construct(ReportService $service)
33
+	{
34
+		parent::__construct($service);
35
+	}
36 36
 
37
-    /**
38
-     * Render the given servicert name with the given conditions.
39
-     *
40
-     * @param Request $request
41
-     * @param  string $reportName Name of the requested servicert
42
-     * @return \Illuminate\Http\Response
43
-     */
44
-    public function getReport(Request $request, $reportName)
45
-    {
46
-        return new ViewResource($this->service->getReport($reportName, $request->all(), $request->query('perPage')));
47
-    }
37
+	/**
38
+	 * Render the given servicert name with the given conditions.
39
+	 *
40
+	 * @param Request $request
41
+	 * @param  string $reportName Name of the requested servicert
42
+	 * @return \Illuminate\Http\Response
43
+	 */
44
+	public function getReport(Request $request, $reportName)
45
+	{
46
+		return new ViewResource($this->service->getReport($reportName, $request->all(), $request->query('perPage')));
47
+	}
48 48
 }
Please login to merge, or discard this patch.
files/channels.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,5 +12,5 @@
 block discarded – undo
12 12
 */
13 13
 
14 14
 Broadcast::channel('users.{id}', function ($user, $id) {
15
-    return (int) $user->id === (int) $id;
15
+	return (int) $user->id === (int) $id;
16 16
 });
Please login to merge, or discard this patch.
files/BroadcastServiceProvider.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@
 block discarded – undo
7 7
 
8 8
 class BroadcastServiceProvider extends ServiceProvider
9 9
 {
10
-    /**
11
-     * Bootstrap any application services.
12
-     *
13
-     * @return void
14
-     */
15
-    public function boot()
16
-    {
17
-        Broadcast::routes(['middleware' => ['auth:api']]);
10
+	/**
11
+	 * Bootstrap any application services.
12
+	 *
13
+	 * @return void
14
+	 */
15
+	public function boot()
16
+	{
17
+		Broadcast::routes(['middleware' => ['auth:api']]);
18 18
 
19
-        require base_path('routes/channels.php');
20
-    }
19
+		require base_path('routes/channels.php');
20
+	}
21 21
 }
Please login to merge, or discard this patch.
files/auth.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 return [
4 4
 
5
-    /*
5
+	/*
6 6
     |--------------------------------------------------------------------------
7 7
     | Authentication Defaults
8 8
     |--------------------------------------------------------------------------
@@ -13,12 +13,12 @@  discard block
 block discarded – undo
13 13
     |
14 14
     */
15 15
 
16
-    'defaults' => [
17
-        'guard' => 'web',
18
-        'passwords' => 'users',
19
-    ],
16
+	'defaults' => [
17
+		'guard' => 'web',
18
+		'passwords' => 'users',
19
+	],
20 20
 
21
-    /*
21
+	/*
22 22
     |--------------------------------------------------------------------------
23 23
     | Authentication Guards
24 24
     |--------------------------------------------------------------------------
@@ -35,19 +35,19 @@  discard block
 block discarded – undo
35 35
     |
36 36
     */
37 37
 
38
-    'guards' => [
39
-        'web' => [
40
-            'driver' => 'session',
41
-            'provider' => 'users',
42
-        ],
38
+	'guards' => [
39
+		'web' => [
40
+			'driver' => 'session',
41
+			'provider' => 'users',
42
+		],
43 43
 
44
-        'api' => [
45
-            'driver' => 'passport',
46
-            'provider' => 'users',
47
-        ],
48
-    ],
44
+		'api' => [
45
+			'driver' => 'passport',
46
+			'provider' => 'users',
47
+		],
48
+	],
49 49
 
50
-    /*
50
+	/*
51 51
     |--------------------------------------------------------------------------
52 52
     | User Providers
53 53
     |--------------------------------------------------------------------------
@@ -64,19 +64,19 @@  discard block
 block discarded – undo
64 64
     |
65 65
     */
66 66
 
67
-    'providers' => [
68
-        'users' => [
69
-            'driver' => 'eloquent',
70
-            'model' => App\Modules\Users\AclUser::class,
71
-        ],
67
+	'providers' => [
68
+		'users' => [
69
+			'driver' => 'eloquent',
70
+			'model' => App\Modules\Users\AclUser::class,
71
+		],
72 72
 
73
-        // 'users' => [
74
-        //     'driver' => 'database',
75
-        //     'table' => 'users',
76
-        // ],
77
-    ],
73
+		// 'users' => [
74
+		//     'driver' => 'database',
75
+		//     'table' => 'users',
76
+		// ],
77
+	],
78 78
 
79
-    /*
79
+	/*
80 80
     |--------------------------------------------------------------------------
81 81
     | Resetting Passwords
82 82
     |--------------------------------------------------------------------------
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
     |
92 92
     */
93 93
 
94
-    'passwords' => [
95
-        'users' => [
96
-            'provider' => 'users',
97
-            'table' => 'password_resets',
98
-            'expire' => 60,
99
-        ],
100
-    ],
94
+	'passwords' => [
95
+		'users' => [
96
+			'provider' => 'users',
97
+			'table' => 'password_resets',
98
+			'expire' => 60,
99
+		],
100
+	],
101 101
 
102 102
 ];
Please login to merge, or discard this patch.
src/Modules/Core/Console/Commands/Stubs/Module/Services/DummyService.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@
 block discarded – undo
5 5
 
6 6
 class DummyService extends BaseService
7 7
 {
8
-    /**
9
-     * Init new object.
10
-     *
11
-     * @param   DummyRepository $repo
12
-     * @return  void
13
-     */
14
-    public function __construct(DummyRepository $repo)
15
-    {
16
-        parent::__construct($repo);
17
-    }
8
+	/**
9
+	 * Init new object.
10
+	 *
11
+	 * @param   DummyRepository $repo
12
+	 * @return  void
13
+	 */
14
+	public function __construct(DummyRepository $repo)
15
+	{
16
+		parent::__construct($repo);
17
+	}
18 18
 }
Please login to merge, or discard this patch.
src/Modules/Core/ModelObservers/SettingsObserver.php 1 patch
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -6,67 +6,67 @@
 block discarded – undo
6 6
 class SettingsObserver
7 7
 {
8 8
 
9
-    public function saving($model)
10
-    {
11
-        //
12
-    }
9
+	public function saving($model)
10
+	{
11
+		//
12
+	}
13 13
 
14
-    public function saved($model)
15
-    {
16
-        //
17
-    }
14
+	public function saved($model)
15
+	{
16
+		//
17
+	}
18 18
 
19
-    /**
20
-     * Prevent the creating of the settings.
21
-     *
22
-     * @param  object $model the model beign created.
23
-     * @return void
24
-     */
25
-    public function creating($model)
26
-    {
27
-        \Errors::cannotCreateSetting();
28
-    }
19
+	/**
20
+	 * Prevent the creating of the settings.
21
+	 *
22
+	 * @param  object $model the model beign created.
23
+	 * @return void
24
+	 */
25
+	public function creating($model)
26
+	{
27
+		\Errors::cannotCreateSetting();
28
+	}
29 29
 
30
-    public function created($model)
31
-    {
32
-        //
33
-    }
30
+	public function created($model)
31
+	{
32
+		//
33
+	}
34 34
 
35
-    /**
36
-     * Prevent updating of the setting key.
37
-     *
38
-     * @param  object $model the model beign updated.
39
-     * @return void
40
-     */
41
-    public function updating($model)
42
-    {
43
-        if ($model->getOriginal('key') !== $model->key) {
44
-            \Errors::cannotUpdateSettingKey();
45
-        }
46
-    }
35
+	/**
36
+	 * Prevent updating of the setting key.
37
+	 *
38
+	 * @param  object $model the model beign updated.
39
+	 * @return void
40
+	 */
41
+	public function updating($model)
42
+	{
43
+		if ($model->getOriginal('key') !== $model->key) {
44
+			\Errors::cannotUpdateSettingKey();
45
+		}
46
+	}
47 47
 
48
-    public function updated($model)
49
-    {
50
-        //
51
-    }
48
+	public function updated($model)
49
+	{
50
+		//
51
+	}
52 52
 
53
-    public function deleting($model)
54
-    {
55
-        //
56
-    }
53
+	public function deleting($model)
54
+	{
55
+		//
56
+	}
57 57
 
58
-    public function deleted($model)
59
-    {
60
-        //
61
-    }
58
+	public function deleted($model)
59
+	{
60
+		//
61
+	}
62 62
 
63
-    public function restoring($model)
64
-    {
65
-        //
66
-    }
63
+	public function restoring($model)
64
+	{
65
+		//
66
+	}
67 67
 
68
-    public function restored($model)
69
-    {
70
-        //
71
-    }
68
+	public function restored($model)
69
+	{
70
+		//
71
+	}
72 72
 }
Please login to merge, or discard this patch.
src/Modules/Users/ModelObservers/AclUserObserver.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -6,61 +6,61 @@
 block discarded – undo
6 6
 class AclUserObserver
7 7
 {
8 8
 
9
-    public function saving($model)
10
-    {
11
-        if ($model->isDirty('profile_picture')) {
12
-            \Media::deleteImage($model->getOriginal('profile_picture'));
13
-        }
14
-    }
9
+	public function saving($model)
10
+	{
11
+		if ($model->isDirty('profile_picture')) {
12
+			\Media::deleteImage($model->getOriginal('profile_picture'));
13
+		}
14
+	}
15 15
 
16
-    public function saved($model)
17
-    {
18
-        //
19
-    }
16
+	public function saved($model)
17
+	{
18
+		//
19
+	}
20 20
 
21
-    public function creating($model)
22
-    {
23
-        //
24
-    }
21
+	public function creating($model)
22
+	{
23
+		//
24
+	}
25 25
 
26
-    public function created($model)
27
-    {
28
-        //
29
-    }
26
+	public function created($model)
27
+	{
28
+		//
29
+	}
30 30
 
31
-    public function updating($model)
32
-    {
33
-        //
34
-    }
31
+	public function updating($model)
32
+	{
33
+		//
34
+	}
35 35
 
36
-    public function updated($model)
37
-    {
38
-        if ($model->isDirty('blocked') && $model->blocked) {
39
-            $model->tokens()->each(function ($token) {
40
-                \Core::oauthClients()->revokeAccessToken($token);
41
-            });
42
-        }
43
-    }
36
+	public function updated($model)
37
+	{
38
+		if ($model->isDirty('blocked') && $model->blocked) {
39
+			$model->tokens()->each(function ($token) {
40
+				\Core::oauthClients()->revokeAccessToken($token);
41
+			});
42
+		}
43
+	}
44 44
 
45
-    public function deleting($model)
46
-    {
47
-        if ($model->getOriginal('id') == \Auth::id()) {
48
-            \Errors::noPermissions();
49
-        }
50
-    }
45
+	public function deleting($model)
46
+	{
47
+		if ($model->getOriginal('id') == \Auth::id()) {
48
+			\Errors::noPermissions();
49
+		}
50
+	}
51 51
 
52
-    public function deleted($model)
53
-    {
54
-        //
55
-    }
52
+	public function deleted($model)
53
+	{
54
+		//
55
+	}
56 56
 
57
-    public function restoring($model)
58
-    {
59
-        //
60
-    }
57
+	public function restoring($model)
58
+	{
59
+		//
60
+	}
61 61
 
62
-    public function restored($model)
63
-    {
64
-        //
65
-    }
62
+	public function restored($model)
63
+	{
64
+		//
65
+	}
66 66
 }
Please login to merge, or discard this patch.