Completed
Push — master ( a38508...8df45b )
by Sherif
02:18
created
src/Modules/Core/Core.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -4,26 +4,26 @@
 block discarded – undo
4 4
 
5 5
 class Core implements BaseFactoryInterface
6 6
 {
7
-    /**
8
-     * Construct the repository class name based on
9
-     * the method name called, search in the
10
-     * given namespaces for the class and
11
-     * return an instance.
12
-     *
13
-     * @param  string $name the called method name
14
-     * @param  array  $arguments the method arguments
15
-     * @return object
16
-     */
17
-    public function __call($name, $arguments)
18
-    {
19
-        foreach (\Module::all() as $module) {
20
-            $nameSpace = 'App\\Modules\\' . $module['basename'] ;
21
-            $model = ucfirst(\Str::singular($name));
22
-            $class = $nameSpace . '\\Repositories\\' . $model . 'Repository';
7
+	/**
8
+	 * Construct the repository class name based on
9
+	 * the method name called, search in the
10
+	 * given namespaces for the class and
11
+	 * return an instance.
12
+	 *
13
+	 * @param  string $name the called method name
14
+	 * @param  array  $arguments the method arguments
15
+	 * @return object
16
+	 */
17
+	public function __call($name, $arguments)
18
+	{
19
+		foreach (\Module::all() as $module) {
20
+			$nameSpace = 'App\\Modules\\' . $module['basename'] ;
21
+			$model = ucfirst(\Str::singular($name));
22
+			$class = $nameSpace . '\\Repositories\\' . $model . 'Repository';
23 23
 
24
-            if (class_exists($class)) {
25
-                return \App::make($class);
26
-            }
27
-        }
28
-    }
24
+			if (class_exists($class)) {
25
+				return \App::make($class);
26
+			}
27
+		}
28
+	}
29 29
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@
 block discarded – undo
17 17
     public function __call($name, $arguments)
18 18
     {
19 19
         foreach (\Module::all() as $module) {
20
-            $nameSpace = 'App\\Modules\\' . $module['basename'] ;
20
+            $nameSpace = 'App\\Modules\\'.$module['basename'];
21 21
             $model = ucfirst(\Str::singular($name));
22
-            $class = $nameSpace . '\\Repositories\\' . $model . 'Repository';
22
+            $class = $nameSpace.'\\Repositories\\'.$model.'Repository';
23 23
 
24 24
             if (class_exists($class)) {
25 25
                 return \App::make($class);
Please login to merge, or discard this patch.
src/Modules/Core/Routes/api.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 |
12 12
 */
13 13
 
14
-Route::group(['prefix' => 'settings'], function () {
14
+Route::group(['prefix' => 'settings'], function() {
15 15
         
16 16
     Route::get('/', 'SettingController@index');
17 17
     Route::get('/{id}', 'SettingController@find');
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@
 block discarded – undo
13 13
 
14 14
 Route::group(['prefix' => 'settings'], function () {
15 15
         
16
-    Route::get('/', 'SettingController@index');
17
-    Route::get('/{id}', 'SettingController@find');
18
-    Route::put('/', 'SettingController@update');
19
-    Route::delete('/{id}', 'SettingController@delete');
20
-    Route::get('list/deleted', 'SettingController@deleted');
21
-    Route::patch('restore/{id}', 'SettingController@restore');
22
-    Route::post('save/many', 'SettingController@saveMany');
16
+	Route::get('/', 'SettingController@index');
17
+	Route::get('/{id}', 'SettingController@find');
18
+	Route::put('/', 'SettingController@update');
19
+	Route::delete('/{id}', 'SettingController@delete');
20
+	Route::get('list/deleted', 'SettingController@deleted');
21
+	Route::patch('restore/{id}', 'SettingController@restore');
22
+	Route::post('save/many', 'SettingController@saveMany');
23 23
 });
Please login to merge, or discard this patch.
src/Modules/Core/Providers/ModuleServiceProvider.php 2 patches
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -6,53 +6,53 @@
 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', 'core');
17
-        $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'core');
18
-
19
-        $this->loadMigrationsFrom(module_path('core', 'Database/Migrations', 'app'));
20
-        $this->loadFactoriesFrom(module_path('core', 'Database/Factories', 'app'));
21
-    }
22
-
23
-    /**
24
-     * Register the module services.
25
-     *
26
-     * @return void
27
-     */
28
-    public function register()
29
-    {
30
-        //Bind Core Facade to the Service Container
31
-        $this->app->singleton('Core', function () {
32
-            return new \App\Modules\Core\Core;
33
-        });
34
-
35
-        //Bind ErrorHandler Facade to the Service Container
36
-        $this->app->singleton('ErrorHandler', function () {
37
-            return new \App\Modules\Core\Utl\ErrorHandler;
38
-        });
39
-
40
-        //Bind CoreConfig Facade to the Service Container
41
-        $this->app->singleton('CoreConfig', function () {
42
-            return new \App\Modules\Core\Utl\CoreConfig;
43
-        });
44
-
45
-        //Bind Media Facade to the Service Container
46
-        $this->app->singleton('Media', function () {
47
-            return new \App\Modules\Core\Utl\Media;
48
-        });
49
-
50
-        //Bind ApiConsumer Facade to the Service Container
51
-        $this->app->singleton('ApiConsumer', function () {
52
-            $app = app();
53
-            return new \App\Modules\Core\Utl\ApiConsumer($app, $app['request'], $app['router']);
54
-        });
9
+	/**
10
+	 * Bootstrap the module services.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function boot()
15
+	{
16
+		$this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'core');
17
+		$this->loadViewsFrom(__DIR__.'/../Resources/Views', 'core');
18
+
19
+		$this->loadMigrationsFrom(module_path('core', 'Database/Migrations', 'app'));
20
+		$this->loadFactoriesFrom(module_path('core', 'Database/Factories', 'app'));
21
+	}
22
+
23
+	/**
24
+	 * Register the module services.
25
+	 *
26
+	 * @return void
27
+	 */
28
+	public function register()
29
+	{
30
+		//Bind Core Facade to the Service Container
31
+		$this->app->singleton('Core', function () {
32
+			return new \App\Modules\Core\Core;
33
+		});
34
+
35
+		//Bind ErrorHandler Facade to the Service Container
36
+		$this->app->singleton('ErrorHandler', function () {
37
+			return new \App\Modules\Core\Utl\ErrorHandler;
38
+		});
39
+
40
+		//Bind CoreConfig Facade to the Service Container
41
+		$this->app->singleton('CoreConfig', function () {
42
+			return new \App\Modules\Core\Utl\CoreConfig;
43
+		});
44
+
45
+		//Bind Media Facade to the Service Container
46
+		$this->app->singleton('Media', function () {
47
+			return new \App\Modules\Core\Utl\Media;
48
+		});
49
+
50
+		//Bind ApiConsumer Facade to the Service Container
51
+		$this->app->singleton('ApiConsumer', function () {
52
+			$app = app();
53
+			return new \App\Modules\Core\Utl\ApiConsumer($app, $app['request'], $app['router']);
54
+		});
55 55
         
56
-        $this->app->register(RouteServiceProvider::class);
57
-    }
56
+		$this->app->register(RouteServiceProvider::class);
57
+	}
58 58
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,27 +28,27 @@
 block discarded – undo
28 28
     public function register()
29 29
     {
30 30
         //Bind Core Facade to the Service Container
31
-        $this->app->singleton('Core', function () {
31
+        $this->app->singleton('Core', function() {
32 32
             return new \App\Modules\Core\Core;
33 33
         });
34 34
 
35 35
         //Bind ErrorHandler Facade to the Service Container
36
-        $this->app->singleton('ErrorHandler', function () {
36
+        $this->app->singleton('ErrorHandler', function() {
37 37
             return new \App\Modules\Core\Utl\ErrorHandler;
38 38
         });
39 39
 
40 40
         //Bind CoreConfig Facade to the Service Container
41
-        $this->app->singleton('CoreConfig', function () {
41
+        $this->app->singleton('CoreConfig', function() {
42 42
             return new \App\Modules\Core\Utl\CoreConfig;
43 43
         });
44 44
 
45 45
         //Bind Media Facade to the Service Container
46
-        $this->app->singleton('Media', function () {
46
+        $this->app->singleton('Media', function() {
47 47
             return new \App\Modules\Core\Utl\Media;
48 48
         });
49 49
 
50 50
         //Bind ApiConsumer Facade to the Service Container
51
-        $this->app->singleton('ApiConsumer', function () {
51
+        $this->app->singleton('ApiConsumer', function() {
52 52
             $app = app();
53 53
             return new \App\Modules\Core\Utl\ApiConsumer($app, $app['request'], $app['router']);
54 54
         });
Please login to merge, or discard this patch.
src/Modules/Core/Http/Resources/Setting.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -6,32 +6,32 @@
 block discarded – undo
6 6
 
7 7
 class Setting extends JsonResource
8 8
 {
9
-    /**
10
-     * Indicates if the resource's collection keys should be preserved.
11
-     *
12
-     * @var bool
13
-     */
14
-    public $preserveKeys = true;
9
+	/**
10
+	 * Indicates if the resource's collection keys should be preserved.
11
+	 *
12
+	 * @var bool
13
+	 */
14
+	public $preserveKeys = true;
15 15
 
16
-    /**
17
-     * Transform the resource into an array.
18
-     *
19
-     * @param Request $request
20
-     * @return array
21
-     */
22
-    public function toArray($request)
23
-    {
24
-        if (! $this->resource) {
25
-            return [];
26
-        }
16
+	/**
17
+	 * Transform the resource into an array.
18
+	 *
19
+	 * @param Request $request
20
+	 * @return array
21
+	 */
22
+	public function toArray($request)
23
+	{
24
+		if (! $this->resource) {
25
+			return [];
26
+		}
27 27
 
28
-        return [
29
-            'id' => $this->id,
30
-            'name' => $this->name,
31
-            'value' => $this->value,
32
-            'key' => $this->key,
33
-            'created_at' => $this->created_at,
34
-            'updated_at' => $this->updated_at,
35
-        ];
36
-    }
28
+		return [
29
+			'id' => $this->id,
30
+			'name' => $this->name,
31
+			'value' => $this->value,
32
+			'key' => $this->key,
33
+			'created_at' => $this->created_at,
34
+			'updated_at' => $this->updated_at,
35
+		];
36
+	}
37 37
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function toArray($request)
19 19
     {
20
-        if (! $this->resource) {
20
+        if ( ! $this->resource) {
21 21
             return [];
22 22
         }
23 23
 
Please login to merge, or discard this patch.
src/Modules/Reporting/Routes/api.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 |
12 12
 */
13 13
 
14
-Route::group(['prefix' => 'reports'], function () {
14
+Route::group(['prefix' => 'reports'], function() {
15 15
         
16 16
     Route::get('/', 'ReportController@index');
17 17
     Route::get('/{id}', 'ReportController@find');
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@
 block discarded – undo
13 13
 
14 14
 Route::group(['prefix' => 'reports'], function () {
15 15
         
16
-    Route::get('/', 'ReportController@index');
17
-    Route::get('/{id}', 'ReportController@find');
18
-    Route::post('/', 'ReportController@insert');
19
-    Route::put('/', 'ReportController@update');
20
-    Route::delete('/{id}', 'ReportController@delete');
21
-    Route::get('list/deleted', 'ReportController@deleted');
22
-    Route::patch('restore/{id}', 'ReportController@restore');
23
-    Route::post('get/{reportName}', 'ReportController@getReport');
16
+	Route::get('/', 'ReportController@index');
17
+	Route::get('/{id}', 'ReportController@find');
18
+	Route::post('/', 'ReportController@insert');
19
+	Route::put('/', 'ReportController@update');
20
+	Route::delete('/{id}', 'ReportController@delete');
21
+	Route::get('list/deleted', 'ReportController@deleted');
22
+	Route::patch('restore/{id}', 'ReportController@restore');
23
+	Route::post('get/{reportName}', 'ReportController@getReport');
24 24
 });
Please login to merge, or discard this patch.
src/Modules/Reporting/Providers/ModuleServiceProvider.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -6,27 +6,27 @@
 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
-    }
19
+		$this->loadMigrationsFrom(module_path('reporting', 'Database/Migrations', 'app'));
20
+		$this->loadFactoriesFrom(module_path('reporting', 'Database/Factories', 'app'));
21
+	}
22 22
 
23
-    /**
24
-     * Register the module services.
25
-     *
26
-     * @return void
27
-     */
28
-    public function register()
29
-    {
30
-        $this->app->register(RouteServiceProvider::class);
31
-    }
23
+	/**
24
+	 * Register the module services.
25
+	 *
26
+	 * @return void
27
+	 */
28
+	public function register()
29
+	{
30
+		$this->app->register(RouteServiceProvider::class);
31
+	}
32 32
 }
Please login to merge, or discard this patch.
src/Modules/Reporting/Http/Resources/Report.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -6,24 +6,24 @@
 block discarded – undo
6 6
 
7 7
 class Report 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
-        if (! $this->resource) {
18
-            return [];
19
-        }
9
+	/**
10
+	 * Transform the resource into an array.
11
+	 *
12
+	 * @param Request $request
13
+	 * @return array
14
+	 */
15
+	public function toArray($request)
16
+	{
17
+		if (! $this->resource) {
18
+			return [];
19
+		}
20 20
 
21
-        return [
22
-            'id' => $this->id,
23
-            'report_name' => $this->report_name,
24
-            'view_name' => $this->view_name,
25
-            'created_at' => $this->created_at,
26
-            'updated_at' => $this->updated_at,
27
-        ];
28
-    }
21
+		return [
22
+			'id' => $this->id,
23
+			'report_name' => $this->report_name,
24
+			'view_name' => $this->view_name,
25
+			'created_at' => $this->created_at,
26
+			'updated_at' => $this->updated_at,
27
+		];
28
+	}
29 29
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function toArray($request)
19 19
     {
20
-        if (! $this->resource) {
20
+        if ( ! $this->resource) {
21 21
             return [];
22 22
         }
23 23
 
Please login to merge, or discard this patch.
src/Modules/Groups/Repositories/GroupRepository.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -5,32 +5,32 @@
 block discarded – undo
5 5
 
6 6
 class GroupRepository extends BaseRepository
7 7
 {
8
-    /**
9
-     * Init new object.
10
-     *
11
-     * @param   AclGroup $model
12
-     * @return  void
13
-     */
14
-    public function __construct(AclGroup $model)
15
-    {
16
-        parent::__construct($model);
17
-    }
8
+	/**
9
+	 * Init new object.
10
+	 *
11
+	 * @param   AclGroup $model
12
+	 * @return  void
13
+	 */
14
+	public function __construct(AclGroup $model)
15
+	{
16
+		parent::__construct($model);
17
+	}
18 18
 
19
-    /**
20
-     * Assign the given permission ids to the given group.
21
-     *
22
-     * @param  integer $groupId
23
-     * @param  array   $permissionIds
24
-     * @return object
25
-     */
26
-    public function assignPermissions($groupId, $permissionIds)
27
-    {
28
-        \DB::transaction(function () use ($groupId, $permissionIds) {
29
-            $group = $this->find($groupId);
30
-            $group->permissions()->detach();
31
-            $group->permissions()->attach($permissionIds);
32
-        });
19
+	/**
20
+	 * Assign the given permission ids to the given group.
21
+	 *
22
+	 * @param  integer $groupId
23
+	 * @param  array   $permissionIds
24
+	 * @return object
25
+	 */
26
+	public function assignPermissions($groupId, $permissionIds)
27
+	{
28
+		\DB::transaction(function () use ($groupId, $permissionIds) {
29
+			$group = $this->find($groupId);
30
+			$group->permissions()->detach();
31
+			$group->permissions()->attach($permissionIds);
32
+		});
33 33
 
34
-        return $this->find($groupId);
35
-    }
34
+		return $this->find($groupId);
35
+	}
36 36
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function assignPermissions($groupId, $permissionIds)
25 25
     {
26
-        \DB::transaction(function () use ($groupId, $permissionIds) {
26
+        \DB::transaction(function() use ($groupId, $permissionIds) {
27 27
             $group = $this->find($groupId);
28 28
             $group->permissions()->detach();
29 29
             $group->permissions()->attach($permissionIds);
Please login to merge, or discard this patch.
src/Modules/Groups/ModelObservers/AclGroupObserver.php 1 patch
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -6,69 +6,69 @@
 block discarded – undo
6 6
 class AclGroupObserver
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
-    public function creating($model)
20
-    {
21
-        //
22
-    }
19
+	public function creating($model)
20
+	{
21
+		//
22
+	}
23 23
 
24
-    public function created($model)
25
-    {
26
-        //
27
-    }
24
+	public function created($model)
25
+	{
26
+		//
27
+	}
28 28
 
29
-    /**
30
-     * Prevent updating of the admin group.
31
-     *
32
-     * @param  object $model the model beign updated.
33
-     * @return void
34
-     */
35
-    public function updating($model)
36
-    {
37
-        if ($model->getOriginal('name') == 'Admin') {
38
-            \ErrorHandler::noPermissions();
39
-        }
40
-    }
29
+	/**
30
+	 * Prevent updating of the admin group.
31
+	 *
32
+	 * @param  object $model the model beign updated.
33
+	 * @return void
34
+	 */
35
+	public function updating($model)
36
+	{
37
+		if ($model->getOriginal('name') == 'Admin') {
38
+			\ErrorHandler::noPermissions();
39
+		}
40
+	}
41 41
 
42
-    public function updated($model)
43
-    {
44
-        //
45
-    }
42
+	public function updated($model)
43
+	{
44
+		//
45
+	}
46 46
 
47
-    /**
48
-     * Prevent deleting the admin group.
49
-     *
50
-     * @param  object $model the delted model.
51
-     * @return void
52
-     */
53
-    public function deleting($model)
54
-    {
55
-        if ($model->getOriginal('name') == 'Admin') {
56
-            \ErrorHandler::noPermissions();
57
-        }
58
-    }
47
+	/**
48
+	 * Prevent deleting the admin group.
49
+	 *
50
+	 * @param  object $model the delted model.
51
+	 * @return void
52
+	 */
53
+	public function deleting($model)
54
+	{
55
+		if ($model->getOriginal('name') == 'Admin') {
56
+			\ErrorHandler::noPermissions();
57
+		}
58
+	}
59 59
 
60
-    public function deleted($model)
61
-    {
62
-        //
63
-    }
60
+	public function deleted($model)
61
+	{
62
+		//
63
+	}
64 64
 
65
-    public function restoring($model)
66
-    {
67
-        //
68
-    }
65
+	public function restoring($model)
66
+	{
67
+		//
68
+	}
69 69
 
70
-    public function restored($model)
71
-    {
72
-        //
73
-    }
70
+	public function restored($model)
71
+	{
72
+		//
73
+	}
74 74
 }
Please login to merge, or discard this patch.