@@ -4,7 +4,6 @@ |
||
4 | 4 | use agoalofalife\bpm\Assistants\QueryBuilder; |
5 | 5 | use agoalofalife\bpm\Contracts\Action; |
6 | 6 | use agoalofalife\bpm\Contracts\ActionSet; |
7 | -use agoalofalife\bpm\Contracts\Authentication; |
|
8 | 7 | use agoalofalife\bpm\KernelBpm; |
9 | 8 | |
10 | 9 |
@@ -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()); |
@@ -55,11 +55,11 @@ |
||
55 | 55 | { |
56 | 56 | $parameters = str_replace(' ', '%20', $this->url); |
57 | 57 | |
58 | - $url = $this->kernel->getCollection() . $parameters; |
|
59 | - $urlHome = config($this->kernel->getPrefixConfig() . '.UrlHome'); |
|
58 | + $url = $this->kernel->getCollection().$parameters; |
|
59 | + $urlHome = config($this->kernel->getPrefixConfig().'.UrlHome'); |
|
60 | 60 | |
61 | 61 | $this->headers()->getCookie()->body()->httpErrorsFalse()->get(); |
62 | - $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url, |
|
62 | + $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome.$url, |
|
63 | 63 | $this->headers()->getCookie()->body()->httpErrorsFalse()->get() |
64 | 64 | ); |
65 | 65 | $body = $response->getBody(); |
@@ -43,7 +43,7 @@ |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
46 | - * @return \agoalofalife\bpm\Contracts\Handler |
|
46 | + * @return \Illuminate\Container\Container |
|
47 | 47 | */ |
48 | 48 | public function processData() |
49 | 49 | { |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use agoalofalife\bpm\Assistants\QueryBuilder; |
6 | 6 | use agoalofalife\bpm\Contracts\Action; |
7 | 7 | use agoalofalife\bpm\Contracts\ActionGet; |
8 | -use agoalofalife\bpm\Contracts\Authentication; |
|
9 | 8 | use agoalofalife\bpm\KernelBpm; |
10 | 9 | |
11 | 10 | /** |
@@ -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(); |
@@ -63,18 +63,18 @@ |
||
63 | 63 | { |
64 | 64 | $parameters = str_replace(' ', '%20', $this->url); |
65 | 65 | |
66 | - $url = $this->kernel->getCollection() . $parameters; |
|
67 | - $urlHome = config($this->kernel->getPrefixConfig() . '.UrlHome'); |
|
66 | + $url = $this->kernel->getCollection().$parameters; |
|
67 | + $urlHome = config($this->kernel->getPrefixConfig().'.UrlHome'); |
|
68 | 68 | |
69 | 69 | |
70 | - $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url, |
|
70 | + $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome.$url, |
|
71 | 71 | $this->headers()->getCookie()->httpErrorsFalse()->get() |
72 | 72 | ); |
73 | 73 | |
74 | 74 | $body = $response->getBody(); |
75 | 75 | $this->kernel->getHandler()->parse($body->getContents()); |
76 | 76 | |
77 | - if ( $response->getStatusCode() == 401 && $response->getReasonPhrase() == 'Unauthorized' ) |
|
77 | + if ($response->getStatusCode() == 401 && $response->getReasonPhrase() == 'Unauthorized') |
|
78 | 78 | { |
79 | 79 | $this->kernel->authentication(); |
80 | 80 | $this->query(); |
@@ -49,7 +49,7 @@ |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
52 | - * @return array url -> string , http_type -> string |
|
52 | + * @return \Illuminate\Container\Container url -> string , http_type -> string |
|
53 | 53 | */ |
54 | 54 | public function processData() |
55 | 55 | { |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | } |
102 | 102 | $ParameterQuery.= " ".$param; |
103 | 103 | } |
104 | - $this->concatenationUrlCurl($ParameterQuery); |
|
104 | + $this->concatenationUrlCurl($ParameterQuery); |
|
105 | 105 | |
106 | 106 | return $this; |
107 | 107 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $urlHome = config($this->kernel->getPrefixConfig() . '.UrlHome'); |
148 | 148 | |
149 | 149 | $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url, |
150 | - $this->debug()->headers()->getCookie()->httpErrorsFalse()->get() |
|
150 | + $this->debug()->headers()->getCookie()->httpErrorsFalse()->get() |
|
151 | 151 | ); |
152 | 152 | $body = $response->getBody(); |
153 | 153 |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function filterConstructor($strRequest) |
77 | 77 | { |
78 | - $ParameterQuery = '$filter='; |
|
79 | - $ParameterQuery.= $strRequest; |
|
78 | + $ParameterQuery = '$filter='; |
|
79 | + $ParameterQuery .= $strRequest; |
|
80 | 80 | $this->concatenationUrlCurl($ParameterQuery); |
81 | 81 | return $this; |
82 | 82 | } |
@@ -93,13 +93,13 @@ discard block |
||
93 | 93 | public function orderBy($whatSort, $param = 'asc') |
94 | 94 | { |
95 | 95 | $ParameterQuery = '$orderby='; |
96 | - $ParameterQuery.= ucfirst($whatSort); |
|
96 | + $ParameterQuery .= ucfirst($whatSort); |
|
97 | 97 | |
98 | - if ( empty($param) === false ) { |
|
98 | + if (empty($param) === false) { |
|
99 | 99 | if ($param != 'desc' && $param != 'asc') { |
100 | 100 | throw new \Exception('no valid orderby parameters'); |
101 | 101 | } |
102 | - $ParameterQuery.= " ".$param; |
|
102 | + $ParameterQuery .= " ".$param; |
|
103 | 103 | } |
104 | 104 | $this->concatenationUrlCurl($ParameterQuery); |
105 | 105 | |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | public function amount($amountMax = null) |
132 | 132 | { |
133 | - Assert::that($amountMax,'You must specify a numeric parameter for the amount of the method')->integer(); |
|
133 | + Assert::that($amountMax, 'You must specify a numeric parameter for the amount of the method')->integer(); |
|
134 | 134 | $ParameterQuery = '$top='.$amountMax; |
135 | 135 | $this->concatenationUrlCurl($ParameterQuery); |
136 | 136 | return $this; |
@@ -143,17 +143,17 @@ discard block |
||
143 | 143 | private function query() |
144 | 144 | { |
145 | 145 | $parameters = str_replace(' ', '%20', $this->url); |
146 | - $url = $this->kernel->getCollection() . $parameters; |
|
147 | - $urlHome = config($this->kernel->getPrefixConfig() . '.UrlHome'); |
|
146 | + $url = $this->kernel->getCollection().$parameters; |
|
147 | + $urlHome = config($this->kernel->getPrefixConfig().'.UrlHome'); |
|
148 | 148 | |
149 | - $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url, |
|
149 | + $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome.$url, |
|
150 | 150 | $this->debug()->headers()->getCookie()->httpErrorsFalse()->get() |
151 | 151 | ); |
152 | 152 | $body = $response->getBody(); |
153 | 153 | |
154 | 154 | $this->kernel->getHandler()->parse($body->getContents()); |
155 | 155 | |
156 | - if ( $response->getStatusCode() == 401 && $response->getReasonPhrase() == 'Unauthorized' ) |
|
156 | + if ($response->getStatusCode() == 401 && $response->getReasonPhrase() == 'Unauthorized') |
|
157 | 157 | { |
158 | 158 | $this->kernel->authentication(); |
159 | 159 | $this->query(); |
@@ -58,7 +58,7 @@ |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
61 | - * @return \agoalofalife\bpm\Contracts\Handler |
|
61 | + * @return \Illuminate\Container\Container |
|
62 | 62 | */ |
63 | 63 | public function processData() |
64 | 64 | { |
@@ -6,7 +6,6 @@ |
||
6 | 6 | use agoalofalife\bpm\Contracts\Action; |
7 | 7 | use agoalofalife\bpm\Contracts\ActionGet; |
8 | 8 | use agoalofalife\bpm\Contracts\ActionSet; |
9 | -use agoalofalife\bpm\Contracts\Authentication; |
|
10 | 9 | use agoalofalife\bpm\KernelBpm; |
11 | 10 | |
12 | 11 | /** |
@@ -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 |
@@ -80,17 +80,17 @@ |
||
80 | 80 | private function query() |
81 | 81 | { |
82 | 82 | $parameters = str_replace(' ', '%20', $this->url); |
83 | - $url = $this->kernel->getCollection() . $parameters; |
|
84 | - $urlHome = config($this->kernel->getPrefixConfig() . '.UrlHome'); |
|
83 | + $url = $this->kernel->getCollection().$parameters; |
|
84 | + $urlHome = config($this->kernel->getPrefixConfig().'.UrlHome'); |
|
85 | 85 | |
86 | - $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url, |
|
86 | + $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome.$url, |
|
87 | 87 | $this->headers()->getCookie()->body()->httpErrorsFalse()->get() |
88 | 88 | ); |
89 | 89 | $body = $response->getBody(); |
90 | 90 | |
91 | 91 | $this->kernel->getHandler()->parse($body->getContents()); |
92 | 92 | |
93 | - if ( $response->getStatusCode() == 401 && $response->getReasonPhrase() == 'Unauthorized' ) |
|
93 | + if ($response->getStatusCode() == 401 && $response->getReasonPhrase() == 'Unauthorized') |
|
94 | 94 | { |
95 | 95 | $this->kernel->authentication(); |
96 | 96 | $this->query(); |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | use Illuminate\Container\Container; |
4 | 4 | |
5 | -if (! function_exists('config')) { |
|
5 | +if (!function_exists('config')) { |
|
6 | 6 | /** |
7 | 7 | * Get / set the specified configuration value. |
8 | 8 | * |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | } |
27 | 27 | } |
28 | 28 | |
29 | -if (! function_exists('app')) { |
|
29 | +if (!function_exists('app')) { |
|
30 | 30 | /** |
31 | 31 | * Get the available container instance. |
32 | 32 | * |
@@ -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, Logger::DEBUG)); |
|
17 | + return $log->pushHandler(new StreamHandler(KernelBpm::PATH_LOG, Logger::DEBUG)); |
|
18 | 18 | }); |
19 | 19 | } |
20 | 20 | } |
21 | 21 | \ No newline at end of file |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | public function register() |
14 | 14 | { |
15 | - app()->bind(Logger::class, function(){ |
|
15 | + app()->bind(Logger::class, function() { |
|
16 | 16 | $log = new Logger(KernelBpm::class); |
17 | 17 | return $log->pushHandler(new StreamHandler(KernelBpm::PATH_LOG, Logger::DEBUG)); |
18 | 18 | }); |
@@ -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) |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | public function getCookie() |
13 | 13 | { |
14 | - $curl = ['curl' => [ CURLOPT_COOKIEFILE => app(Authentication::class)->getPathCookieFile()]]; |
|
14 | + $curl = ['curl' => [CURLOPT_COOKIEFILE => app(Authentication::class)->getPathCookieFile()]]; |
|
15 | 15 | $this->merge($curl); |
16 | 16 | return $this; |
17 | 17 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | public function debug() |
41 | 41 | { |
42 | - $debug = ['on_stats' => function (TransferStats $stats) { |
|
42 | + $debug = ['on_stats' => function(TransferStats $stats) { |
|
43 | 43 | app(Logger::class)->debug('api', |
44 | 44 | [ |
45 | 45 | 'time' => $stats->getTransferTime(), |