@@ -11,7 +11,7 @@ |
||
| 11 | 11 | use VerifyValues; |
| 12 | 12 | /** |
| 13 | 13 | * Concatenation Url In Curl |
| 14 | - * @param $newParameters string |
|
| 14 | + * @param string $newParameters string |
|
| 15 | 15 | * @return $this |
| 16 | 16 | */ |
| 17 | 17 | protected function concatenationUrlCurl($newParameters) |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | protected function concatenationUrlCurl($newParameters) |
| 18 | 18 | { |
| 19 | - if ($this->url == '?') { |
|
| 19 | + if ($this->url == '?') { |
|
| 20 | 20 | $this->url .= $newParameters; |
| 21 | 21 | } elseif ($this->url == '') { |
| 22 | 22 | $this->url .= $newParameters; |
@@ -36,10 +36,10 @@ discard block |
||
| 36 | 36 | $this->checkGuId($guid); |
| 37 | 37 | $this->url = ''; |
| 38 | 38 | $ParameterQuery = '(guid'; |
| 39 | - $ParameterQuery.= "'"; |
|
| 40 | - $ParameterQuery.= $guid; |
|
| 41 | - $ParameterQuery.= "'"; |
|
| 42 | - $ParameterQuery.=')'; |
|
| 39 | + $ParameterQuery .= "'"; |
|
| 40 | + $ParameterQuery .= $guid; |
|
| 41 | + $ParameterQuery .= "'"; |
|
| 42 | + $ParameterQuery .= ')'; |
|
| 43 | 43 | |
| 44 | 44 | return $this->concatenationUrlCurl($ParameterQuery); |
| 45 | 45 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
| 105 | - * @param $response |
|
| 105 | + * @param \SimpleXMLElement $response |
|
| 106 | 106 | * @return bool |
| 107 | 107 | */ |
| 108 | 108 | public function checkIntegrity($response) |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | } |
| 184 | 184 | /** |
| 185 | 185 | * Get one Element |
| 186 | - * @return mixed |
|
| 186 | + * @return XmlHandler |
|
| 187 | 187 | */ |
| 188 | 188 | private function arrayOne() |
| 189 | 189 | { |
@@ -127,7 +127,7 @@ |
||
| 127 | 127 | */ |
| 128 | 128 | public function toArray() |
| 129 | 129 | { |
| 130 | - return $this->xmlToArrayRecursive($this->validText); |
|
| 130 | + return $this->xmlToArrayRecursive($this->validText); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |
@@ -84,12 +84,12 @@ discard block |
||
| 84 | 84 | $this->response = simplexml_load_string($response); |
| 85 | 85 | $copyXml = $this->response; |
| 86 | 86 | |
| 87 | - if ( $this->response === false || $this->checkIntegrity($this->response) === false ) |
|
| 87 | + if ($this->response === false || $this->checkIntegrity($this->response) === false) |
|
| 88 | 88 | { |
| 89 | 89 | return []; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - $array_vars_list = get_object_vars($copyXml); |
|
| 92 | + $array_vars_list = get_object_vars($copyXml); |
|
| 93 | 93 | |
| 94 | 94 | if (key_exists('content', $array_vars_list)) { |
| 95 | 95 | return $this->arrayOne(); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | public function checkIntegrity($response) |
| 109 | 109 | { |
| 110 | - if ( empty($response->message) ) |
|
| 110 | + if (empty($response->message)) |
|
| 111 | 111 | { |
| 112 | 112 | return true; |
| 113 | 113 | } |
@@ -154,12 +154,12 @@ discard block |
||
| 154 | 154 | */ |
| 155 | 155 | private function workspace() |
| 156 | 156 | { |
| 157 | - if ( !empty($this->response->message->collection->title) ) { |
|
| 157 | + if (!empty($this->response->message->collection->title)) { |
|
| 158 | 158 | throw new \Exception("responce BPM API : ". |
| 159 | - $this->response->innererror->message.". ENG :". $this->response->message); |
|
| 159 | + $this->response->innererror->message.". ENG :".$this->response->message); |
|
| 160 | 160 | } |
| 161 | 161 | foreach ($this->response->workspace->collection as $item) { |
| 162 | - $this->validText[] = get_object_vars($item->children( $this->namespaces['NamespaceAtom'] ))['title']; |
|
| 162 | + $this->validText[] = get_object_vars($item->children($this->namespaces['NamespaceAtom']))['title']; |
|
| 163 | 163 | } |
| 164 | 164 | return $this; |
| 165 | 165 | } |
@@ -172,8 +172,8 @@ discard block |
||
| 172 | 172 | private function arrayMany() |
| 173 | 173 | { |
| 174 | 174 | try { |
| 175 | - foreach ($this->response->children( $this->namespaces['NamespaceAtom'] )->entry as $item ) { |
|
| 176 | - $this->validText[] = $item->content->children( $this->namespaces['NamespaceMetadata'] ) |
|
| 175 | + foreach ($this->response->children($this->namespaces['NamespaceAtom'])->entry as $item) { |
|
| 176 | + $this->validText[] = $item->content->children($this->namespaces['NamespaceMetadata']) |
|
| 177 | 177 | ->children($this->namespaces['NamespaceDataServices']); |
| 178 | 178 | } |
| 179 | 179 | return $this; |
@@ -187,9 +187,9 @@ discard block |
||
| 187 | 187 | */ |
| 188 | 188 | private function arrayOne() |
| 189 | 189 | { |
| 190 | - $this->validText = $this->response->children( $this->namespaces['NamespaceAtom'] )->content |
|
| 191 | - ->children( $this->namespaces['NamespaceMetadata'] ) |
|
| 192 | - ->children( $this->namespaces['NamespaceDataServices'] ); |
|
| 190 | + $this->validText = $this->response->children($this->namespaces['NamespaceAtom'])->content |
|
| 191 | + ->children($this->namespaces['NamespaceMetadata']) |
|
| 192 | + ->children($this->namespaces['NamespaceDataServices']); |
|
| 193 | 193 | return $this; |
| 194 | 194 | } |
| 195 | 195 | |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | $xmlns_dcd->appendChild($valued); |
| 227 | 227 | |
| 228 | 228 | //---------- properties ----------// |
| 229 | - $properties = $dom->createElement('m:properties'); |
|
| 229 | + $properties = $dom->createElement('m:properties'); |
|
| 230 | 230 | $content->appendChild($properties); |
| 231 | 231 | |
| 232 | 232 | foreach ($data as $nameField => $valueField) { |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | //dd($test); |
| 56 | 56 | |
| 57 | 57 | // 8. Example delete |
| 58 | -$test = $test->action('delete:xml', function ($creator){ |
|
| 58 | +$test = $test->action('delete:xml', function($creator) { |
|
| 59 | 59 | $creator->guid(''); |
| 60 | 60 | })->get(); |
| 61 | 61 | dd($test); |
| 62 | 62 | \ No newline at end of file |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | public function filterConstructor($strRequest) |
| 67 | 67 | { |
| 68 | - $ParameterQuery = '$filter='; |
|
| 69 | - $ParameterQuery.= $strRequest; |
|
| 68 | + $ParameterQuery = '$filter='; |
|
| 69 | + $ParameterQuery .= $strRequest; |
|
| 70 | 70 | $this->concatenationUrlCurl($ParameterQuery); |
| 71 | 71 | return $this; |
| 72 | 72 | } |
@@ -83,13 +83,13 @@ discard block |
||
| 83 | 83 | public function orderBy($whatSort, $param = 'asc') |
| 84 | 84 | { |
| 85 | 85 | $ParameterQuery = '$orderby='; |
| 86 | - $ParameterQuery.= ucfirst($whatSort); |
|
| 86 | + $ParameterQuery .= ucfirst($whatSort); |
|
| 87 | 87 | |
| 88 | - if ( empty($param) === false ) { |
|
| 88 | + if (empty($param) === false) { |
|
| 89 | 89 | if ($param != 'desc' && $param != 'asc') { |
| 90 | 90 | throw new \Exception('no valid orderby parameters'); |
| 91 | 91 | } |
| 92 | - $ParameterQuery.= " ".$param; |
|
| 92 | + $ParameterQuery .= " ".$param; |
|
| 93 | 93 | } |
| 94 | 94 | $this->concatenationUrlCurl($ParameterQuery); |
| 95 | 95 | |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | */ |
| 121 | 121 | public function amount($amountMax = null) |
| 122 | 122 | { |
| 123 | - Assert::that($amountMax,'You must specify a numeric parameter for the amount of the method')->integer(); |
|
| 123 | + Assert::that($amountMax, 'You must specify a numeric parameter for the amount of the method')->integer(); |
|
| 124 | 124 | $ParameterQuery = '$top='.$amountMax; |
| 125 | 125 | $this->concatenationUrlCurl($ParameterQuery); |
| 126 | 126 | return $this; |
@@ -132,12 +132,12 @@ discard block |
||
| 132 | 132 | private function query() |
| 133 | 133 | { |
| 134 | 134 | $parameters = str_replace(' ', '%20', $this->url); |
| 135 | - $url = $this->kernel->getCollection() . $parameters; |
|
| 135 | + $url = $this->kernel->getCollection().$parameters; |
|
| 136 | 136 | $client = app()->make(ClientInterface::class); |
| 137 | - $urlHome = config($this->kernel->getPrefixConfig() . '.UrlHome'); |
|
| 137 | + $urlHome = config($this->kernel->getPrefixConfig().'.UrlHome'); |
|
| 138 | 138 | |
| 139 | 139 | try { |
| 140 | - $response = $client->request($this->HTTP_TYPE, $urlHome . $url, |
|
| 140 | + $response = $client->request($this->HTTP_TYPE, $urlHome.$url, |
|
| 141 | 141 | [ |
| 142 | 142 | 'headers' => [ |
| 143 | 143 | 'HTTP/1.0', |
@@ -55,12 +55,12 @@ |
||
| 55 | 55 | { |
| 56 | 56 | $parameters = str_replace(' ', '%20', $this->url); |
| 57 | 57 | |
| 58 | - $url = $this->kernel->getCollection() . $parameters; |
|
| 58 | + $url = $this->kernel->getCollection().$parameters; |
|
| 59 | 59 | $client = app()->make(ClientInterface::class); |
| 60 | - $urlHome = config($this->kernel->getPrefixConfig() . '.UrlHome'); |
|
| 60 | + $urlHome = config($this->kernel->getPrefixConfig().'.UrlHome'); |
|
| 61 | 61 | |
| 62 | 62 | try { |
| 63 | - $response = $client->request($this->HTTP_TYPE, $urlHome . $url, |
|
| 63 | + $response = $client->request($this->HTTP_TYPE, $urlHome.$url, |
|
| 64 | 64 | [ |
| 65 | 65 | 'headers' => [ |
| 66 | 66 | 'HTTP/1.0', |
@@ -55,12 +55,12 @@ |
||
| 55 | 55 | { |
| 56 | 56 | $parameters = str_replace(' ', '%20', $this->url); |
| 57 | 57 | |
| 58 | - $url = $this->kernel->getCollection() . $parameters; |
|
| 58 | + $url = $this->kernel->getCollection().$parameters; |
|
| 59 | 59 | $client = app()->make(ClientInterface::class); |
| 60 | - $urlHome = config($this->kernel->getPrefixConfig() . '.UrlHome'); |
|
| 60 | + $urlHome = config($this->kernel->getPrefixConfig().'.UrlHome'); |
|
| 61 | 61 | |
| 62 | 62 | try { |
| 63 | - $response = $client->request($this->HTTP_TYPE, $urlHome . $url, |
|
| 63 | + $response = $client->request($this->HTTP_TYPE, $urlHome.$url, |
|
| 64 | 64 | [ |
| 65 | 65 | 'headers' => [ |
| 66 | 66 | 'HTTP/1.0', |