@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | { |
| 31 | 31 | $closingDateHolder = $xpath->query('//div[./div/span[contains(text(), "Call 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 |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * Copyright Andrea Heigl <[email protected]> |
@@ -29,23 +29,23 @@ discard block |
||
| 29 | 29 | //$startDate = $xpath->query('//div[contains(text()[2], "event starts")]/following-sibling::h2'); |
| 30 | 30 | $startDate = $xpath->query('//div[contains(., "event starts")]'); |
| 31 | 31 | |
| 32 | - if (! $startDate || $startDate->length == 0) { |
|
| 32 | + if (!$startDate || $startDate->length == 0) { |
|
| 33 | 33 | // This expression does not work. It looks like the reason is the array-notation... |
| 34 | 34 | //$startDate = $xpath->query('//div[contains(text()[2], "event date")]/following-sibling::h2'); |
| 35 | 35 | $startDate = $xpath->query('//div[contains(., "event date")]'); |
| 36 | 36 | } |
| 37 | - if (! $startDate || $startDate->length == 0) { |
|
| 37 | + if (!$startDate || $startDate->length == 0) { |
|
| 38 | 38 | // This expression does not work. It looks like the reason is the array-notation... |
| 39 | 39 | //$startDate = $xpath->query('//div[contains(text()[2], "event date")]/following-sibling::h2'); |
| 40 | 40 | $startDate = $xpath->query('//div[contains(., "planned future dates")]'); |
| 41 | 41 | } |
| 42 | - if (! $startDate || $startDate->length == 0) { |
|
| 42 | + if (!$startDate || $startDate->length == 0) { |
|
| 43 | 43 | throw new \InvalidArgumentException('The Event does not seem to have a start date-identifier'); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - $startDate = $xpath->query('h2', $startDate->item($startDate->length-1)->parentNode); |
|
| 46 | + $startDate = $xpath->query('h2', $startDate->item($startDate->length - 1)->parentNode); |
|
| 47 | 47 | |
| 48 | - if (! $startDate || $startDate->length == 0) { |
|
| 48 | + if (!$startDate || $startDate->length == 0) { |
|
| 49 | 49 | throw new \InvalidArgumentException('The Event does not seem to have a start date'); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -13,12 +13,12 @@ |
||
| 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 | |
| 20 | 20 | public function getConfiguration(): array |
| 21 | 21 | { |
| 22 | - return parse_ini_file($this->configFile)??[]; |
|
| 22 | + return parse_ini_file($this->configFile) ?? []; |
|
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | \ No newline at end of file |
@@ -109,12 +109,12 @@ |
||
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | // We are not interersted in events without a CFP-Url |
| 112 | - if (($event['cfpLink']??'') === '') { |
|
| 112 | + if (($event['cfpLink'] ?? '') === '') { |
|
| 113 | 113 | continue; |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | // We are not interested in Events without a website |
| 117 | - if (($event['website']??'') === '') { |
|
| 117 | + if (($event['website'] ?? '') === '') { |
|
| 118 | 118 | continue; |
| 119 | 119 | } |
| 120 | 120 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * Copyright Andrea Heigl <[email protected]> |
@@ -87,8 +87,8 @@ discard block |
||
| 87 | 87 | $cfp = new Cfp(); |
| 88 | 88 | |
| 89 | 89 | try { |
| 90 | - $cfp->location = $event['location']['full']??''; |
|
| 91 | - if ($event['location']['coordinates']??null !== null) { |
|
| 90 | + $cfp->location = $event['location']['full'] ?? ''; |
|
| 91 | + if ($event['location']['coordinates'] ?? null !== null) { |
|
| 92 | 92 | $location = explode(',', $event['location']['coordinates']); |
| 93 | 93 | $cfp->latitude = $location[0]; |
| 94 | 94 | $cfp->longitude = $location[1]; |