@@ -2319,7 +2319,7 @@ |
||
| 2319 | 2319 | * |
| 2320 | 2320 | * @var string |
| 2321 | 2321 | */ |
| 2322 | - const INVALID_RETENTION_TAG_TYPE_MISMATCH = 'ErrorInvalidRetentionTagTypeMismatch'; |
|
| 2322 | + const INVALID_RETENTION_TAG_TYPE_MISMATCH = 'ErrorInvalidRetentionTagTypeMismatch'; |
|
| 2323 | 2323 | |
| 2324 | 2324 | /** |
| 2325 | 2325 | * This error occurs if the routing type that is passed for an |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | public static function arrayIsAssoc($array) |
| 124 | 124 | { |
| 125 | - return (bool)count(array_filter(array_keys($array), 'is_string')); |
|
| 125 | + return (bool) count(array_filter(array_keys($array), 'is_string')); |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | /** |
@@ -162,6 +162,6 @@ discard block |
||
| 162 | 162 | return ''; |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - return (string)$this->_; |
|
| 165 | + return (string) $this->_; |
|
| 166 | 166 | } |
| 167 | 167 | } |
@@ -70,36 +70,36 @@ |
||
| 70 | 70 | { |
| 71 | 71 | return [ |
| 72 | 72 | 'DateTime' => [ |
| 73 | - 'string' => function ($value) { |
|
| 73 | + 'string' => function($value) { |
|
| 74 | 74 | return new \DateTime($value); |
| 75 | 75 | } |
| 76 | 76 | ], |
| 77 | 77 | 'dateTime' => [ |
| 78 | - 'string' => function ($value) { |
|
| 78 | + 'string' => function($value) { |
|
| 79 | 79 | return new \DateTime($value); |
| 80 | 80 | } |
| 81 | 81 | ], |
| 82 | 82 | 'date' => [ |
| 83 | - 'string' => function ($value) { |
|
| 83 | + 'string' => function($value) { |
|
| 84 | 84 | return new \DateTime($value); |
| 85 | 85 | } |
| 86 | 86 | ], |
| 87 | 87 | 'time' => [ |
| 88 | - 'string' => function ($value) { |
|
| 88 | + 'string' => function($value) { |
|
| 89 | 89 | return new \DateTime($value); |
| 90 | 90 | } |
| 91 | 91 | ], |
| 92 | 92 | 'ExchangeFormat' => [ |
| 93 | - 'DateTime' => function ($value) { |
|
| 93 | + 'DateTime' => function($value) { |
|
| 94 | 94 | return $value->format('c'); |
| 95 | 95 | }, |
| 96 | - 'dateTime' => function ($value) { |
|
| 96 | + 'dateTime' => function($value) { |
|
| 97 | 97 | return $value->format('c'); |
| 98 | 98 | }, |
| 99 | - 'date' => function ($value) { |
|
| 99 | + 'date' => function($value) { |
|
| 100 | 100 | return $value->format('Y-m-d'); |
| 101 | 101 | }, |
| 102 | - 'time' => function ($value) { |
|
| 102 | + 'time' => function($value) { |
|
| 103 | 103 | return $value->format('H:i:s'); |
| 104 | 104 | } |
| 105 | 105 | ] |
@@ -196,7 +196,7 @@ |
||
| 196 | 196 | |
| 197 | 197 | public function getAttachment(Type\AttachmentIdType $attachmentId) |
| 198 | 198 | { |
| 199 | - $request = array ( |
|
| 199 | + $request = array( |
|
| 200 | 200 | 'AttachmentIds' => array( |
| 201 | 201 | $attachmentId->toXmlObject() |
| 202 | 202 | ) |
@@ -1,11 +1,11 @@ |
||
| 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 jamesiarmes\PEWS\Generator\ConvertToPHP; |
| 7 | 7 | |
| 8 | -error_reporting(error_reporting() &~E_NOTICE); |
|
| 8 | +error_reporting(error_reporting() & ~E_NOTICE); |
|
| 9 | 9 | |
| 10 | 10 | $cli = new Application('Convert XSD to PHP classes Command Line Interface', "2.0"); |
| 11 | 11 | $cli->setCatchExceptions(true); |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | trait MagicMethodsTrait |
| 14 | 14 | { |
| 15 | - protected $_typeMap = [ ]; |
|
| 15 | + protected $_typeMap = []; |
|
| 16 | 16 | |
| 17 | 17 | public function __call($name, $arguments) |
| 18 | 18 | { |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | if (!$this->exists($name)) { |
| 63 | - throw new \Exception('Property ' . $name . ' does not exist'); |
|
| 63 | + throw new \Exception('Property '.$name.' does not exist'); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | return $this->$name; |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | if (!$this->exists($name)) { |
| 76 | - throw new \Exception('Property ' . $name . ' does not exist'); |
|
| 76 | + throw new \Exception('Property '.$name.' does not exist'); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | if (isset($this->_typeMap[$name])) { |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | if (!$this->exists($name)) { |
| 95 | - throw new \Exception('Property ' . $name . ' does not exist'); |
|
| 95 | + throw new \Exception('Property '.$name.' does not exist'); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | if (isset($this->_typeMap[$name])) { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | if (!$this->exists($name)) { |
| 127 | - throw new \Exception('Property ' . $name . ' does not exist'); |
|
| 127 | + throw new \Exception('Property '.$name.' does not exist'); |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | return ((bool) $this->$name); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | return array( |
| 12 | 12 | 'curl' => array( |
| 13 | 13 | CURLOPT_HTTPAUTH => CURLAUTH_BASIC | CURLAUTH_NTLM, |
| 14 | - CURLOPT_USERPWD => $username . ':' . $password |
|
| 14 | + CURLOPT_USERPWD => $username.':'.$password |
|
| 15 | 15 | ) |
| 16 | 16 | ); |
| 17 | 17 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | { |
| 21 | 21 | return array( |
| 22 | 22 | 'headers' => array( |
| 23 | - 'Authorization' => 'Bearer ' . $token |
|
| 23 | + 'Authorization' => 'Bearer '.$token |
|
| 24 | 24 | ) |
| 25 | 25 | ); |
| 26 | 26 | } |
@@ -20,14 +20,14 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | private $shutdownRegistered = false; |
| 22 | 22 | |
| 23 | - private static $instances = [ ]; |
|
| 23 | + private static $instances = []; |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * @var Client |
| 27 | 27 | */ |
| 28 | 28 | private $client; |
| 29 | 29 | |
| 30 | - public static function getInstance($options = [ ]) |
|
| 30 | + public static function getInstance($options = []) |
|
| 31 | 31 | { |
| 32 | 32 | foreach (self::$instances as $instance) { |
| 33 | 33 | if ($instance['options'] == $options) { |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $dirPos = strrpos($dir, "src/API"); |
| 120 | 120 | $dir = substr($dir, 0, $dirPos); |
| 121 | 121 | |
| 122 | - $this->recordLocation = $dir . 'Resources/recordings/'; |
|
| 122 | + $this->recordLocation = $dir.'Resources/recordings/'; |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | return $this->recordLocation; |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | public function getRecordFilePath() |
| 129 | 129 | { |
| 130 | - $path = $this->getRecordLocation() . $this->recordFileName; |
|
| 130 | + $path = $this->getRecordLocation().$this->recordFileName; |
|
| 131 | 131 | $path = str_replace("\\", "/", $path); |
| 132 | 132 | return $path; |
| 133 | 133 | } |
@@ -23,12 +23,12 @@ |
||
| 23 | 23 | //should have your own way to get it, but just for the sake of example I'm going to show you a way to do that |
| 24 | 24 | |
| 25 | 25 | if (!$_SESSION['token'] && !isset($_GET)) { |
| 26 | - $redirect = $authorizationEndpoint . |
|
| 27 | - '?response_type=code' . |
|
| 28 | - '&client_id=' . urlencode($clientId) . |
|
| 29 | - '&redirect_uri=' . urlencode($redirectUri) . |
|
| 30 | - '&resource=' . urlencode($resource) . |
|
| 31 | - '&scope=' . urlencode('full_access_as_user'); |
|
| 26 | + $redirect = $authorizationEndpoint. |
|
| 27 | + '?response_type=code'. |
|
| 28 | + '&client_id='.urlencode($clientId). |
|
| 29 | + '&redirect_uri='.urlencode($redirectUri). |
|
| 30 | + '&resource='.urlencode($resource). |
|
| 31 | + '&scope='.urlencode('full_access_as_user'); |
|
| 32 | 32 | header("Location: {$redirect}"); |
| 33 | 33 | exit(); |
| 34 | 34 | } |