@@ -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]> |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | { |
20 | 20 | $confPath = $xpath->query('//h4'); |
21 | 21 | |
22 | - if (! $confPath || $confPath->length == 0) { |
|
22 | + if (!$confPath || $confPath->length == 0) { |
|
23 | 23 | throw new \InvalidArgumentException('The CfP does not seem to have an eventname'); |
24 | 24 | } |
25 | 25 |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | |
31 | 31 | public function parse(DOMDocument $dom, DOMXPath $xpath) : DateTimeImmutable |
32 | 32 | { |
33 | - $openingDateHolder = $xpath->query('//div[./div/span[contains(text(), "' . self::OPENING_STRING . '")]]'); |
|
33 | + $openingDateHolder = $xpath->query('//div[./div/span[contains(text(), "'.self::OPENING_STRING.'")]]'); |
|
34 | 34 | |
35 | - if (! $openingDateHolder || $openingDateHolder->length == 0) { |
|
35 | + if (!$openingDateHolder || $openingDateHolder->length == 0) { |
|
36 | 36 | throw new InvalidArgumentException('No CfP-Open Date found'); |
37 | 37 | } |
38 | 38 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | $openingHour = $this->clearOpeningHour($openingHour); |
43 | 43 | |
44 | - return new DateTimeImmutable($openingDay. ' ' . $openingHour, $this->timezone); |
|
44 | + return new DateTimeImmutable($openingDay.' '.$openingHour, $this->timezone); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | private function clearOpeningHour(string $openingHour) : string |
@@ -18,14 +18,14 @@ |
||
18 | 18 | |
19 | 19 | public function __construct(string $baseUri) |
20 | 20 | { |
21 | - $this->baseUri = $baseUri; |
|
21 | + $this->baseUri = $baseUri; |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | public function parse(DOMDocument $dom, DOMXPath $xpath) : string |
25 | 25 | { |
26 | 26 | $uriPath = $xpath->query('//div[contains(@class, "ibox-content")]/img'); |
27 | 27 | |
28 | - if (! $uriPath || $uriPath->length == 0) { |
|
28 | + if (!$uriPath || $uriPath->length == 0) { |
|
29 | 29 | throw new \InvalidArgumentException('The CfP does not seem to have an Icon'); |
30 | 30 | } |
31 | 31 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Copyright (c) 2015-2016 Andreas Heigl<[email protected]> |
@@ -83,16 +83,16 @@ |
||
83 | 83 | |
84 | 84 | $start = new \DateTime($input->getOption('start')); |
85 | 85 | |
86 | - if (! $start instanceof \DateTime) { |
|
86 | + if (!$start instanceof \DateTime) { |
|
87 | 87 | throw new \InvalidArgumentException('The given date could not be parsed'); |
88 | 88 | } |
89 | 89 | |
90 | - $config = parse_ini_file(__DIR__ . '/../../config/callingallpapers.ini'); |
|
90 | + $config = parse_ini_file(__DIR__.'/../../config/callingallpapers.ini'); |
|
91 | 91 | |
92 | 92 | $client = new Client([ |
93 | 93 | 'headers' => [ |
94 | 94 | 'Accept' => 'application/json', |
95 | - 'Authorization' => 'token ' . $config['github.token'], |
|
95 | + 'Authorization' => 'token '.$config['github.token'], |
|
96 | 96 | ], |
97 | 97 | ]); |
98 | 98 |
@@ -21,13 +21,13 @@ |
||
21 | 21 | //$uriPath = $xpath->query('//div[contains(text()[2], "website")]/following-sibling::h2/a'); |
22 | 22 | $uriPath = $xpath->query('//div[contains(., "website")]'); |
23 | 23 | |
24 | - if (! $uriPath || $uriPath->length == 0) { |
|
24 | + if (!$uriPath || $uriPath->length == 0) { |
|
25 | 25 | throw new \InvalidArgumentException('The CfP does not seem to have an EventUri'); |
26 | 26 | } |
27 | 27 | |
28 | 28 | $uriPath = $xpath->query('.//h2/a', $uriPath->item(0)->parentNode); |
29 | 29 | |
30 | - if (! $uriPath || $uriPath->length == 0) { |
|
30 | + if (!$uriPath || $uriPath->length == 0) { |
|
31 | 31 | throw new \InvalidArgumentException('The Event does not seem to have a location'); |
32 | 32 | } |
33 | 33 |
@@ -19,13 +19,13 @@ |
||
19 | 19 | // This expression does not work. It looks like the reason is the array-notation... |
20 | 20 | //$locations = $xpath->query('//div[contains(text()[2], "location")]/following-sibling::h2/span'); |
21 | 21 | $locationMarker = $xpath->query("//div[contains(., 'location')]"); |
22 | - if (! $locationMarker || $locationMarker->length == 0) { |
|
22 | + if (!$locationMarker || $locationMarker->length == 0) { |
|
23 | 23 | throw new \InvalidArgumentException('The Event does not seem to have a locationMarker'); |
24 | 24 | } |
25 | 25 | |
26 | 26 | $locations = $xpath->query('.//h2/span', $locationMarker->item(0)->parentNode); |
27 | 27 | |
28 | - if (! $locations || $locations->length == 0) { |
|
28 | + if (!$locations || $locations->length == 0) { |
|
29 | 29 | throw new \InvalidArgumentException('The Event does not seem to have a location'); |
30 | 30 | } |
31 | 31 | $locationArray = []; |
@@ -62,7 +62,7 @@ |
||
62 | 62 | if (strlen($name) < 70) { |
63 | 63 | return $name; |
64 | 64 | } |
65 | - return substr($name, 0, 69) . '…'; |
|
65 | + return substr($name, 0, 69).'…'; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | protected function shortenUri($uri) |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | if (isset($conference['country'])) { |
40 | 40 | $geolocation = $this->geolocation->getLocationForAddress( |
41 | - $conference['country'] . ', ' . $cfp->location |
|
41 | + $conference['country'].', '.$cfp->location |
|
42 | 42 | ); |
43 | 43 | |
44 | 44 | $cfp->latitude = $geolocation->getLatitude(); |
@@ -52,19 +52,19 @@ discard block |
||
52 | 52 | |
53 | 53 | $cfp->conferenceName = $conference['name']; |
54 | 54 | $cfp->eventStartDate = new DateTimeImmutable( |
55 | - $conference['startDate'] . ' 08:00:00', |
|
55 | + $conference['startDate'].' 08:00:00', |
|
56 | 56 | new DateTimeZone($cfp->timezone) |
57 | 57 | ); |
58 | - if (! isset($conference['endDate'])) { |
|
58 | + if (!isset($conference['endDate'])) { |
|
59 | 59 | $conference['endDate'] = $conference['startDate']; |
60 | 60 | } |
61 | 61 | $cfp->eventEndDate = new DateTimeImmutable( |
62 | - $conference['endDate'] . ' 17:00:00', |
|
62 | + $conference['endDate'].' 17:00:00', |
|
63 | 63 | new DateTimeZone($cfp->timezone) |
64 | 64 | ); |
65 | 65 | |
66 | 66 | $cfp->dateEnd = new DateTimeImmutable( |
67 | - $conference['cfpEndDate'] . ' 23:59:59', |
|
67 | + $conference['cfpEndDate'].' 23:59:59', |
|
68 | 68 | new DateTimeZone($cfp->timezone) |
69 | 69 | ); |
70 | 70 |