Completed
Push — master ( 7e51b9...91e5b0 )
by Sherif
04:01 queued 01:33
created
files/Handler.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -57,29 +57,23 @@
 block discarded – undo
57 57
 			if ($exception instanceof \Illuminate\Database\QueryException) 
58 58
 			{
59 59
 				\ErrorHandler::dbQueryError();
60
-			}
61
-			else if ($exception instanceof \predis\connection\connectionexception) 
60
+			} else if ($exception instanceof \predis\connection\connectionexception) 
62 61
 			{
63 62
 				\ErrorHandler::redisNotRunning();
64
-			}
65
-			else if ($exception instanceof \GuzzleHttp\Exception\ClientException) 
63
+			} else if ($exception instanceof \GuzzleHttp\Exception\ClientException) 
66 64
 			{
67 65
 				\ErrorHandler::connectionError();
68
-			}
69
-			else if ($exception instanceof \Symfony\Component\HttpKernel\Exception\HttpException) 
66
+			} else if ($exception instanceof \Symfony\Component\HttpKernel\Exception\HttpException) 
70 67
 			{
71 68
 				return \Response::json($exception->getMessage(), $exception->getStatusCode());   
72
-			}
73
-			else if ($exception instanceof \Illuminate\Validation\ValidationException) 
69
+			} else if ($exception instanceof \Illuminate\Validation\ValidationException) 
74 70
 			{
75 71
 				return \Response::json($exception->errors(), 422);   
76
-			}
77
-			else if ( ! $exception instanceof \Symfony\Component\Debug\Exception\FatalErrorException)
72
+			} else if ( ! $exception instanceof \Symfony\Component\Debug\Exception\FatalErrorException)
78 73
 			{
79 74
 				return parent::render($request, $exception);
80 75
 			}
81
-		}
82
-		else
76
+		} else
83 77
 		{
84 78
 			return parent::render($request, $exception);
85 79
 		}
Please login to merge, or discard this patch.
files/AuthServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 	{
27 27
 		$this->registerPolicies();
28 28
 
29
-		Passport::routes(function ($router) {
29
+		Passport::routes(function($router) {
30 30
 			$router->forAuthorization();
31 31
 			$router->forAccessTokens();
32 32
 			$router->forPersonalAccessTokens();
Please login to merge, or discard this patch.
src/Modules/Reporting/Providers/RouteServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		Route::group([
55 55
 			'middleware' => 'web',
56 56
 			'namespace'  => $this->namespace,
57
-		], function ($router) {
57
+		], function($router) {
58 58
 			require module_path('reporting', 'Routes/web.php');
59 59
 		});
60 60
 	}
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			'middleware' => 'api',
73 73
 			'namespace'  => $this->namespace,
74 74
 			'prefix'     => 'api',
75
-		], function ($router) {
75
+		], function($router) {
76 76
 			require module_path('reporting', 'Routes/api.php');
77 77
 		});
78 78
 	}
Please login to merge, or discard this patch.
src/Modules/Reporting/Report.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use Illuminate\Database\Eloquent\Model;
4 4
 use Illuminate\Database\Eloquent\SoftDeletes;
5 5
 
6
-class Report extends Model{
6
+class Report extends Model {
7 7
 
8 8
 	use SoftDeletes;
9 9
 	protected $table    = 'reports';
Please login to merge, or discard this patch.
src/Modules/Reporting/Repositories/ReportRepository.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 		{
41 41
 			\ErrorHandler::notFound('report');
42 42
 		}
43
-		else if (! $skipPermission && ! \Core::users()->can($report->view_name, 'reports'))
43
+		else if ( ! $skipPermission && ! \Core::users()->can($report->view_name, 'reports'))
44 44
 		{
45 45
 			\ErrorHandler::noPermissions();
46 46
 		}
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@  discard block
 block discarded – undo
39 39
 		if ( ! $report) 
40 40
 		{
41 41
 			\ErrorHandler::notFound('report');
42
-		}
43
-		else if (! $skipPermission && ! \Core::users()->can($report->view_name, 'reports'))
42
+		} else if (! $skipPermission && ! \Core::users()->can($report->view_name, 'reports'))
44 43
 		{
45 44
 			\ErrorHandler::noPermissions();
46 45
 		}
@@ -61,8 +60,7 @@  discard block
 block discarded – undo
61 60
 		if ($perPage) 
62 61
 		{
63 62
 			return $report->paginate($perPage);
64
-		}
65
-		else
63
+		} else
66 64
 		{
67 65
 			return $report->get();  
68 66
 		}
Please login to merge, or discard this patch.
src/Modules/Reporting/Http/Controllers/ReportsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 	 * to preform actions like (add, edit ... etc).
13 13
 	 * @var string
14 14
 	 */
15
-	protected $model               = 'reports';
15
+	protected $model = 'reports';
16 16
 
17 17
 	/**
18 18
 	 * List of all route actions that the base api controller
Please login to merge, or discard this patch.
src/Modules/Reporting/Database/Factories/ReportFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$factory->define(App\Modules\Reporting\Report::class, function (Faker\Generator $faker) {
3
+$factory->define(App\Modules\Reporting\Report::class, function(Faker\Generator $faker) {
4 4
 	return [
5 5
 		'report_name' => $faker->randomElement(['Users Count', 'Low Stock Products', 'Active Users']),
6 6
 		'view_name'   => $faker->word(),
Please login to merge, or discard this patch.
src/Modules/Reporting/Database/Seeds/AssignRelationsSeeder.php 1 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', ['reports'])->each(function ($permission) use ($adminGroupId) {
21
+		\DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['reports'])->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/Reporting/Database/Seeds/ClearDataSeeder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 	 */
14 14
 	public function run()
15 15
 	{
16
-		$permissions  = \DB::table('permissions')->whereIn('model', ['reports']);
16
+		$permissions = \DB::table('permissions')->whereIn('model', ['reports']);
17 17
 		\DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete();
18 18
 		$permissions->delete();
19 19
 	}
Please login to merge, or discard this patch.