@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | $search->skipUntil($type); |
| 152 | 152 | |
| 153 | 153 | if (!$search->lookahead) { |
| 154 | - throw new \UnexpectedValueException($type . ' not found'); |
|
| 154 | + throw new \UnexpectedValueException($type.' not found'); |
|
| 155 | 155 | } |
| 156 | 156 | return true; |
| 157 | 157 | } |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | { |
| 190 | 190 | return array( |
| 191 | 191 | '[a-zA-Z_]+[46]?', //ASCII and domain literal |
| 192 | - '[^\x00-\x7F]', //UTF-8 |
|
| 192 | + '[^\x00-\x7F]', //UTF-8 |
|
| 193 | 193 | '[0-9]+', |
| 194 | 194 | '\r\n', |
| 195 | 195 | '::', |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | { |
| 100 | 100 | $variant = INTL_IDNA_VARIANT_UTS46; |
| 101 | 101 | |
| 102 | - $host = rtrim(idn_to_ascii($host, IDNA_DEFAULT, $variant), '.') . '.'; |
|
| 102 | + $host = rtrim(idn_to_ascii($host, IDNA_DEFAULT, $variant), '.').'.'; |
|
| 103 | 103 | |
| 104 | 104 | return $this->validateDnsRecords($host); |
| 105 | 105 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | { |
| 28 | 28 | $this->parser = new EmailParser($emailLexer); |
| 29 | 29 | try { |
| 30 | - $this->parser->parse((string)$email); |
|
| 30 | + $this->parser->parse((string) $email); |
|
| 31 | 31 | } catch (InvalidEmail $invalid) { |
| 32 | 32 | $this->error = $invalid; |
| 33 | 33 | return false; |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | throw new CRNoLF(); |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] !== EmailLexer::S_AT) { |
|
| 123 | + if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] !== EmailLexer::S_AT) { |
|
| 124 | 124 | throw new AtextAfterCFWS(); |
| 125 | 125 | } |
| 126 | 126 | |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | throw new ExpectingCTEXT(); |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | - if ($this->lexer->isNextToken(EmailLexer::S_AT) || $previous['type'] === EmailLexer::S_AT) { |
|
| 131 | + if ($this->lexer->isNextToken(EmailLexer::S_AT) || $previous['type'] === EmailLexer::S_AT) { |
|
| 132 | 132 | $this->warnings[CFWSNearAt::CODE] = new CFWSNearAt(); |
| 133 | 133 | } else { |
| 134 | 134 | $this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS(); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | if ($this->lexer->token['type'] === EmailLexer::INVALID || |
| 258 | - $this->lexer->token['type'] === EmailLexer::C_DEL || |
|
| 258 | + $this->lexer->token['type'] === EmailLexer::C_DEL || |
|
| 259 | 259 | $this->lexer->token['type'] === EmailLexer::S_LF |
| 260 | 260 | ) { |
| 261 | 261 | $this->warnings[ObsoleteDTEXT::CODE] = new ObsoleteDTEXT(); |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | */ |
| 320 | 320 | protected function checkIPV4Tag($addressLiteral) |
| 321 | 321 | { |
| 322 | - $matchesIP = array(); |
|
| 322 | + $matchesIP = array(); |
|
| 323 | 323 | |
| 324 | 324 | // Extract IPv4 part from the end of the address-literal (if there is one) |
| 325 | 325 | if (preg_match( |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | return false; |
| 335 | 335 | } |
| 336 | 336 | // Convert IPv4 part to IPv6 format for further testing |
| 337 | - $addressLiteral = substr($addressLiteral, 0, (int) $index) . '0:0'; |
|
| 337 | + $addressLiteral = substr($addressLiteral, 0, (int) $index).'0:0'; |
|
| 338 | 338 | } |
| 339 | 339 | |
| 340 | 340 | return $addressLiteral; |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | public function __construct($namespace, $path) |
| 29 | 29 | { |
| 30 | 30 | $this->namespace = ltrim($namespace, '\\'); |
| 31 | - $this->path = rtrim($path, '/\\') . DIRECTORY_SEPARATOR; |
|
| 31 | + $this->path = rtrim($path, '/\\').DIRECTORY_SEPARATOR; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
@@ -44,13 +44,13 @@ discard block |
||
| 44 | 44 | if (strpos($class, $this->namespace) === 0) { |
| 45 | 45 | $nsparts = explode('\\', $class); |
| 46 | 46 | $class = array_pop($nsparts); |
| 47 | - $path = $this->path . 'swiftmailer/egulias/email-validator/EmailValidator/'; |
|
| 48 | - $max=count($nsparts); |
|
| 49 | - for ($i=2; $i<$max;$i++) { |
|
| 47 | + $path = $this->path.'swiftmailer/egulias/email-validator/EmailValidator/'; |
|
| 48 | + $max = count($nsparts); |
|
| 49 | + for ($i = 2; $i < $max; $i++) { |
|
| 50 | 50 | $path .= $nsparts[$i].'/'; |
| 51 | 51 | } |
| 52 | 52 | $nsparts = array(); |
| 53 | - $path .= str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php'; |
|
| 53 | + $path .= str_replace('_', DIRECTORY_SEPARATOR, $class).'.php'; |
|
| 54 | 54 | if (file_exists($path)) { |
| 55 | 55 | require $path; |
| 56 | 56 | return true; |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | { |
| 247 | 247 | static $regex; |
| 248 | 248 | |
| 249 | - if ( ! isset($regex)) { |
|
| 249 | + if (!isset($regex)) { |
|
| 250 | 250 | $regex = sprintf( |
| 251 | 251 | '/(%s)|%s/%s', |
| 252 | 252 | implode(')|(', $this->getCatchablePatterns()), |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | |
| 291 | 291 | foreach ($constants as $name => $value) { |
| 292 | 292 | if ($value === $token) { |
| 293 | - return $className . '::' . $name; |
|
| 293 | + return $className.'::'.$name; |
|
| 294 | 294 | } |
| 295 | 295 | } |
| 296 | 296 | |
@@ -325,10 +325,10 @@ discard block |
||
| 325 | 325 | |
| 326 | 326 | if ($node instanceof ICalendarObjectContainer) { |
| 327 | 327 | $propFind->handle($ns.'max-resource-size', $this->maxResourceSize); |
| 328 | - $propFind->handle($ns.'supported-calendar-data', function () { |
|
| 328 | + $propFind->handle($ns.'supported-calendar-data', function() { |
|
| 329 | 329 | return new Xml\Property\SupportedCalendarData(); |
| 330 | 330 | }); |
| 331 | - $propFind->handle($ns.'supported-collation-set', function () { |
|
| 331 | + $propFind->handle($ns.'supported-collation-set', function() { |
|
| 332 | 332 | return new Xml\Property\SupportedCollationSet(); |
| 333 | 333 | }); |
| 334 | 334 | } |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | if ($node instanceof DAVACL\IPrincipal) { |
| 337 | 337 | $principalUrl = $node->getPrincipalUrl(); |
| 338 | 338 | |
| 339 | - $propFind->handle('{'.self::NS_CALDAV.'}calendar-home-set', function () use ($principalUrl) { |
|
| 339 | + $propFind->handle('{'.self::NS_CALDAV.'}calendar-home-set', function() use ($principalUrl) { |
|
| 340 | 340 | $calendarHomePath = $this->getCalendarHomeForPrincipal($principalUrl); |
| 341 | 341 | if (is_null($calendarHomePath)) { |
| 342 | 342 | return null; |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | }); |
| 347 | 347 | // The calendar-user-address-set property is basically mapped to |
| 348 | 348 | // the {DAV:}alternate-URI-set property. |
| 349 | - $propFind->handle('{'.self::NS_CALDAV.'}calendar-user-address-set', function () use ($node) { |
|
| 349 | + $propFind->handle('{'.self::NS_CALDAV.'}calendar-user-address-set', function() use ($node) { |
|
| 350 | 350 | $addresses = $node->getAlternateUriSet(); |
| 351 | 351 | $addresses[] = $this->server->getBaseUri().$node->getPrincipalUrl().'/'; |
| 352 | 352 | |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | }); |
| 355 | 355 | // For some reason somebody thought it was a good idea to add |
| 356 | 356 | // another one of these properties. We're supporting it too. |
| 357 | - $propFind->handle('{'.self::NS_CALENDARSERVER.'}email-address-set', function () use ($node) { |
|
| 357 | + $propFind->handle('{'.self::NS_CALENDARSERVER.'}email-address-set', function() use ($node) { |
|
| 358 | 358 | $addresses = $node->getAlternateUriSet(); |
| 359 | 359 | $emails = []; |
| 360 | 360 | foreach ($addresses as $address) { |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | // The calendar-data property is not supposed to be a 'real' |
| 403 | 403 | // property, but in large chunks of the spec it does act as such. |
| 404 | 404 | // Therefore we simply expose it as a property. |
| 405 | - $propFind->handle('{'.self::NS_CALDAV.'}calendar-data', function () use ($node) { |
|
| 405 | + $propFind->handle('{'.self::NS_CALDAV.'}calendar-data', function() use ($node) { |
|
| 406 | 406 | $val = $node->get(); |
| 407 | 407 | if (is_resource($val)) { |
| 408 | 408 | $val = stream_get_contents($val); |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | 'time-range' => null, |
| 685 | 685 | ]); |
| 686 | 686 | |
| 687 | - $objects = array_map(function ($url) use ($calendar) { |
|
| 687 | + $objects = array_map(function($url) use ($calendar) { |
|
| 688 | 688 | $obj = $calendar->getChild($url)->get(); |
| 689 | 689 | |
| 690 | 690 | return $obj; |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | { |
| 65 | 65 | $this->server = $server; |
| 66 | 66 | $server->on('method:GET', [$this, 'httpGet'], 90); |
| 67 | - $server->on('browserButtonActions', function ($path, $node, &$actions) { |
|
| 67 | + $server->on('browserButtonActions', function($path, $node, &$actions) { |
|
| 68 | 68 | if ($node instanceof ICalendar) { |
| 69 | 69 | $actions .= '<a href="'.htmlspecialchars($path, ENT_QUOTES, 'UTF-8').'?export"><span class="oi" data-glyph="calendar"></span></a>'; |
| 70 | 70 | } |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | // queryResult is just a list of base urls. We need to prefix the |
| 204 | 204 | // calendar path. |
| 205 | 205 | $queryResult = array_map( |
| 206 | - function ($item) use ($path) { |
|
| 206 | + function($item) use ($path) { |
|
| 207 | 207 | return $path.'/'.$item; |
| 208 | 208 | }, |
| 209 | 209 | $queryResult |