@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | ]; |
30 | 30 | |
31 | 31 | protected $handlers = [ |
32 | - 'xml' => XmlHandler::class, |
|
33 | - 'json' => JsonHandler::class, |
|
32 | + 'xml' => XmlHandler::class, |
|
33 | + 'json' => JsonHandler::class, |
|
34 | 34 | ]; |
35 | 35 | |
36 | 36 | protected $collection; |
@@ -147,10 +147,10 @@ discard block |
||
147 | 147 | public function action($action, callable $callback) |
148 | 148 | { |
149 | 149 | |
150 | - extract($this->splitAction($action)); |
|
150 | + extract($this->splitAction($action)); |
|
151 | 151 | |
152 | - $action = $this->setAction($action); |
|
153 | - $this->setHandler($handler); |
|
152 | + $action = $this->setAction($action); |
|
153 | + $this->setHandler($handler); |
|
154 | 154 | |
155 | 155 | $action->injectionKernel($this); |
156 | 156 | call_user_func($callback, $action); |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | try { |
181 | 181 | Assertion::regex($collection, '/[A-z]+Collection$/'); |
182 | 182 | } catch(AssertionFailedException $e) { |
183 | - throw new \Exception("Expected word 'Collection' in parameter method setCollection received : " . $e->getValue()); |
|
183 | + throw new \Exception("Expected word 'Collection' in parameter method setCollection received : " . $e->getValue()); |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | return $this->collection = $collection; |
@@ -13,9 +13,9 @@ |
||
13 | 13 | |
14 | 14 | public function register() |
15 | 15 | { |
16 | - app()->bind(Read::class, Read::class); |
|
17 | - app()->bind(Create::class, Create::class); |
|
18 | - app()->bind(Update::class, Update::class); |
|
19 | - app()->bind(Delete::class, Delete::class); |
|
16 | + app()->bind(Read::class, Read::class); |
|
17 | + app()->bind(Create::class, Create::class); |
|
18 | + app()->bind(Update::class, Update::class); |
|
19 | + app()->bind(Delete::class, Delete::class); |
|
20 | 20 | } |
21 | 21 | } |
22 | 22 | \ No newline at end of file |
@@ -60,7 +60,7 @@ |
||
60 | 60 | |
61 | 61 | $this->headers()->getCookie()->body()->httpErrorsFalse()->get(); |
62 | 62 | $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url, |
63 | - $this->headers()->getCookie()->body()->httpErrorsFalse()->get() |
|
63 | + $this->headers()->getCookie()->body()->httpErrorsFalse()->get() |
|
64 | 64 | ); |
65 | 65 | $body = $response->getBody(); |
66 | 66 | $this->kernel->getHandler()->parse($body->getContents()); |
@@ -84,7 +84,7 @@ |
||
84 | 84 | $urlHome = config($this->kernel->getPrefixConfig() . '.UrlHome'); |
85 | 85 | |
86 | 86 | $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url, |
87 | - $this->headers()->getCookie()->body()->httpErrorsFalse()->get() |
|
87 | + $this->headers()->getCookie()->body()->httpErrorsFalse()->get() |
|
88 | 88 | ); |
89 | 89 | $body = $response->getBody(); |
90 | 90 |
@@ -68,7 +68,7 @@ |
||
68 | 68 | |
69 | 69 | |
70 | 70 | $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url, |
71 | - $this->headers()->getCookie()->httpErrorsFalse()->get() |
|
71 | + $this->headers()->getCookie()->httpErrorsFalse()->get() |
|
72 | 72 | ); |
73 | 73 | |
74 | 74 | $body = $response->getBody(); |
@@ -66,8 +66,8 @@ |
||
66 | 66 | $body = [ |
67 | 67 | 'body' => $this->kernel->getHandler()->create($this->data) |
68 | 68 | ]; |
69 | - $this->merge($body); |
|
70 | - return $this; |
|
69 | + $this->merge($body); |
|
70 | + return $this; |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | private function merge(array $newParameters) |
@@ -14,7 +14,7 @@ |
||
14 | 14 | { |
15 | 15 | app()->bind(Logger::class, function(){ |
16 | 16 | $log = new Logger(KernelBpm::class); |
17 | - return $log->pushHandler(new StreamHandler(KernelBpm::PATH_LOG . date('Y-m-d'). '.txt', Logger::DEBUG)); |
|
17 | + return $log->pushHandler(new StreamHandler(KernelBpm::PATH_LOG . date('Y-m-d'). '.txt', Logger::DEBUG)); |
|
18 | 18 | }); |
19 | 19 | } |
20 | 20 | } |
21 | 21 | \ No newline at end of file |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function checkIntegrity($response) |
49 | 49 | { |
50 | - return isset( json_decode($response)->{$this->jsonPrefix} ); |
|
50 | + return isset( json_decode($response)->{$this->jsonPrefix} ); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -88,12 +88,12 @@ discard block |
||
88 | 88 | { |
89 | 89 | $result[$key] = $this->objectToArray($value); |
90 | 90 | } else{ |
91 | - if (gettype($value) != 'object') |
|
92 | - { |
|
93 | - $result[$key] = $value; |
|
94 | - } |
|
95 | - // TODO not smog to find a similar case |
|
96 | - /* else{ |
|
91 | + if (gettype($value) != 'object') |
|
92 | + { |
|
93 | + $result[$key] = $value; |
|
94 | + } |
|
95 | + // TODO not smog to find a similar case |
|
96 | + /* else{ |
|
97 | 97 | $result[$key] = get_object_vars($value); |
98 | 98 | }*/ |
99 | 99 |
@@ -27,15 +27,15 @@ |
||
27 | 27 | */ |
28 | 28 | public function register() |
29 | 29 | { |
30 | - $this->app->bind('bpm', function(){ |
|
31 | - $bpm = new KernelBpm(); |
|
32 | - $bpm->setConfigManually('apiBpm', [ |
|
33 | - 'UrlLogin' => config('apiBpm.UrlLogin'), |
|
34 | - 'Login' => config('apiBpm.Login'), |
|
35 | - 'Password' => config('apiBpm.Password'), |
|
36 | - 'UrlHome' => config('apiBpm.UrlHome'), |
|
37 | - ]); |
|
38 | - return $bpm; |
|
39 | - }); |
|
30 | + $this->app->bind('bpm', function(){ |
|
31 | + $bpm = new KernelBpm(); |
|
32 | + $bpm->setConfigManually('apiBpm', [ |
|
33 | + 'UrlLogin' => config('apiBpm.UrlLogin'), |
|
34 | + 'Login' => config('apiBpm.Login'), |
|
35 | + 'Password' => config('apiBpm.Password'), |
|
36 | + 'UrlHome' => config('apiBpm.UrlHome'), |
|
37 | + ]); |
|
38 | + return $bpm; |
|
39 | + }); |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 | \ No newline at end of file |