@@ -30,18 +30,18 @@ |
||
| 30 | 30 | //$endDate = $xpath->query('//div[contains(text()[2], "event ends")]/following-sibling::h2'); |
| 31 | 31 | $endDate = $xpath->query('//div[contains(text(), "event ends")]'); |
| 32 | 32 | |
| 33 | - if (! $endDate || $endDate->length == 0) { |
|
| 33 | + if (!$endDate || $endDate->length == 0) { |
|
| 34 | 34 | // This expression does not work. It looks like the reason is the array-notation... |
| 35 | 35 | //$endDate = $xpath->query('//div[contains(text()[2], "event date")]/following-sibling::h2'); |
| 36 | 36 | $endDate = $xpath->query('//div[contains(text(), "event date")]'); |
| 37 | 37 | } |
| 38 | - if (! $endDate || $endDate->length == 0) { |
|
| 38 | + if (!$endDate || $endDate->length == 0) { |
|
| 39 | 39 | throw new \InvalidArgumentException('The Event does not seem to have an end date'); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $endDate = $xpath->query('h2', $endDate->item(0)->parentNode); |
| 43 | 43 | |
| 44 | - if (! $endDate || $endDate->length == 0) { |
|
| 44 | + if (!$endDate || $endDate->length == 0) { |
|
| 45 | 45 | throw new \InvalidArgumentException('The Event does not seem to have an end date'); |
| 46 | 46 | } |
| 47 | 47 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | { |
| 31 | 31 | $closingDateHolder = $xpath->query('//div[./div/span[contains(text(), "Call closes at")]] | //div[./div/span[contains(text(), "CfS closes at")]]'); |
| 32 | 32 | |
| 33 | - if (! $closingDateHolder || $closingDateHolder->length == 0) { |
|
| 33 | + if (!$closingDateHolder || $closingDateHolder->length == 0) { |
|
| 34 | 34 | throw new InvalidArgumentException('The CfP does not seem to have a closing date'); |
| 35 | 35 | } |
| 36 | 36 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | $closingHour = $this->clearClosingHour($closingHour); |
| 41 | 41 | |
| 42 | - return new DateTimeImmutable($closingDay . ' ' . $closingHour, $this->timezone); |
|
| 42 | + return new DateTimeImmutable($closingDay.' '.$closingHour, $this->timezone); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | private function clearClosingHour(string $closingHour) : string |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | class ConfigService |
| 15 | 15 | { |
| 16 | - private $configFile = __DIR__ . '/../../config/callingallpapers.ini'; |
|
| 16 | + private $configFile = __DIR__.'/../../config/callingallpapers.ini'; |
|
| 17 | 17 | |
| 18 | 18 | public function __construct() |
| 19 | 19 | { |
@@ -21,6 +21,6 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | public function getConfiguration(): array |
| 23 | 23 | { |
| 24 | - return parse_ini_file($this->configFile)??[]; |
|
| 24 | + return parse_ini_file($this->configFile) ?? []; |
|
| 25 | 25 | } |
| 26 | 26 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | { |
| 45 | 45 | $name = $this->shortenName($cfp->conferenceName); |
| 46 | 46 | $uri = $this->shortenUri($cfp->uri); |
| 47 | - $tags = ' #' . implode(' #', $cfp->tags); |
|
| 47 | + $tags = ' #'.implode(' #', $cfp->tags); |
|
| 48 | 48 | |
| 49 | 49 | $notificationString = sprintf( |
| 50 | 50 | <<<'NOTIFICATION' |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | if (strlen($name) < 70) { |
| 69 | 69 | return $name; |
| 70 | 70 | } |
| 71 | - return substr($name, 0, 69) . '…'; |
|
| 71 | + return substr($name, 0, 69).'…'; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | protected function shortenUri($uri) |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $this->client = $client; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - public function getCfpsEndingWithinInterval(DateInterval $interval, DateTimeInterface|null $date = null): CfpList |
|
| 63 | + public function getCfpsEndingWithinInterval(DateInterval $interval, DateTimeInterface | null $date = null): CfpList |
|
| 64 | 64 | { |
| 65 | 65 | if (null === $date) { |
| 66 | 66 | $date = new DateTimeImmutable(); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | return $list; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - if (! $items) { |
|
| 92 | + if (!$items) { |
|
| 93 | 93 | return $list; |
| 94 | 94 | } |
| 95 | 95 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $cfp->longitude = $item['longitude']; |
| 108 | 108 | $cfp->iconUri = $item['iconUri']; |
| 109 | 109 | $cfp->uri = $item['uri']; |
| 110 | - $cfp->tags = array_filter($item['tags'], function ($item) { |
|
| 110 | + $cfp->tags = array_filter($item['tags'], function($item) { |
|
| 111 | 111 | return (bool) $item; |
| 112 | 112 | }); |
| 113 | 113 | $cfp->timezone = $item['timezone']; |