@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | |
265 | 265 | protected function createClient($server, $auth, $options) |
266 | 266 | { |
267 | - $location = 'https://' . $this->cleanServerUrl($server) . '/EWS/Exchange.asmx'; |
|
267 | + $location = 'https://'.$this->cleanServerUrl($server).'/EWS/Exchange.asmx'; |
|
268 | 268 | |
269 | 269 | $options = array_replace_recursive([ |
270 | 270 | 'version' => self::VERSION_2007, |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | $this->soap = new NTLMSoapClient( |
285 | 285 | $location, |
286 | 286 | $auth, |
287 | - dirname(__FILE__) . '/../../Resources/wsdl/services.wsdl', |
|
287 | + dirname(__FILE__).'/../../Resources/wsdl/services.wsdl', |
|
288 | 288 | $options |
289 | 289 | ); |
290 | 290 | |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | |
346 | 346 | $server = $url['host']; |
347 | 347 | if (isset($url['port'])) { |
348 | - $server .= ':' . $url['port']; |
|
348 | + $server .= ':'.$url['port']; |
|
349 | 349 | } |
350 | 350 | |
351 | 351 | if (isset($url['path'])) { |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | } |
405 | 405 | |
406 | 406 | if (is_array($items) && isset($items[1]) && $items[1] instanceof Message\ResponseMessageType) { |
407 | - return array_map(function ($responseItem) { |
|
407 | + return array_map(function($responseItem) { |
|
408 | 408 | return self::drillDownResponseLevels($responseItem); |
409 | 409 | }, $items); |
410 | 410 | } |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | |
461 | 461 | if ($code >= 300) { |
462 | 462 | $response = new ResponseMessageType(); |
463 | - $response->setMessageText('SOAP client returned status of ' . $code); |
|
463 | + $response->setMessageText('SOAP client returned status of '.$code); |
|
464 | 464 | |
465 | 465 | throw new ExchangeException($response, $code); |
466 | 466 | } |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | $newStack = []; |
505 | 505 | foreach ($middlewareStack as $key => $current) { |
506 | 506 | /** @var $current callable */ |
507 | - $last = function () { |
|
507 | + $last = function() { |
|
508 | 508 | }; |
509 | 509 | |
510 | 510 | if ($key != 0) { |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | } |
513 | 513 | |
514 | 514 | $current = Closure::bind($current, $this, $this); |
515 | - $newStack[] = function (MiddlewareRequest $request) use ($current, $last) { |
|
515 | + $newStack[] = function(MiddlewareRequest $request) use ($current, $last) { |
|
516 | 516 | return $current($request, $last); |
517 | 517 | }; |
518 | 518 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once(__DIR__ . "/../vendor/autoload.php"); |
|
3 | +require_once(__DIR__."/../vendor/autoload.php"); |
|
4 | 4 | |
5 | 5 | use Symfony\Component\Console\Application; |
6 | 6 | use garethp\ews\Generator\ConvertToPHP; |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | $value = $value->Entry; |
42 | 42 | } |
43 | 43 | |
44 | - if ($this->methodExists("set" . ucfirst($name))) { |
|
45 | - $this->{"set" . ucfirst($name)}($this->castValueIfNeeded(lcfirst($name), $value)); |
|
44 | + if ($this->methodExists("set".ucfirst($name))) { |
|
45 | + $this->{"set".ucfirst($name)}($this->castValueIfNeeded(lcfirst($name), $value)); |
|
46 | 46 | return; |
47 | 47 | } |
48 | 48 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | } |
130 | 130 | } |
131 | 131 | |
132 | - throw new \Exception('Property ' . $names[0] . ' does not exist'); |
|
132 | + throw new \Exception('Property '.$names[0].' does not exist'); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | if (!$this->exists($name)) { |
147 | - throw new \Exception('Property ' . $name . ' does not exist'); |
|
147 | + throw new \Exception('Property '.$name.' does not exist'); |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | return $name; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | if ($array instanceof XmlObject && $strict) { |
47 | - $array = (array)$array; |
|
47 | + $array = (array) $array; |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | if (!is_array($array)) { |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | foreach ($array as $key => $value) { |
67 | 67 | // If we're in strict mode, let's take the reflection class, check for a setter and try to use that to build |
68 | 68 | // the array, resulting in type-correct responses the whole way down. |
69 | - if ($strict === true && $reflect->hasMethod("set" . ucfirst($key))) { |
|
70 | - $parameters = $reflect->getMethod("set" . ucfirst($key))->getParameters(); |
|
69 | + if ($strict === true && $reflect->hasMethod("set".ucfirst($key))) { |
|
70 | + $parameters = $reflect->getMethod("set".ucfirst($key))->getParameters(); |
|
71 | 71 | |
72 | 72 | if (count($parameters) === 1 |
73 | 73 | && $parameters[0]->hasType() |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | public function toXmlObject() |
108 | 108 | { |
109 | 109 | $objectToReturn = new XmlObject(); |
110 | - $objectToReturn->_ = (string)$this; |
|
110 | + $objectToReturn->_ = (string) $this; |
|
111 | 111 | |
112 | 112 | $properties = $this->getNonNullItems(true); |
113 | 113 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | if (is_array($property)) { |
147 | - return array_map(function ($property) { |
|
147 | + return array_map(function($property) { |
|
148 | 148 | if ($property instanceof Type) { |
149 | 149 | return $property->toXmlObject(); |
150 | 150 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | |
159 | 159 | public static function arrayIsAssoc($array) |
160 | 160 | { |
161 | - return (bool)count(array_filter(array_keys($array), 'is_string')); |
|
161 | + return (bool) count(array_filter(array_keys($array), 'is_string')); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |