Completed
Push — master ( e3e862...b1f297 )
by Andreas
25s queued 10s
created
src/Parser/PapercallIo/EventStartDate.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,19 +56,19 @@  discard block
 block discarded – undo
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(PHP_EOL, $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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Parser/PapercallIo/EventEndDate.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,29 +57,29 @@
 block discarded – undo
57 57
         $xpath = new DOMXPath($dom);
58 58
         $titlePath = $xpath->query("//h1[contains(@class, 'subheader__subtitle')]");
59 59
 
60
-        if (! $titlePath || $titlePath->length == 0) {
60
+        if (!$titlePath || $titlePath->length == 0) {
61 61
             return $cfp;
62 62
         }
63 63
 
64 64
         $locationTimeString = trim($titlePath->item(0)->textContent);
65 65
         $locationTime = explode(PHP_EOL, $locationTimeString);
66 66
 
67
-        if (! isset($locationTime[1])) {
67
+        if (!isset($locationTime[1])) {
68 68
             return $cfp;
69 69
         }
70 70
 
71 71
         $dates = explode(',', $locationTime[1]);
72
-        if (count($dates) % 2  !== 0) {
72
+        if (count($dates) % 2 !== 0) {
73 73
             return $cfp;
74 74
         }
75 75
 
76
-        $datestring = $dates[0] . ', ' . $dates[1];
76
+        $datestring = $dates[0].', '.$dates[1];
77 77
 
78 78
         if (count($dates) >= 4) {
79
-            $datestring = $dates[2] . ', ' . $dates[3];
79
+            $datestring = $dates[2].', '.$dates[3];
80 80
         }
81 81
 
82
-        $endDate = new DateTimeImmutable($datestring . ' 00:00:00', $timezone);
82
+        $endDate = new DateTimeImmutable($datestring.' 00:00:00', $timezone);
83 83
         $cfp->eventEndDate = $endDate;
84 84
 
85 85
         return $cfp;
Please login to merge, or discard this patch.
src/Command/AbstractParseEvents.php 2 patches
Unused Use Statements   -9 removed lines patch added patch discarded remove patch
@@ -32,17 +32,8 @@
 block discarded – undo
32 32
 use Callingallpapers\CfpFilter\FilterList;
33 33
 use Callingallpapers\CfpFilter\FollowUriRedirect;
34 34
 use Callingallpapers\CfpFilter\StripParamsFromUri;
35
-use Callingallpapers\ErrorHandling\ErrorStore;
36
-use Callingallpapers\Exception\UnverifiedUriException;
37
-use Callingallpapers\Parser\ConfsTech\ConferenceParser;
38
-use Callingallpapers\Parser\ConfsTechParser;
39
-use Callingallpapers\Parser\JoindinCfpParser;
40
-use Callingallpapers\Parser\Lanyrd\LanyrdCfpParser;
41
-use Callingallpapers\Parser\PapercallIo\PapercallIoParserFactory;
42 35
 use Callingallpapers\Parser\ParserInterface;
43 36
 use Callingallpapers\ResultKeeper\ConsoleOutputResultKeeper;
44
-use Callingallpapers\ResultKeeper\ResultKeeper;
45
-use Callingallpapers\Service\ConfsTechParserFactory;
46 37
 use Callingallpapers\Service\GeolocationService;
47 38
 use Callingallpapers\Service\ServiceContainer;
48 39
 use Callingallpapers\Service\TimezoneService;
Please login to merge, or discard this 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.
src/Subcommands/Sessionize/Parser/Sessionize.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,6 @@
 block discarded – undo
26 26
     }
27 27
 
28 28
     /**
29
-     * @param WriterInterface $output
30 29
      *
31 30
      * @return CfpList
32 31
      */
Please login to merge, or discard this 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/EntryParser.php 2 patches
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]>
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             $content = preg_replace('/\<!DOCTYPE[^\>]*?\>/im', '', $content);
46 46
 
47 47
             $dom->loadHTML(
48
-                '<?xml version="1.0" encoding="UTF-8" ?>' . $content,
48
+                '<?xml version="1.0" encoding="UTF-8" ?>'.$content,
49 49
                 LIBXML_NOBLANKS ^ LIBXML_NOERROR ^ LIBXML_NOENT
50 50
             );
51 51
             $dom->preserveWhiteSpace = false;
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -11,12 +11,10 @@
 block discarded – undo
11 11
 
12 12
 use Callingallpapers\Entity\Cfp;
13 13
 use Callingallpapers\Service\ServiceContainer;
14
-use Callingallpapers\Service\TimezoneService;
15 14
 use DateTimeZone;
16 15
 use DOMDocument;
17 16
 use DOMXPath;
18 17
 use Exception;
19
-use GuzzleHttp\Client;
20 18
 use InvalidArgumentException;
21 19
 use Throwable;
22 20
 
Please login to merge, or discard this patch.
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.