Completed
Pull Request — master (#28)
by Raí
18:45 queued 13:44
created
Bludata/Helpers/functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     /**
10 10
      * @param string $key
11 11
      */
12
-    function env($key, $defaultValue = '')
12
+    function env ($key, $defaultValue = '')
13 13
     {
14 14
         $env = getenv($key);
15 15
         if (!$env) {
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     /**
25 25
      * @param string $input
26 26
      */
27
-    function onlyNumbers(string $input)
27
+    function onlyNumbers (string $input)
28 28
     {
29 29
         return preg_replace('/\D/i', '', $input);
30 30
     }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @param string $from = 'Y-m-d'
37 37
      * @param string $to   = 'obj'
38 38
      */
39
-    function parseDate($date, string $from = 'Y-m-d', string $to = 'obj')
39
+    function parseDate ($date, string $from = 'Y-m-d', string $to = 'obj')
40 40
     {
41 41
         if ($date instanceof DateTime && $to === 'obj') {
42 42
             return $date;
Please login to merge, or discard this patch.
Bludata/Helpers/CurlHelper.php 3 patches
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@  discard block
 block discarded – undo
5 5
 class CurlHelper
6 6
 {
7 7
     protected $init;
8
-    protected $headers = [];
8
+    protected $headers = [ ];
9 9
     protected $response;
10 10
     protected $info;
11 11
     protected $baseUrl;
12 12
     protected $posFixUrl;
13
-    protected $options = [];
13
+    protected $options = [ ];
14 14
 
15
-    public function __construct($baseUrl, array $headers = [])
15
+    public function __construct ($baseUrl, array $headers = [ ])
16 16
     {
17 17
         $this->init = curl_init();
18 18
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         $this->headers = $headers;
22 22
     }
23 23
 
24
-    protected function exec()
24
+    protected function exec ()
25 25
     {
26 26
         curl_setopt($this->init, CURLOPT_URL, trim($this->baseUrl.$this->posFixUrl));
27 27
         curl_setopt($this->init, CURLOPT_RETURNTRANSFER, true);
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $this->info = curl_getinfo($this->init);
38 38
     }
39 39
 
40
-    public function send($close = true)
40
+    public function send ($close = true)
41 41
     {
42 42
         $this->exec();
43 43
 
@@ -48,59 +48,59 @@  discard block
 block discarded – undo
48 48
         return $this;
49 49
     }
50 50
 
51
-    public function addHeader($header)
51
+    public function addHeader ($header)
52 52
     {
53
-        $this->headers[] = $header;
53
+        $this->headers[ ] = $header;
54 54
 
55 55
         return $this;
56 56
     }
57 57
 
58
-    public function getResponse()
58
+    public function getResponse ()
59 59
     {
60 60
         return [
61
-            'code' => $this->info['http_code'],
61
+            'code' => $this->info[ 'http_code' ],
62 62
             'data' => $this->response,
63 63
         ];
64 64
     }
65 65
 
66
-    public function getInfo()
66
+    public function getInfo ()
67 67
     {
68 68
         return $this->info;
69 69
     }
70 70
 
71
-    public function setBaseUrl($baseUrl)
71
+    public function setBaseUrl ($baseUrl)
72 72
     {
73 73
         $this->baseUrl = $baseUrl;
74 74
 
75 75
         return $this;
76 76
     }
77 77
 
78
-    public function setPosFixUrl($posFixUrl)
78
+    public function setPosFixUrl ($posFixUrl)
79 79
     {
80 80
         $this->posFixUrl = $posFixUrl;
81 81
 
82 82
         return $this;
83 83
     }
84 84
 
85
-    public function post(array $data)
85
+    public function post (array $data)
86 86
     {
87
-        $this->options[CURLOPT_POST] = true;
88
-        $this->options[CURLOPT_POSTFIELDS] = json_encode($data);
87
+        $this->options[ CURLOPT_POST ] = true;
88
+        $this->options[ CURLOPT_POSTFIELDS ] = json_encode($data);
89 89
 
90 90
         return $this;
91 91
     }
92 92
 
93
-    public function put(array $data)
93
+    public function put (array $data)
94 94
     {
95
-        $this->options[CURLOPT_CUSTOMREQUEST] = 'PUT';
96
-        $this->options[CURLOPT_POSTFIELDS] = json_encode($data);
95
+        $this->options[ CURLOPT_CUSTOMREQUEST ] = 'PUT';
96
+        $this->options[ CURLOPT_POSTFIELDS ] = json_encode($data);
97 97
 
98 98
         return $this;
99 99
     }
100 100
 
101
-    public function delete()
101
+    public function delete ()
102 102
     {
103
-        $this->options[CURLOPT_CUSTOMREQUEST] = 'DELETE';
103
+        $this->options[ CURLOPT_CUSTOMREQUEST ] = 'DELETE';
104 104
 
105 105
         return $this;
106 106
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Bludata\Helpers;
4 4
 
5
-class CurlHelper
6
-{
5
+class CurlHelper {
7 6
     protected $init;
8 7
     protected $headers = [];
9 8
     protected $response;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
     protected function exec()
25 25
     {
26 26
         curl_setopt($this->init, CURLOPT_URL, trim($this->baseUrl.$this->posFixUrl));
27
-        curl_setopt($this->init, CURLOPT_RETURNTRANSFER, true);
27
+        curl_setopt($this->init, CURLOPT_RETURNTRANSFER, TRUE);
28 28
         curl_setopt($this->init, CURLOPT_HTTPHEADER, $this->headers);
29
-        curl_setopt($this->init, CURLOPT_SSL_VERIFYPEER, false);
29
+        curl_setopt($this->init, CURLOPT_SSL_VERIFYPEER, FALSE);
30 30
 
31 31
         foreach ($this->options as $key => $value) {
32 32
             curl_setopt($this->init, $key, $value);
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
         $this->info = curl_getinfo($this->init);
38 38
     }
39 39
 
40
-    public function send($close = true)
40
+    public function send($close = TRUE)
41 41
     {
42 42
         $this->exec();
43 43
 
44
-        if ($close === true) {
44
+        if ($close === TRUE) {
45 45
             curl_close($this->init);
46 46
         }
47 47
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
     public function post(array $data)
86 86
     {
87
-        $this->options[CURLOPT_POST] = true;
87
+        $this->options[CURLOPT_POST] = TRUE;
88 88
         $this->options[CURLOPT_POSTFIELDS] = json_encode($data);
89 89
 
90 90
         return $this;
Please login to merge, or discard this patch.
Bludata/Doctrine/Common/Helpers/functions.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
     /**
8 8
      * @param string $file
9 9
      */
10
-    function register_annotation_file(string $file)
10
+    function register_annotation_file (string $file)
11 11
     {
12 12
         if (!is_file($file)) {
13 13
             return false;
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  * Retrieve all annotations of a giving object
22 22
  */
23 23
 if (!function_exists('get_class_annotations')) {
24
-    function get_class_annotations($element, $annotation = null)
24
+    function get_class_annotations ($element, $annotation = null)
25 25
     {
26 26
         $class = $element;
27 27
         if (is_object($element)) {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
  * Retrieve annotations of a especific property of a giving object
40 40
  */
41 41
 if (!function_exists('get_property_annotations')) {
42
-    function get_property_annotations($element, $property = null, $annotation = null)
42
+    function get_property_annotations ($element, $property = null, $annotation = null)
43 43
     {
44 44
         $class = $element;
45 45
         if (is_object($element) && !($element instanceof \ReflectionClass)) {
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
 
58 58
         $reflectClass = new \ReflectionClass($class);
59 59
         $reflectProperties = $reflectClass->getProperties();
60
-        $annotations = [];
60
+        $annotations = [ ];
61 61
         foreach ($reflectProperties as $property) {
62
-            $annotations[$property->getName()] = get_property_annotations($reflectClass, $property, $annotation);
62
+            $annotations[ $property->getName() ] = get_property_annotations($reflectClass, $property, $annotation);
63 63
         }
64 64
 
65 65
         return $annotations;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     function register_annotation_file(string $file)
11 11
     {
12 12
         if (!is_file($file)) {
13
-            return false;
13
+            return FALSE;
14 14
         }
15 15
 
16 16
         return \Doctrine\Common\Annotations\AnnotationRegistry::registerFile($file);
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  * Retrieve all annotations of a giving object
22 22
  */
23 23
 if (!function_exists('get_class_annotations')) {
24
-    function get_class_annotations($element, $annotation = null)
24
+    function get_class_annotations($element, $annotation = NULL)
25 25
     {
26 26
         $class = $element;
27 27
         if (is_object($element)) {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
  * Retrieve annotations of a especific property of a giving object
40 40
  */
41 41
 if (!function_exists('get_property_annotations')) {
42
-    function get_property_annotations($element, $property = null, $annotation = null)
42
+    function get_property_annotations($element, $property = NULL, $annotation = NULL)
43 43
     {
44 44
         $class = $element;
45 45
         if (is_object($element) && !($element instanceof \ReflectionClass)) {
Please login to merge, or discard this patch.
Bludata/Framework/Laravel/Helpers/functions.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
     /**
9 9
      * @param string $file
10 10
      */
11
-    function register_annotation_file(string $file)
11
+    function register_annotation_file (string $file)
12 12
     {
13 13
         if (!is_file($file)) {
14 14
             return false;
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     /**
26 26
      * @param string $dir
27 27
      */
28
-    function register_annotation_dir(string $dir)
28
+    function register_annotation_dir (string $dir)
29 29
     {
30 30
         if (!is_dir($dir)) {
31 31
             return false;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
         $handle = opendir($dir);
35 35
         while ($path = readdir($handle)) {
36
-            $toRegisterPath = implode(DIRECTORY_SEPARATOR, [$dir, $path]);
36
+            $toRegisterPath = implode(DIRECTORY_SEPARATOR, [ $dir, $path ]);
37 37
             register_annotation_file($toRegisterPath);
38 38
         }
39 39
 
@@ -45,12 +45,12 @@  discard block
 block discarded – undo
45 45
  * Default binding a repository interface to a concret class
46 46
  */
47 47
 if (!function_exists('bind_repository_interface')) {
48
-    function bind_repository_interface(string $repositoryInterface, string $repository, string $entity)
48
+    function bind_repository_interface (string $repositoryInterface, string $repository, string $entity)
49 49
     {
50 50
         app()->bind($repositoryInterface, function ($app) use ($repository, $entity) {
51 51
             return new $repository(
52
-                $app['em'],
53
-                $app['em']->getClassMetaData($entity)
52
+                $app[ 'em' ],
53
+                $app[ 'em' ]->getClassMetaData($entity)
54 54
             );
55 55
         });
56 56
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
  * Dump and die.
61 61
  */
62 62
 if (!function_exists('dd')) {
63
-    function dd()
63
+    function dd ()
64 64
     {
65 65
         $args = func_get_args();
66 66
         foreach ($args as $arg) {
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
  * Print and die
75 75
  */
76 76
 if (!function_exists('pd')) {
77
-    function pd()
77
+    function pd ()
78 78
     {
79 79
         $args = func_get_args();
80 80
         foreach ($args as $arg) {
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
  * Dump and return
89 89
  */
90 90
 if (!function_exists('dr')) {
91
-    function dr()
91
+    function dr ()
92 92
     {
93 93
         $args = func_get_args();
94 94
         $result = '';
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      * @param string $version   = 'v1'
123 123
      * @param bool   $abort     = true
124 124
      */
125
-    function bdClassExists(string $folder, string $className, string $version = 'v1', bool $abort = true)
125
+    function bdClassExists (string $folder, string $className, string $version = 'v1', bool $abort = true)
126 126
     {
127 127
         $entityClass = config('bludata.generator.rootNamespace').'\\'.$folder.'\\'.$version.'\\'.$className;
128 128
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      * @param string $version   = 'v1'
150 150
      * @param bool   $abort     = true
151 151
      */
152
-    function bdInterfaceExists(string $folder, string $className, string $version = 'v1', bool $abort = true)
152
+    function bdInterfaceExists (string $folder, string $className, string $version = 'v1', bool $abort = true)
153 153
     {
154 154
         $entityClass = config('bludata.generator.rootNamespace').'\\'.$folder.'\\'.$version.'\\'.$className;
155 155
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      * @param string $version   = 'v1'
172 172
      * @param bool   $abort     = true
173 173
      */
174
-    function bdInterfaceClass(string $className, string $version = 'v1', bool $abort = true)
174
+    function bdInterfaceClass (string $className, string $version = 'v1', bool $abort = true)
175 175
     {
176 176
         return bdInterfaceExists(config('bludata.generator.paths.interfaces'), $className.'Interface', $version, $abort);
177 177
     }
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
      * @param string $version   = 'v1'
184 184
      * @param bool   $abort     = true
185 185
      */
186
-    function bdContractClass(string $className, string $version = 'v1', bool $abort = true)
186
+    function bdContractClass (string $className, string $version = 'v1', bool $abort = true)
187 187
     {
188 188
         return bdInterfaceExists(config('bludata.generator.paths.contracts'), $className.'Interface', $version, $abort);
189 189
     }
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      * @param string $version   = 'v1'
196 196
      * @param bool   $abort     = true
197 197
      */
198
-    function bdContract(string $className, string $version = 'v1', bool $abort = true)
198
+    function bdContract (string $className, string $version = 'v1', bool $abort = true)
199 199
     {
200 200
         return app(bdContractClass($className, $version, $abort));
201 201
     }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
      * @param string $version   = 'v1'
208 208
      * @param bool   $abort     = true
209 209
      */
210
-    function bdRepositoryInterfaceClass(string $className, string $version = 'v1', bool $abort = true)
210
+    function bdRepositoryInterfaceClass (string $className, string $version = 'v1', bool $abort = true)
211 211
     {
212 212
         return bdInterfaceClass($className.'Repository', $version, $abort);
213 213
     }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
      * @param string $version   = 'v1'
220 220
      * @param bool   $abort     = true
221 221
      */
222
-    function bdRepositoryClass(string $className, string $version = 'v1', bool $abort = true)
222
+    function bdRepositoryClass (string $className, string $version = 'v1', bool $abort = true)
223 223
     {
224 224
         return bdClassExists(config('bludata.generator.paths.repositories'), $className.'Repository', $version, $abort);
225 225
     }
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
      * @param string $version   = 'v1'
232 232
      * @param bool   $abort     = true
233 233
      */
234
-    function bdRepository(string $className, string $version = 'v1', bool $abort = true)
234
+    function bdRepository (string $className, string $version = 'v1', bool $abort = true)
235 235
     {
236 236
         return app(bdRepositoryInterfaceClass($className, $version, $abort));
237 237
     }
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      * @param string $version   = 'v1'
244 244
      * @param bool   $abort     = true
245 245
      */
246
-    function bdServiceInterfaceClass(string $className, string $version = 'v1', bool $abort = true)
246
+    function bdServiceInterfaceClass (string $className, string $version = 'v1', bool $abort = true)
247 247
     {
248 248
         return bdInterfaceClass($className.'Service', $version, $abort);
249 249
     }
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
      * @param string $version   = 'v1'
256 256
      * @param bool   $abort     = true
257 257
      */
258
-    function bdServiceClass(string $className, string $version = 'v1', bool $abort = true)
258
+    function bdServiceClass (string $className, string $version = 'v1', bool $abort = true)
259 259
     {
260 260
         return bdClassExists(config('bludata.generator.paths.services'), $className.'Service', $version, $abort);
261 261
     }
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
      * @param string $version   = 'v1'
268 268
      * @param bool   $abort     = true
269 269
      */
270
-    function bdService(string $className, string $version = 'v1', bool $abort = true)
270
+    function bdService (string $className, string $version = 'v1', bool $abort = true)
271 271
     {
272 272
         return app(bdServiceInterfaceClass($className, $version, $abort));
273 273
     }
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
      * @param string $version   = 'v1'
280 280
      * @param bool   $abort     = true
281 281
      */
282
-    function bdEntityClass(string $className, string $version = 'v1', bool $abort = true)
282
+    function bdEntityClass (string $className, string $version = 'v1', bool $abort = true)
283 283
     {
284 284
         return bdClassExists(config('bludata.generator.paths.entities'), $className, $version, $abort);
285 285
     }
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
      * @param string $version   = 'v1'
292 292
      * @param bool   $abort     = true
293 293
      */
294
-    function bdEntity(string $className, string $version = 'v1', bool $abort = true)
294
+    function bdEntity (string $className, string $version = 'v1', bool $abort = true)
295 295
     {
296 296
         return app(bdEntityClass($className, $version, $abort));
297 297
     }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     function register_annotation_file(string $file)
12 12
     {
13 13
         if (!is_file($file)) {
14
-            return false;
14
+            return FALSE;
15 15
         }
16 16
 
17 17
         return \Doctrine\Common\Annotations\AnnotationRegistry::registerFile($file);
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     function register_annotation_dir(string $dir)
29 29
     {
30 30
         if (!is_dir($dir)) {
31
-            return false;
31
+            return FALSE;
32 32
         }
33 33
 
34 34
         $handle = opendir($dir);
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             register_annotation_file($toRegisterPath);
38 38
         }
39 39
 
40
-        return true;
40
+        return TRUE;
41 41
     }
42 42
 }
43 43
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             if ($type == 'boolean') {
102 102
                 $result = $arg ? 'true' : 'false';
103 103
             } else {
104
-                $result = print_r($arg, true);
104
+                $result = print_r($arg, TRUE);
105 105
             }
106 106
             $result = sprintf('(%s) %s', $type, $result);
107 107
         }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      * @param string $version   = 'v1'
123 123
      * @param bool   $abort     = true
124 124
      */
125
-    function bdClassExists(string $folder, string $className, string $version = 'v1', bool $abort = true)
125
+    function bdClassExists(string $folder, string $className, string $version = 'v1', bool $abort = TRUE)
126 126
     {
127 127
         $entityClass = config('bludata.generator.rootNamespace').'\\'.$folder.'\\'.$version.'\\'.$className;
128 128
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             abort(500, 'Undefined \''.$className.'\'');
135 135
         }
136 136
 
137
-        return null;
137
+        return NULL;
138 138
     }
139 139
 }
140 140
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      * @param string $version   = 'v1'
150 150
      * @param bool   $abort     = true
151 151
      */
152
-    function bdInterfaceExists(string $folder, string $className, string $version = 'v1', bool $abort = true)
152
+    function bdInterfaceExists(string $folder, string $className, string $version = 'v1', bool $abort = TRUE)
153 153
     {
154 154
         $entityClass = config('bludata.generator.rootNamespace').'\\'.$folder.'\\'.$version.'\\'.$className;
155 155
 
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             abort(500, 'Undefined \''.$className.'\'');
162 162
         }
163 163
 
164
-        return null;
164
+        return NULL;
165 165
     }
166 166
 }
167 167
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      * @param string $version   = 'v1'
172 172
      * @param bool   $abort     = true
173 173
      */
174
-    function bdInterfaceClass(string $className, string $version = 'v1', bool $abort = true)
174
+    function bdInterfaceClass(string $className, string $version = 'v1', bool $abort = TRUE)
175 175
     {
176 176
         return bdInterfaceExists(config('bludata.generator.paths.interfaces'), $className.'Interface', $version, $abort);
177 177
     }
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
      * @param string $version   = 'v1'
184 184
      * @param bool   $abort     = true
185 185
      */
186
-    function bdContractClass(string $className, string $version = 'v1', bool $abort = true)
186
+    function bdContractClass(string $className, string $version = 'v1', bool $abort = TRUE)
187 187
     {
188 188
         return bdInterfaceExists(config('bludata.generator.paths.contracts'), $className.'Interface', $version, $abort);
189 189
     }
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      * @param string $version   = 'v1'
196 196
      * @param bool   $abort     = true
197 197
      */
198
-    function bdContract(string $className, string $version = 'v1', bool $abort = true)
198
+    function bdContract(string $className, string $version = 'v1', bool $abort = TRUE)
199 199
     {
200 200
         return app(bdContractClass($className, $version, $abort));
201 201
     }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
      * @param string $version   = 'v1'
208 208
      * @param bool   $abort     = true
209 209
      */
210
-    function bdRepositoryInterfaceClass(string $className, string $version = 'v1', bool $abort = true)
210
+    function bdRepositoryInterfaceClass(string $className, string $version = 'v1', bool $abort = TRUE)
211 211
     {
212 212
         return bdInterfaceClass($className.'Repository', $version, $abort);
213 213
     }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
      * @param string $version   = 'v1'
220 220
      * @param bool   $abort     = true
221 221
      */
222
-    function bdRepositoryClass(string $className, string $version = 'v1', bool $abort = true)
222
+    function bdRepositoryClass(string $className, string $version = 'v1', bool $abort = TRUE)
223 223
     {
224 224
         return bdClassExists(config('bludata.generator.paths.repositories'), $className.'Repository', $version, $abort);
225 225
     }
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
      * @param string $version   = 'v1'
232 232
      * @param bool   $abort     = true
233 233
      */
234
-    function bdRepository(string $className, string $version = 'v1', bool $abort = true)
234
+    function bdRepository(string $className, string $version = 'v1', bool $abort = TRUE)
235 235
     {
236 236
         return app(bdRepositoryInterfaceClass($className, $version, $abort));
237 237
     }
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      * @param string $version   = 'v1'
244 244
      * @param bool   $abort     = true
245 245
      */
246
-    function bdServiceInterfaceClass(string $className, string $version = 'v1', bool $abort = true)
246
+    function bdServiceInterfaceClass(string $className, string $version = 'v1', bool $abort = TRUE)
247 247
     {
248 248
         return bdInterfaceClass($className.'Service', $version, $abort);
249 249
     }
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
      * @param string $version   = 'v1'
256 256
      * @param bool   $abort     = true
257 257
      */
258
-    function bdServiceClass(string $className, string $version = 'v1', bool $abort = true)
258
+    function bdServiceClass(string $className, string $version = 'v1', bool $abort = TRUE)
259 259
     {
260 260
         return bdClassExists(config('bludata.generator.paths.services'), $className.'Service', $version, $abort);
261 261
     }
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
      * @param string $version   = 'v1'
268 268
      * @param bool   $abort     = true
269 269
      */
270
-    function bdService(string $className, string $version = 'v1', bool $abort = true)
270
+    function bdService(string $className, string $version = 'v1', bool $abort = TRUE)
271 271
     {
272 272
         return app(bdServiceInterfaceClass($className, $version, $abort));
273 273
     }
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
      * @param string $version   = 'v1'
280 280
      * @param bool   $abort     = true
281 281
      */
282
-    function bdEntityClass(string $className, string $version = 'v1', bool $abort = true)
282
+    function bdEntityClass(string $className, string $version = 'v1', bool $abort = TRUE)
283 283
     {
284 284
         return bdClassExists(config('bludata.generator.paths.entities'), $className, $version, $abort);
285 285
     }
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
      * @param string $version   = 'v1'
292 292
      * @param bool   $abort     = true
293 293
      */
294
-    function bdEntity(string $className, string $version = 'v1', bool $abort = true)
294
+    function bdEntity(string $className, string $version = 'v1', bool $abort = TRUE)
295 295
     {
296 296
         return app(bdEntityClass($className, $version, $abort));
297 297
     }
Please login to merge, or discard this patch.
Bludata/Framework/Laravel/Application/BaseApplication.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,7 @@
 block discarded – undo
6 6
 use Illuminate\Foundation\Application;
7 7
 use Illuminate\Support\Facades\Route;
8 8
 
9
-class BaseApplication extends Application
10
-{
9
+class BaseApplication extends Application {
11 10
     public function publicRoutes(string $uri, string $controller, Closure $routes = null, array $options = [])
12 11
     {
13 12
         $options['only'] = $options['only'] ?? ['index', 'show', 'destroyed'];
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,21 +8,21 @@
 block discarded – undo
8 8
 
9 9
 class BaseApplication extends Application
10 10
 {
11
-    public function publicRoutes(string $uri, string $controller, Closure $routes = null, array $options = [])
11
+    public function publicRoutes(string $uri, string $controller, Closure $routes = NULL, array $options = [])
12 12
     {
13 13
         $options['only'] = $options['only'] ?? ['index', 'show', 'destroyed'];
14 14
 
15 15
         return $this->resourceRoutes($uri, $controller, $routes, $options);
16 16
     }
17 17
 
18
-    public function routesWithPermission(string $uri, string $controller, Closure $routes = null, array $options = [])
18
+    public function routesWithPermission(string $uri, string $controller, Closure $routes = NULL, array $options = [])
19 19
     {
20 20
         $options['only'] = $options['only'] ?? ['store', 'update', 'destroyed', 'restoreDestroyed'];
21 21
 
22 22
         return $this->resourceRoutes($uri, $controller, $routes, $options);
23 23
     }
24 24
 
25
-    public function resourceRoutes(string $uri, string $controller, Closure $routes = null, array $options = [])
25
+    public function resourceRoutes(string $uri, string $controller, Closure $routes = NULL, array $options = [])
26 26
     {
27 27
         $options['name'] = $options['name'] ?? $uri;
28 28
         $options['only'] = $options['only'] ?? [];
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -8,62 +8,62 @@
 block discarded – undo
8 8
 
9 9
 class BaseApplication extends Application
10 10
 {
11
-    public function publicRoutes(string $uri, string $controller, Closure $routes = null, array $options = [])
11
+    public function publicRoutes (string $uri, string $controller, Closure $routes = null, array $options = [ ])
12 12
     {
13
-        $options['only'] = $options['only'] ?? ['index', 'show', 'destroyed'];
13
+        $options[ 'only' ] = $options[ 'only' ] ?? [ 'index', 'show', 'destroyed' ];
14 14
 
15 15
         return $this->resourceRoutes($uri, $controller, $routes, $options);
16 16
     }
17 17
 
18
-    public function routesWithPermission(string $uri, string $controller, Closure $routes = null, array $options = [])
18
+    public function routesWithPermission (string $uri, string $controller, Closure $routes = null, array $options = [ ])
19 19
     {
20
-        $options['only'] = $options['only'] ?? ['store', 'update', 'destroyed', 'restoreDestroyed'];
20
+        $options[ 'only' ] = $options[ 'only' ] ?? [ 'store', 'update', 'destroyed', 'restoreDestroyed' ];
21 21
 
22 22
         return $this->resourceRoutes($uri, $controller, $routes, $options);
23 23
     }
24 24
 
25
-    public function resourceRoutes(string $uri, string $controller, Closure $routes = null, array $options = [])
25
+    public function resourceRoutes (string $uri, string $controller, Closure $routes = null, array $options = [ ])
26 26
     {
27
-        $options['name'] = $options['name'] ?? $uri;
28
-        $options['only'] = $options['only'] ?? [];
29
-        $options['except'] = $options['except'] ?? [];
27
+        $options[ 'name' ] = $options[ 'name' ] ?? $uri;
28
+        $options[ 'only' ] = $options[ 'only' ] ?? [ ];
29
+        $options[ 'except' ] = $options[ 'except' ] ?? [ ];
30 30
 
31
-        $exceptAll = isset($options['except'][0]) && $options['except'][0] == '*';
31
+        $exceptAll = isset($options[ 'except' ][ 0 ]) && $options[ 'except' ][ 0 ] == '*';
32 32
 
33 33
         if (!$exceptAll) {
34
-            if (in_array('index', $options['only']) && !in_array('index', $options['except'])) {
34
+            if (in_array('index', $options[ 'only' ]) && !in_array('index', $options[ 'except' ])) {
35 35
                 Route::get($uri, $controller.'@index')
36
-                        ->name($options['name'].'.index');
36
+                        ->name($options[ 'name' ].'.index');
37 37
             }
38 38
 
39
-            if (in_array('show', $options['only']) && !in_array('show', $options['except'])) {
39
+            if (in_array('show', $options[ 'only' ]) && !in_array('show', $options[ 'except' ])) {
40 40
                 Route::get($uri.'/{uuid}', $controller.'@show')
41
-                        ->name($options['name'].'.show');
41
+                        ->name($options[ 'name' ].'.show');
42 42
             }
43 43
 
44
-            if (in_array('store', $options['only']) && !in_array('store', $options['except'])) {
44
+            if (in_array('store', $options[ 'only' ]) && !in_array('store', $options[ 'except' ])) {
45 45
                 Route::post($uri, $controller.'@store')
46
-                        ->name($options['name'].'.store');
46
+                        ->name($options[ 'name' ].'.store');
47 47
             }
48 48
 
49
-            if (in_array('update', $options['only']) && !in_array('update', $options['except'])) {
49
+            if (in_array('update', $options[ 'only' ]) && !in_array('update', $options[ 'except' ])) {
50 50
                 Route::put($uri.'/{uuid}', $controller.'@update')
51
-                        ->name($options['name'].'.update');
51
+                        ->name($options[ 'name' ].'.update');
52 52
             }
53 53
 
54
-            if (in_array('destroy', $options['only']) && !in_array('destroy', $options['except'])) {
54
+            if (in_array('destroy', $options[ 'only' ]) && !in_array('destroy', $options[ 'except' ])) {
55 55
                 Route::delete($uri.'/{uuid}', $controller.'@destroy')
56
-                        ->name($options['name'].'.destroy');
56
+                        ->name($options[ 'name' ].'.destroy');
57 57
             }
58 58
 
59
-            if (in_array('destroyed', $options['only']) && !in_array('destroyed', $options['except'])) {
59
+            if (in_array('destroyed', $options[ 'only' ]) && !in_array('destroyed', $options[ 'except' ])) {
60 60
                 Route::get($uri.'/destroyed', $controller.'@destroyed')
61
-                        ->name($options['name'].'.destroyed');
61
+                        ->name($options[ 'name' ].'.destroyed');
62 62
             }
63 63
 
64
-            if (in_array('restoreDestroyed', $options['only']) && !in_array('restoreDestroyed', $options['except'])) {
64
+            if (in_array('restoreDestroyed', $options[ 'only' ]) && !in_array('restoreDestroyed', $options[ 'except' ])) {
65 65
                 Route::post($uri.'/{uuid}', $controller.'@restoreDestroyed')
66
-                        ->name($options['name'].'.restoreDestroyed');
66
+                        ->name($options[ 'name' ].'.restoreDestroyed');
67 67
             }
68 68
         }
69 69
 
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/RegisterController.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      *
35 35
      * @return void
36 36
      */
37
-    public function __construct()
37
+    public function __construct ()
38 38
     {
39 39
         $this->middleware('guest');
40 40
     }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      *
47 47
      * @return \Illuminate\Contracts\Validation\Validator
48 48
      */
49
-    protected function validator(array $data)
49
+    protected function validator (array $data)
50 50
     {
51 51
         return Validator::make($data, [
52 52
             'name'     => 'required|string|max:255',
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
      *
63 63
      * @return \LaravelSeed\User
64 64
      */
65
-    protected function create(array $data)
65
+    protected function create (array $data)
66 66
     {
67 67
         return User::create([
68
-            'name'     => $data['name'],
69
-            'email'    => $data['email'],
70
-            'password' => bcrypt($data['password']),
68
+            'name'     => $data[ 'name' ],
69
+            'email'    => $data[ 'email' ],
70
+            'password' => bcrypt($data[ 'password' ]),
71 71
         ]);
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@
 block discarded – undo
7 7
 use LaravelSeed\Http\Controllers\Controller;
8 8
 use LaravelSeed\User;
9 9
 
10
-class RegisterController extends Controller
11
-{
10
+class RegisterController extends Controller {
12 11
     /*
13 12
     |--------------------------------------------------------------------------
14 13
     | Register Controller
Please login to merge, or discard this patch.
Bludata/Doctrine/Common/Contracts/Repository.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -4,19 +4,19 @@
 block discarded – undo
4 4
 
5 5
 interface Repository
6 6
 {
7
-    public function findAll();
7
+    public function findAll ();
8 8
 
9
-    public function findBy(array $filters): array;
9
+    public function findBy (array $filters): array;
10 10
 
11
-    public function findOneBy(array $filters): Entity;
11
+    public function findOneBy (array $filters): Entity;
12 12
 
13
-    public function find($id): Entity;
13
+    public function find ($id): Entity;
14 14
 
15
-    public function findAllRemoved();
15
+    public function findAllRemoved ();
16 16
 
17
-    public function findRemoved(): Entity;
17
+    public function findRemoved (): Entity;
18 18
 
19
-    public function createEntity(): Entity;
19
+    public function createEntity (): Entity;
20 20
 
21
-    public function remove(): Entity;
21
+    public function remove (): Entity;
22 22
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Bludata\Doctrine\Common\Contracts;
4 4
 
5
-interface Repository
6
-{
5
+interface Repository {
7 6
     public function findAll();
8 7
 
9 8
     public function findBy(array $filters): array;
Please login to merge, or discard this patch.
Bludata/Doctrine/Common/Contracts/Entity.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -6,47 +6,47 @@
 block discarded – undo
6 6
 
7 7
 interface Entity
8 8
 {
9
-    public function getId();
9
+    public function getId ();
10 10
 
11
-    public function getCreatedAt(): DateTime;
11
+    public function getCreatedAt (): DateTime;
12 12
 
13
-    public function getUpdatedAt(): DateTime;
13
+    public function getUpdatedAt (): DateTime;
14 14
 
15
-    public function getDeletedAt(): DateTime;
15
+    public function getDeletedAt (): DateTime;
16 16
 
17
-    public function getRepository(): Repository;
17
+    public function getRepository (): Repository;
18 18
 
19
-    public function preRemove();
19
+    public function preRemove ();
20 20
 
21
-    public function postRemove();
21
+    public function postRemove ();
22 22
 
23
-    public function prePersist();
23
+    public function prePersist ();
24 24
 
25
-    public function postPersist();
25
+    public function postPersist ();
26 26
 
27
-    public function preUpdate();
27
+    public function preUpdate ();
28 28
 
29
-    public function postUpdate();
29
+    public function postUpdate ();
30 30
 
31
-    public function preFlush();
31
+    public function preFlush ();
32 32
 
33
-    public function postFlush();
33
+    public function postFlush ();
34 34
 
35
-    public function persist(): Entity;
35
+    public function persist (): Entity;
36 36
 
37
-    public function flush(): Entity;
37
+    public function flush (): Entity;
38 38
 
39
-    public function remove(): Entity;
39
+    public function remove (): Entity;
40 40
 
41
-    public function undelete(): Entity;
41
+    public function undelete (): Entity;
42 42
 
43
-    public function fillable(): array;
43
+    public function fillable (): array;
44 44
 
45
-    public function onlyStore(): array;
45
+    public function onlyStore (): array;
46 46
 
47
-    public function onlyUpdate(): array;
47
+    public function onlyUpdate (): array;
48 48
 
49
-    public function toArray(array $options = []): array;
49
+    public function toArray (array $options = [ ]): array;
50 50
 
51
-    public function toObject(array $options): Entity;
51
+    public function toObject (array $options): Entity;
52 52
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use DateTime;
6 6
 
7
-interface Entity
8
-{
7
+interface Entity {
9 8
     public function getId();
10 9
 
11 10
     public function getCreatedAt(): DateTime;
Please login to merge, or discard this patch.
Bludata/Doctrine/ORM/Repositories/BaseRepository.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Bludata\Doctrine\Common\Contracts\Repository;
6 6
 
7
-abstract class BaseRepository implements Repository
8
-{
7
+abstract class BaseRepository implements Repository {
9 8
 
10 9
 }
11 10
 
Please login to merge, or discard this patch.