@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | class WriterFactory |
31 | 31 | { |
32 | - public $configFile = __DIR__ . '/../../config/callingallpapers.ini'; |
|
32 | + public $configFile = __DIR__.'/../../config/callingallpapers.ini'; |
|
33 | 33 | |
34 | 34 | public function getWriter() |
35 | 35 | { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | throw new UnknownWriterException('The requested writer could not be created'); |
43 | 43 | } |
44 | 44 | |
45 | - if (! $writer instanceof WriterInterface) { |
|
45 | + if (!$writer instanceof WriterInterface) { |
|
46 | 46 | throw new InvalidWriterException('The requested writer is not of the expected type'); |
47 | 47 | } |
48 | 48 |
@@ -63,7 +63,7 @@ |
||
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 |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | return $list; |
93 | 93 | } |
94 | 94 | |
95 | - if (! $items) { |
|
95 | + if (!$items) { |
|
96 | 96 | return $list; |
97 | 97 | } |
98 | 98 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $cfp->longitude = $item['longitude']; |
111 | 111 | $cfp->iconUri = $item['iconUri']; |
112 | 112 | $cfp->uri = $item['uri']; |
113 | - $cfp->tags = array_filter($item['tags'], function ($item) { |
|
113 | + $cfp->tags = array_filter($item['tags'], function($item) { |
|
114 | 114 | return (bool) $item; |
115 | 115 | }); |
116 | 116 | $cfp->timezone = $item['timezone']; |
@@ -105,7 +105,7 @@ |
||
105 | 105 | |
106 | 106 | public function addTag($tag) |
107 | 107 | { |
108 | - if (! in_array($tag, $this->tags)) { |
|
108 | + if (!in_array($tag, $this->tags)) { |
|
109 | 109 | $this->tags[] = $tag; |
110 | 110 | } |
111 | 111 | } |
@@ -66,11 +66,11 @@ |
||
66 | 66 | |
67 | 67 | $start = new \DateTime($input->getOption('start')); |
68 | 68 | |
69 | - if (! $start instanceof \DateTime) { |
|
69 | + if (!$start instanceof \DateTime) { |
|
70 | 70 | throw new \InvalidArgumentException('The given date could not be parsed'); |
71 | 71 | } |
72 | 72 | |
73 | - $config = parse_ini_file(__DIR__ . '/../../config/callingallpapers.ini'); |
|
73 | + $config = parse_ini_file(__DIR__.'/../../config/callingallpapers.ini'); |
|
74 | 74 | $reader = new ApiCfpReader($config['event_api_url'], $config['event_api_token']); |
75 | 75 | $cfps = $reader->getCfpsEndingWithinInterval( |
76 | 76 | new \DateInterval('PT1H'), |
@@ -47,18 +47,18 @@ |
||
47 | 47 | protected function configure() |
48 | 48 | { |
49 | 49 | $this->setName("notifyClosingCfps") |
50 | - ->setDescription("Notify about CfPs that close within 24 hours") |
|
51 | - ->setDefinition(array( |
|
52 | - new InputOption('start', 's', InputOption::VALUE_OPTIONAL, 'What should be the first date to be taken into account?', ''), |
|
53 | - )) |
|
54 | - ->setHelp(<<<EOT |
|
50 | + ->setDescription("Notify about CfPs that close within 24 hours") |
|
51 | + ->setDefinition(array( |
|
52 | + new InputOption('start', 's', InputOption::VALUE_OPTIONAL, 'What should be the first date to be taken into account?', ''), |
|
53 | + )) |
|
54 | + ->setHelp(<<<EOT |
|
55 | 55 | Notify about CfPs that are closing within 24 hours |
56 | 56 | |
57 | 57 | Usage: |
58 | 58 | |
59 | 59 | <info>callingallpapers notifyClosingCfp</info> |
60 | 60 | EOT |
61 | - ); |
|
61 | + ); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | protected function execute(InputInterface $input, OutputInterface $output): int |
@@ -41,7 +41,7 @@ |
||
41 | 41 | public function parse($dom, $xpath) |
42 | 42 | { |
43 | 43 | $openingDate = $xpath->query("//span[text()='Openend on:']/following-sibling::strong"); |
44 | - if (! $openingDate || $openingDate->length == 0) { |
|
44 | + if (!$openingDate || $openingDate->length == 0) { |
|
45 | 45 | throw new \UnexpectedValueException('No CfP-Open Date found'); |
46 | 46 | } |
47 | 47 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $uri = $xpath->query( |
38 | 38 | "//strong[contains(@class, \"call-open\")]/following-sibling::a" |
39 | 39 | ); |
40 | - if (! $uri || $uri->length == 0) { |
|
40 | + if (!$uri || $uri->length == 0) { |
|
41 | 41 | throw new \InvalidArgumentException('The CfP does not seem to have a CfP-Uri'); |
42 | 42 | } |
43 | 43 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | $content = file_Get_contents($uri); |
58 | 58 | $content = mb_convert_encoding($content, 'UTF-8'); |
59 | - $dom->loadHTML('<?xml version="1.0" charset="UTF-8" ?>' . $content); |
|
59 | + $dom->loadHTML('<?xml version="1.0" charset="UTF-8" ?>'.$content); |
|
60 | 60 | $dom->preserveWhiteSpace = false; |
61 | 61 | |
62 | 62 | $timezone = 'UTC'; |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | { |
156 | 156 | $confPath = $xpath->query("//h3/a[contains(@class, 'summary')]"); |
157 | 157 | |
158 | - if (! $confPath || $confPath->length == 0) { |
|
158 | + if (!$confPath || $confPath->length == 0) { |
|
159 | 159 | throw new \InvalidArgumentException('We can\'t find an EventPage'); |
160 | 160 | } |
161 | 161 | |
@@ -167,9 +167,9 @@ discard block |
||
167 | 167 | 'verify_peer_name' => false, |
168 | 168 | ] |
169 | 169 | ]); |
170 | - $content = file_get_contents('https://lanyrd.com' . $confPath->item(0)->attributes->getNamedItem('href')->textContent, false, $context); |
|
170 | + $content = file_get_contents('https://lanyrd.com'.$confPath->item(0)->attributes->getNamedItem('href')->textContent, false, $context); |
|
171 | 171 | $content = mb_convert_encoding($content, 'UTF-8'); |
172 | - $dom->loadHTML('<?xml version="1.0" charset="UTF-8" ?>' . $content); |
|
172 | + $dom->loadHTML('<?xml version="1.0" charset="UTF-8" ?>'.$content); |
|
173 | 173 | $dom->preserveWhiteSpace = false; |
174 | 174 | |
175 | 175 | return $dom; |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $xpath = new DOMXPath($dom); |
44 | 44 | $titlePath = $xpath->query("//h1[contains(@class, 'subheader__subtitle')]"); |
45 | 45 | |
46 | - if (! $titlePath || $titlePath->length == 0) { |
|
46 | + if (!$titlePath || $titlePath->length == 0) { |
|
47 | 47 | return $cfp; |
48 | 48 | } |
49 | 49 |