@@ -56,19 +56,19 @@ discard block |
||
| 56 | 56 | $xpath = new DOMXPath($dom); |
| 57 | 57 | $titlePath = $xpath->query("//h1[contains(@class, 'subheader__subtitle')]"); |
| 58 | 58 | |
| 59 | - if (! $titlePath || $titlePath->length == 0) { |
|
| 59 | + if (!$titlePath || $titlePath->length == 0) { |
|
| 60 | 60 | return $cfp; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | $location = trim($titlePath->item(0)->textContent); |
| 64 | 64 | $location = explode(' - ', $location); |
| 65 | 65 | |
| 66 | - if (! isset($location[1])) { |
|
| 66 | + if (!isset($location[1])) { |
|
| 67 | 67 | return $cfp; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | $dates = explode(',', $location[1]); |
| 71 | - if (count($dates) % 2 !== 0) { |
|
| 71 | + if (count($dates) % 2 !== 0) { |
|
| 72 | 72 | return $cfp; |
| 73 | 73 | } |
| 74 | 74 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | return $cfp; |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - $startDate = new DateTimeImmutable($dates[0] . ', ' . $dates[1] . ' 00:00:00', $timezone); |
|
| 79 | + $startDate = new DateTimeImmutable($dates[0].', '.$dates[1].' 00:00:00', $timezone); |
|
| 80 | 80 | $cfp->eventStartDate = $startDate; |
| 81 | 81 | |
| 82 | 82 | return $cfp; |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | do { |
| 67 | 67 | $dom = new DOMDocument('1.0', 'UTF-8'); |
| 68 | 68 | libxml_use_internal_errors(true); |
| 69 | - $uri = sprintf($this->uri, $i+1); |
|
| 69 | + $uri = sprintf($this->uri, $i + 1); |
|
| 70 | 70 | $dom->loadHTMLFile($uri); |
| 71 | 71 | libxml_use_internal_errors(false); |
| 72 | 72 | $dom->preserveWhiteSpace = false; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | ); |
| 52 | 52 | $request = new Request( |
| 53 | 53 | 'POST', |
| 54 | - 'statuses/update.json?' . $this->formUrlEncode([ |
|
| 54 | + 'statuses/update.json?'.$this->formUrlEncode([ |
|
| 55 | 55 | 'status' => $notificationString, |
| 56 | 56 | 'lat' => $cfp->latitude, |
| 57 | 57 | 'long' => $cfp->longitude, |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | if (strlen($name) < 70) { |
| 72 | 72 | return $name; |
| 73 | 73 | } |
| 74 | - return substr($name, 0, 69) . '…'; |
|
| 74 | + return substr($name, 0, 69).'…'; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | protected function shortenUri($uri) |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | $xpath = new DOMXPath($dom); |
| 45 | 45 | $titlePath = $xpath->query("//div[contains(@class, 'subheader__logo')]/img"); |
| 46 | 46 | |
| 47 | - if (! $titlePath || $titlePath->length == 0) { |
|
| 47 | + if (!$titlePath || $titlePath->length == 0) { |
|
| 48 | 48 | return $cfp; |
| 49 | 49 | } |
| 50 | 50 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | |
| 97 | 97 | try { |
| 98 | 98 | $this->client->request('GET', sprintf( |
| 99 | - $this->baseUri . '/%1$s', |
|
| 99 | + $this->baseUri.'/%1$s', |
|
| 100 | 100 | sha1($cfp->conferenceUri) |
| 101 | 101 | ), []); |
| 102 | 102 | $exists = true; |
@@ -111,18 +111,18 @@ discard block |
||
| 111 | 111 | $this->baseUri |
| 112 | 112 | ), [ |
| 113 | 113 | 'headers' => [ |
| 114 | - 'Authorization' => 'Bearer ' . $this->bearerToken, |
|
| 114 | + 'Authorization' => 'Bearer '.$this->bearerToken, |
|
| 115 | 115 | ], |
| 116 | 116 | 'form_params' => $body |
| 117 | 117 | ]); |
| 118 | 118 | } else { |
| 119 | 119 | // Exists, so update it |
| 120 | 120 | $response = $this->client->request('PUT', sprintf( |
| 121 | - $this->baseUri . '/%1$s', |
|
| 121 | + $this->baseUri.'/%1$s', |
|
| 122 | 122 | sha1($cfp->conferenceUri) |
| 123 | 123 | ), [ |
| 124 | 124 | 'headers' => [ |
| 125 | - 'Authorization' => 'Bearer ' . $this->bearerToken, |
|
| 125 | + 'Authorization' => 'Bearer '.$this->bearerToken, |
|
| 126 | 126 | ], |
| 127 | 127 | 'form_params' => $body |
| 128 | 128 | ]); |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | )); |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | - return (isset($response) && ($response->getStatusCode() === 200 || $response->getStatusCode() === 201))?'Success':'Failure'; |
|
| 146 | + return (isset($response) && ($response->getStatusCode() === 200 || $response->getStatusCode() === 201)) ? 'Success' : 'Failure'; |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | public function setOutput(OutputInterface $output) |
@@ -65,12 +65,12 @@ discard block |
||
| 65 | 65 | try { |
| 66 | 66 | $myuri = ''; |
| 67 | 67 | $this->client->get($uri, [ |
| 68 | - 'on_stats' => function (TransferStats $stats) use (&$myuri) { |
|
| 68 | + 'on_stats' => function(TransferStats $stats) use (&$myuri) { |
|
| 69 | 69 | $myuri = (string) $stats->getEffectiveUri(); |
| 70 | 70 | } |
| 71 | 71 | ]); |
| 72 | 72 | } catch (Exception $e) { |
| 73 | - throw new UnverifiedUriException('Event-URI could not be verified: ' . $e->getMessage()); |
|
| 73 | + throw new UnverifiedUriException('Event-URI could not be verified: '.$e->getMessage()); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | return $this->normalizeUri($myuri); |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $elements = parse_url($uri); |
| 82 | 82 | $newUri = ''; |
| 83 | 83 | if (isset($elements['scheme'])) { |
| 84 | - $newUri .= $elements['scheme'] . '://'; |
|
| 84 | + $newUri .= $elements['scheme'].'://'; |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | if (isset($elements['host'])) { |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | if (isset($elements['port'])) { |
| 92 | - $newUri .= ':' . $elements['port']; |
|
| 92 | + $newUri .= ':'.$elements['port']; |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | if (isset($elements['path'])) { |
@@ -97,11 +97,11 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | if (isset($elements['query'])) { |
| 100 | - $newUri .= '?' . $elements['query']; |
|
| 100 | + $newUri .= '?'.$elements['query']; |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | if (isset($elements['fragment'])) { |
| 104 | - $newUri .= '#' . $elements['fragment']; |
|
| 104 | + $newUri .= '#'.$elements['fragment']; |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | return $newUri; |