Passed
Push — master ( ca1736...5282fc )
by Mohammad
11:16
created
src/Forms/FormGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     public function generateForm($entity, $method = 'post')
74 74
     {
75 75
         $html = '<form method="post" action="#">
76
-           <input type="hidden" name="__method" value="'.$method.'">';
76
+           <input type="hidden" name="__method" value="'.$method . '">';
77 77
         $html .= $this->getInputs($entity);
78 78
         $html .= '</form>';
79 79
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function getFillables($entity)
89 89
     {
90
-        if (! empty($entity->getFillable())) {
90
+        if (!empty($entity->getFillable())) {
91 91
             return $entity->getFillable();
92 92
         }
93 93
 
Please login to merge, or discard this patch.
src/Forms/Forms.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,6 +72,6 @@
 block discarded – undo
72 72
 
73 73
     public function getFormStub($type)
74 74
     {
75
-        return file_get_contents(Config::get('repository.stubs_path').'/fields-'.$type.'.stub');
75
+        return file_get_contents(Config::get('repository.stubs_path') . '/fields-' . $type . '.stub');
76 76
     }
77 77
 }
Please login to merge, or discard this patch.
src/config/repository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@
 block discarded – undo
6 6
  * Time: 09:58 am.
7 7
  */
8 8
 return [
9
-    'app_path' => realpath(__DIR__.'/../app/'),
9
+    'app_path' => realpath(__DIR__ . '/../app/'),
10 10
     'route_path' => realpath('routes/'),
11 11
     'resources_path' => realpath('resources'),
12
-    'stubs_path' => realpath('resources').'/stubs/',
13
-    'lang_path' => realpath('resources').'/lang/',
12
+    'stubs_path' => realpath('resources') . '/stubs/',
13
+    'lang_path' => realpath('resources') . '/lang/',
14 14
     'config_path' => realpath('config'),
15 15
 
16 16
     //relative to app path
Please login to merge, or discard this patch.
src/Utility/ContractInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
      *
93 93
      * @return LengthAwarePaginator
94 94
      */
95
-    public function get($criteria = [],$columns = []);
95
+    public function get($criteria = [], $columns = []);
96 96
 
97 97
     /**
98 98
      * @param string $name
Please login to merge, or discard this patch.
src/Utility/AbstractRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -115,11 +115,11 @@
 block discarded – undo
115 115
         if (isset($criteria['search'])) {
116 116
             foreach ($this->model->searchable as $method => $columns) {
117 117
                 if (method_exists($this->model, $method)) {
118
-                    $latest->orWhereHas($method, function ($query) use ($criteria, $columns) {
118
+                    $latest->orWhereHas($method, function($query) use ($criteria, $columns) {
119 119
                         /* @var $query Builder */
120
-                        $query->where(function ($query2) use ($criteria, $columns) {
120
+                        $query->where(function($query2) use ($criteria, $columns) {
121 121
                             /* @var $query2 Builder */
122
-                            foreach ((array)$columns as $column) {
122
+                            foreach ((array) $columns as $column) {
123 123
                                 $query2->orWhere($column, 'like', '%' . $criteria['search'] . '%');
124 124
                             }
125 125
                         });
Please login to merge, or discard this patch.
src/Utility/Controller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,10 +63,10 @@
 block discarded – undo
63 63
         }
64 64
         $limit = $request->get('limit', 10);
65 65
 
66
-        if ((bool)$request->get('with-trash', false)) {
66
+        if ((bool) $request->get('with-trash', false)) {
67 67
             $interface->withTrash();
68 68
         }
69
-        if ((bool)$request->get('only-trash', false)) {
69
+        if ((bool) $request->get('only-trash', false)) {
70 70
             $interface->trash();
71 71
         }
72 72
 
Please login to merge, or discard this patch.
src/GeneratorServiceProvider.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,25 +25,25 @@
 block discarded – undo
25 25
         }
26 26
 
27 27
         $this->publishes([
28
-            __DIR__.'/config' => realpath('config'),
28
+            __DIR__ . '/config' => realpath('config'),
29 29
         ], 'repository-generator');
30 30
 
31 31
         if (null === $this->app['config']->get('repository')) {
32
-            $this->app['config']->set('repository', require __DIR__.'/config/repository.php');
32
+            $this->app['config']->set('repository', require __DIR__ . '/config/repository.php');
33 33
         }
34
-        $this->mergeConfigFrom(__DIR__.'/config/repository.php', 'repository-config');
34
+        $this->mergeConfigFrom(__DIR__ . '/config/repository.php', 'repository-config');
35 35
         $resourcesPathStub = resource_path('/stubs');
36
-        $stubPath = realpath(__DIR__.'/../stubs');
37
-        $langPath = Config::get('repository.lang_path').'/en';
36
+        $stubPath = realpath(__DIR__ . '/../stubs');
37
+        $langPath = Config::get('repository.lang_path') . '/en';
38 38
 
39
-        if(!is_dir($resourcesPathStub))
39
+        if (!is_dir($resourcesPathStub))
40 40
         {
41
-            mkdir($resourcesPathStub,0777,true);
41
+            mkdir($resourcesPathStub, 0777, true);
42 42
         }
43 43
 
44 44
         $this->publishes([
45 45
             $stubPath => Config::get('repository.stubs_path', $resourcesPathStub),
46
-            __DIR__.'/lang' => $langPath,
46
+            __DIR__ . '/lang' => $langPath,
47 47
         ], 'repository-stub');
48 48
     }
49 49
 
Please login to merge, or discard this patch.
src/Commands/Remover.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
      */
52 52
     public function handle()
53 53
     {
54
-        $file = preg_split(' (/|\\\\) ', (string)$this->argument('name')) ?? [];
54
+        $file = preg_split(' (/|\\\\) ', (string) $this->argument('name')) ?? [];
55 55
 
56 56
         if (!$file) {
57 57
             return 'Something wrong with the inputs !';
Please login to merge, or discard this patch.
src/Commands/Generator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function handle()
62 62
     {
63
-        $file = preg_split(' ([/\\\]) ', (string)$this->argument('name')) ?? [];
63
+        $file = preg_split(' ([/\\\]) ', (string) $this->argument('name')) ?? [];
64 64
 
65 65
         if (!$file) {
66 66
             return 'Something wrong with the inputs !';
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
         $requestBase = Config::get('repository.base_request', "{$base}\Request");
98 98
         $resourceBase = Config::get('repository.base_resource', "{$base}\JsonResource");
99 99
 
100
-        $this->generate($path, $controller, 'Controller','', $controllerBase);
101
-        $this->generate($path, $resource, 'Resource', '',$resourceBase);
102
-        $this->generate($path, $model, 'Entity', '',$modelBase);
103
-        $this->generate($path, $request, 'Request', '',$requestBase);
104
-        $this->generate($path, $interface, 'Interface','', $interfaceBase);
105
-        $this->generate($path, $repository, 'Repository', '',$repositoryBase);
100
+        $this->generate($path, $controller, 'Controller', '', $controllerBase);
101
+        $this->generate($path, $resource, 'Resource', '', $resourceBase);
102
+        $this->generate($path, $model, 'Entity', '', $modelBase);
103
+        $this->generate($path, $request, 'Request', '', $requestBase);
104
+        $this->generate($path, $interface, 'Interface', '', $interfaceBase);
105
+        $this->generate($path, $repository, 'Repository', '', $repositoryBase);
106 106
 
107 107
      //append routes is not desired anymore
108 108
 //        $webFile = Config::get('repository.route_path') . '/web.php';
Please login to merge, or discard this patch.