Completed
Pull Request — master (#16)
by Andreas
05:54
created
src/Command/ParseEvents.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
     protected function configure()
43 43
     {
44 44
         $this->setName("parseCfPs")
45
-             ->setDescription("Retrieve CfPs and parse them")
46
-             ->setDefinition(array(
47
-                 new InputOption('start', 's', InputOption::VALUE_OPTIONAL, 'What should be the first date to be taken into account?', ''),
48
-             ))
49
-             ->setHelp(<<<EOT
45
+                ->setDescription("Retrieve CfPs and parse them")
46
+                ->setDefinition(array(
47
+                    new InputOption('start', 's', InputOption::VALUE_OPTIONAL, 'What should be the first date to be taken into account?', ''),
48
+                ))
49
+                ->setHelp(<<<EOT
50 50
 Get details about CfPs from different sources
51 51
 
52 52
 Usage:
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 If you ommit the date the current date will be used instead
57 57
 <info>callingallpapers parseCfPs<env></info>
58 58
 EOT
59
-             );
59
+                );
60 60
     }
61 61
 
62 62
     protected function execute(InputInterface $input, OutputInterface $output)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,11 +67,11 @@
 block discarded – undo
67 67
 
68 68
         $start = new \DateTime($input->getOption('start'));
69 69
 
70
-        if (! $start instanceof \DateTime) {
70
+        if (!$start instanceof \DateTime) {
71 71
             throw new \InvalidArgumentException('The given date could not be parsed');
72 72
         }
73 73
 
74
-        $config = parse_ini_file(__DIR__ . '/../../config/callingallpapers.ini');
74
+        $config = parse_ini_file(__DIR__.'/../../config/callingallpapers.ini');
75 75
         $writer = new ApiCfpWriter($config['event_api_url'], $config['event_api_token']);
76 76
         $writer->setOutput($output);
77 77
 
Please login to merge, or discard this patch.
src/Parser/Lanyrd/Entry.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
             $content = file_Get_contents($uri);
56 56
             $content = mb_convert_encoding($content, 'UTF-8');
57
-            $dom->loadHTML('<?xml version="1.0" charset="UTF-8" ?>' . $content);
57
+            $dom->loadHTML('<?xml version="1.0" charset="UTF-8" ?>'.$content);
58 58
             $dom->preserveWhiteSpace = false;
59 59
 
60 60
             $xpath = new \DOMXPath($dom);
@@ -135,15 +135,15 @@  discard block
 block discarded – undo
135 135
     {
136 136
         $confPath = $xpath->query("//h3/a[contains(@class, 'summary')]");
137 137
 
138
-        if (! $confPath || $confPath->length == 0) {
138
+        if (!$confPath || $confPath->length == 0) {
139 139
             throw new \InvalidArgumentException('We can\'t find an EventPage');
140 140
         }
141 141
 
142 142
         $dom = new \DOMDocument('1.0', 'UTF-8');
143 143
 
144
-        $content = file_get_contents('https://lanyrd.com' . $confPath->item(0)->attributes->getNamedItem('href')->textContent);
144
+        $content = file_get_contents('https://lanyrd.com'.$confPath->item(0)->attributes->getNamedItem('href')->textContent);
145 145
         $content = mb_convert_encoding($content, 'UTF-8');
146
-        $dom->loadHTML('<?xml version="1.0" charset="UTF-8" ?>' . $content);
146
+        $dom->loadHTML('<?xml version="1.0" charset="UTF-8" ?>'.$content);
147 147
         $dom->preserveWhiteSpace = false;
148 148
 
149 149
         return $dom;
Please login to merge, or discard this patch.
src/Parser/Lanyrd/LanyrdCfpParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
         do {
48 48
             $dom = new \DOMDocument('1.0', 'UTF-8');
49
-            $dom->loadHTMLFile($uri . '?page=' . ($i+1));
49
+            $dom->loadHTMLFile($uri.'?page='.($i + 1));
50 50
             $dom->preserveWhiteSpace = false;
51 51
 
52 52
             $xpath = new \DOMXPath($dom);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
                     $eventPageUrl = $links->item(0)->attributes->getNamedItem('href')->textContent;
79 79
                     error_log($eventPageUrl);
80
-                    if (! $eventPageUrl) {
80
+                    if (!$eventPageUrl) {
81 81
                         continue;
82 82
                     }
83 83
                     $writer->write($lanyrdEntryParser->parse($eventPageUrl), 'lanyrd.com');
Please login to merge, or discard this patch.
src/Service/TimezoneService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 
64 64
         $values = json_decode($result->getBody()->getContents(), true);
65 65
 
66
-        if (! isset($values['status']) || $values['status'] !== 'OK') {
66
+        if (!isset($values['status']) || $values['status'] !== 'OK') {
67 67
             return 'UTC';
68 68
         }
69 69
 
Please login to merge, or discard this patch.