@@ -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 | * |
@@ -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(); |
@@ -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(); |
@@ -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(); |
@@ -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(); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | class KernelBpm |
| 38 | 38 | { |
| 39 | - const PATH_LOG = __DIR__ . '/resource/logs/bpm.log'; |
|
| 39 | + const PATH_LOG = __DIR__.'/resource/logs/bpm.log'; |
|
| 40 | 40 | |
| 41 | 41 | protected $action = [ |
| 42 | 42 | 'create' => Create::class, |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | */ |
| 110 | 110 | public function loadConfiguration(SourceConfiguration $configuration) |
| 111 | 111 | { |
| 112 | - config()->set( $this->prefixConfiguration = $configuration->getName(), $configuration->get()); |
|
| 112 | + config()->set($this->prefixConfiguration = $configuration->getName(), $configuration->get()); |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | /** |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | { |
| 160 | 160 | Assertion::keyIsset($this->action, $typeAction); |
| 161 | 161 | |
| 162 | - $this->currentAction = app()->make( $this->action[$typeAction] ); |
|
| 162 | + $this->currentAction = app()->make($this->action[$typeAction]); |
|
| 163 | 163 | |
| 164 | 164 | return $this->currentAction; |
| 165 | 165 | } |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | |
| 176 | 176 | extract($this->splitAction($action)); |
| 177 | 177 | |
| 178 | - $action = $this->setAction($action); |
|
| 178 | + $action = $this->setAction($action); |
|
| 179 | 179 | $this->setHandler($handler); |
| 180 | 180 | |
| 181 | 181 | $action->injectionKernel($this); |
@@ -205,8 +205,8 @@ discard block |
||
| 205 | 205 | { |
| 206 | 206 | try { |
| 207 | 207 | Assertion::regex($collection, '/[A-z]+Collection$/'); |
| 208 | - } catch(AssertionFailedException $e) { |
|
| 209 | - throw new \Exception("Expected word 'Collection' in parameter method setCollection received : " . $e->getValue()); |
|
| 208 | + } catch (AssertionFailedException $e) { |
|
| 209 | + throw new \Exception("Expected word 'Collection' in parameter method setCollection received : ".$e->getValue()); |
|
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | return $this->collection = $collection; |
@@ -237,8 +237,8 @@ discard block |
||
| 237 | 237 | |
| 238 | 238 | // verification values |
| 239 | 239 | Assertion::between(count($split), 2, 2); |
| 240 | - Assertion::keyExists( $this->action, $split[0]); |
|
| 241 | - Assertion::keyExists( $this->handlers, $split[1]); |
|
| 240 | + Assertion::keyExists($this->action, $split[0]); |
|
| 241 | + Assertion::keyExists($this->handlers, $split[1]); |
|
| 242 | 242 | |
| 243 | 243 | return ['action' => $split[0], 'handler' => $split[1]]; |
| 244 | 244 | } |
@@ -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 | }); |
@@ -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(), |