Passed
Push — master ( 7f2606...53198b )
by Hamzah
03:59
created
src/Bases/Contract.php 1 patch
Doc Comments   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -26,30 +26,30 @@  discard block
 block discarded – undo
26 26
     /**
27 27
      * @param array $data
28 28
      *
29
-     * @return mixed
29
+     * @return boolean
30 30
      */
31 31
     public function insert($data = []);
32 32
 
33 33
     /**
34 34
      * @param array $data
35
-     * @param $entityId
35
+     * @param integer $entityId
36 36
      *
37 37
      * @return bool
38 38
      */
39 39
     public function update($entityId, $data = []);
40 40
 
41 41
     /**
42
-     * @param $entityId
42
+     * @param integer $entityId
43 43
      *
44
-     * @return mixed
44
+     * @return boolean
45 45
      */
46 46
     public function delete($entityId);
47 47
 
48 48
     /**
49
-     * @param $entityId
49
+     * @param integer $entityId
50 50
      * @param array $columns
51 51
      *
52
-     * @return mixed
52
+     * @return Entity
53 53
      */
54 54
     public function find($entityId, $columns = ['*']);
55 55
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * @param array $filters
58 58
      * @param array $columns
59 59
      *
60
-     * @return mixed
60
+     * @return Entity
61 61
      */
62 62
     public function findBy($filters = [], $columns = ['*']);
63 63
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      * @param int $limit
74 74
      * @param array $filters
75 75
      *
76
-     * @return Paginator
76
+     * @return \Illuminate\Contracts\Pagination\Paginator
77 77
      */
78 78
     public function simplePaginate($limit = 10, $filters = []);
79 79
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * @param array $filter
98 98
      * @param array $columns
99 99
      *
100
-     * @return mixed
100
+     * @return Entity
101 101
      */
102 102
     public function first($filter = [], $columns = ['*']);
103 103
 
@@ -140,13 +140,13 @@  discard block
 block discarded – undo
140 140
 
141 141
     /**
142 142
      * @param int $entityId
143
-     * @return mixed
143
+     * @return boolean|null
144 144
      */
145 145
     public function restore($entityId = 0);
146 146
 
147 147
     /**
148 148
      * @param int $categoryId
149
-     * @return mixed
149
+     * @return boolean|null
150 150
      */
151 151
     public function forceDelete($categoryId = 0);
152 152
 }
Please login to merge, or discard this patch.
src/Bases/Requests.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,14 +29,14 @@
 block discarded – undo
29 29
     protected function failedValidation(Validator $validator)
30 30
     {
31 31
 
32
-        if (strpos($this->path(),'api') !== false) {
32
+        if (strpos($this->path(), 'api') !== false) {
33 33
             $errors = (new ValidationException($validator))->errors();
34 34
             throw new HttpResponseException(response()->json(['success' => false, 'errors' => $errors,
35 35
             ], JsonResponse::HTTP_UNPROCESSABLE_ENTITY));
36 36
         }
37 37
     }
38 38
 
39
-    public function rules(){
40
-        \App::setLocale($this->header('Language','en'));
39
+    public function rules() {
40
+        \App::setLocale($this->header('Language', 'en'));
41 41
     }
42 42
 }
Please login to merge, or discard this patch.
src/Commands/Generator.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,6 @@
 block discarded – undo
51 51
     /**
52 52
      * Execute the console command.
53 53
      *
54
-
55 54
      */
56 55
     public function handle()
57 56
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     public function handle()
57 57
     {
58 58
 
59
-        $file = explode("/", (string)$this->argument('name'));
59
+        $file = explode("/", (string) $this->argument('name'));
60 60
 
61 61
         $this->repoName = $file[count($file) - 1];
62 62
         unset($file[count($file) - 1]);
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
             $this->repoNamespace = $file[count($file) - 1];
69 69
             $this->repoNamespace = implode("\\", $file);
70 70
         }
71
-        $model= str_plural(\Config::get('repository.model'));
72
-        $interface= str_plural(\Config::get('repository.interface'));
73
-        $repository= str_plural(\Config::get('repository.repository'));
71
+        $model = str_plural(\Config::get('repository.model'));
72
+        $interface = str_plural(\Config::get('repository.interface'));
73
+        $repository = str_plural(\Config::get('repository.repository'));
74 74
 
75 75
         $this->generate($path, \Config::get('repository.controllers_path'), 'Controller');
76 76
         $this->generate($path, $model, 'Entity');
Please login to merge, or discard this patch.
src/Bases/Controller.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     protected $breadcrumbs;
37 37
 
38 38
     protected $menu;
39
-    protected $search ;
39
+    protected $search;
40 40
     protected $selectedMenu = [];
41 41
     protected $isAPI = false;
42 42
     protected $trash = false;
@@ -63,10 +63,10 @@  discard block
 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/RepositoryServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@
 block discarded – undo
35 35
         parent::__construct($app);
36 36
 
37 37
 
38
-        $interfaces= str_plural(Config::get('repository.interface'));
39
-        $repositories= str_plural(Config::get('repository.repository'));
40
-        $interface= Config::get('repository.interface');
41
-        $repository= Config::get('repository.repository');
38
+        $interfaces = str_plural(Config::get('repository.interface'));
39
+        $repositories = str_plural(Config::get('repository.repository'));
40
+        $interface = Config::get('repository.interface');
41
+        $repository = Config::get('repository.repository');
42 42
 
43 43
         $contractsFolder = realpath(__DIR__ . '/../../../../app/' . $interfaces);
44 44
         if ($contractsFolder) {
Please login to merge, or discard this patch.
src/config/repository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 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
-    'resources_path' => realpath(__DIR__.'/../vendor/shamaseen/repository-generator/stubs'),
11
+    'resources_path' => realpath(__DIR__ . '/../vendor/shamaseen/repository-generator/stubs'),
12 12
 
13 13
     //relative to app path
14 14
     'interface' => 'Interface',
Please login to merge, or discard this patch.
src/GeneratorServiceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,17 +26,17 @@
 block discarded – undo
26 26
         }
27 27
 
28 28
         $this->publishes([
29
-            __DIR__.'/config' => realpath('config'),
30
-        ],'repository-config');
29
+            __DIR__ . '/config' => realpath('config'),
30
+        ], 'repository-config');
31 31
 
32 32
         if ($this->app['config']->get('repository') === null) {
33
-            $this->app['config']->set('repository', require __DIR__.'/config/repository.php');
33
+            $this->app['config']->set('repository', require __DIR__ . '/config/repository.php');
34 34
         }
35
-        $this->mergeConfigFrom(__DIR__.'/config/repository.php', 'repository-config');
35
+        $this->mergeConfigFrom(__DIR__ . '/config/repository.php', 'repository-config');
36 36
 
37 37
         $this->publishes([
38
-            __DIR__ . '/stubs' => \Config::get('repository.resources_path',realpath(__DIR__.'/../../../../resources/'))."/stubs/",
39
-        ],'repository-stub');
38
+            __DIR__ . '/stubs' => \Config::get('repository.resources_path', realpath(__DIR__ . '/../../../../resources/')) . "/stubs/",
39
+        ], 'repository-stub');
40 40
     }
41 41
 
42 42
     /**
Please login to merge, or discard this patch.