Completed
Pull Request — master (#115)
by Andreas
16s
created
src/Subcommands/Sessionize/Parser/EventEndDate.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,18 +30,18 @@
 block discarded – undo
30 30
         //$endDate = $xpath->query('//div[contains(text()[2], "event ends")]/following-sibling::h2');
31 31
         $startDate = $xpath->query('//div[contains(text(), "event ends")]');
32 32
 
33
-        if (! $startDate || $startDate->length == 0) {
33
+        if (!$startDate || $startDate->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
             $startDate = $xpath->query('//div[contains(text(), "event date")]');
37 37
         }
38
-        if (! $startDate || $startDate->length == 0) {
38
+        if (!$startDate || $startDate->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', $startDate->item(0)->parentNode);
43 43
 
44
-        if (! $startDate || $startDate->length == 0) {
44
+        if (!$startDate || $startDate->length == 0) {
45 45
             throw new \InvalidArgumentException('The Event does not seem to have an end date');
46 46
         }
47 47
 
Please login to merge, or discard this patch.
src/Subcommands/Sessionize/Parser/EventName.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Subcommands/Sessionize/Parser/OpeningDate.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Subcommands/Sessionize/Parser/EventStartDate.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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,18 +29,18 @@  discard block
 block discarded – undo
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
             throw new \InvalidArgumentException('The Event does not seem to have a start date-identifier');
39 39
         }
40 40
 
41
-        $startDate = $xpath->query('h2', $startDate->item($startDate->length-1)->parentNode);
41
+        $startDate = $xpath->query('h2', $startDate->item($startDate->length - 1)->parentNode);
42 42
 
43
-        if (! $startDate || $startDate->length == 0) {
43
+        if (!$startDate || $startDate->length == 0) {
44 44
             throw new \InvalidArgumentException('The Event does not seem to have a start date');
45 45
         }
46 46
 
Please login to merge, or discard this patch.
src/Subcommands/Sessionize/Parser/IconUri.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Subcommands/Sessionize/Parser/Sessionize.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,14 +50,14 @@
 block discarded – undo
50 50
         foreach ($nodes as $node) {
51 51
             $priority = $node->getElementsByTagName('priority');
52 52
             $priority = $priority->item(0);
53
-            if ((float)$priority->textContent <= 0.6) {
53
+            if ((float) $priority->textContent <= 0.6) {
54 54
                 continue;
55 55
             }
56 56
 
57 57
             $loc = $node->getElementsByTagName('loc');
58 58
             $loc = $loc->item(0);
59 59
 
60
-            if (! $loc->textContent) {
60
+            if (!$loc->textContent) {
61 61
                 continue;
62 62
             }
63 63
 
Please login to merge, or discard this patch.
src/Subcommands/Sessionize/Parser/ClosingDate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     {
31 31
         $closingDateHolder = $xpath->query('//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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Subcommands/Sessionize/Command.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
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]>
Please login to merge, or discard this patch.
src/Command/AbstractParseEvents.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,16 +83,16 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.