@@ -42,11 +42,11 @@ discard block |
||
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 |
||
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) |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | $start = new \DateTime($input->getOption('start')); |
77 | 77 | |
78 | - if (! $start instanceof \DateTime) { |
|
78 | + if (!$start instanceof \DateTime) { |
|
79 | 79 | throw new \InvalidArgumentException('The given date could not be parsed'); |
80 | 80 | } |
81 | 81 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | ], |
86 | 86 | ]); |
87 | 87 | |
88 | - $config = parse_ini_file(__DIR__ . '/../../config/callingallpapers.ini'); |
|
88 | + $config = parse_ini_file(__DIR__.'/../../config/callingallpapers.ini'); |
|
89 | 89 | $writer = new ApiCfpWriter($config['event_api_url'], $config['event_api_token'], $client); |
90 | 90 | $writer->setOutput($output); |
91 | 91 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | public function parse($dom, $xpath) |
36 | 36 | { |
37 | 37 | $closingDate = $xpath->query("//span[text()='Closes on:']/following-sibling::strong"); |
38 | - if (! $closingDate || $closingDate->length == 0) { |
|
38 | + if (!$closingDate || $closingDate->length == 0) { |
|
39 | 39 | throw new \InvalidArgumentException('The CfP does not seem to have a closing date'); |
40 | 40 | } |
41 | 41 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $tags = $xpath->query( |
38 | 38 | "//ul[contains(@class, \"tags\")]/li/a" |
39 | 39 | ); |
40 | - if (! $tags || $tags->length == 0) { |
|
40 | + if (!$tags || $tags->length == 0) { |
|
41 | 41 | throw new \InvalidArgumentException('The CfP does not seem to have tags'); |
42 | 42 | } |
43 | 43 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | public function parse($dom, $xpath) |
36 | 36 | { |
37 | 37 | $endDate = $xpath->query("//div[contains(@class, 'vevent')]/*/abbr[contains(@class, 'dtend')]"); ///a/abbr[class='dtstart'] |
38 | - if (! $endDate || $endDate->length == 0) { |
|
38 | + if (!$endDate || $endDate->length == 0) { |
|
39 | 39 | throw new \InvalidArgumentException('The Event does not seem to have an end date'); |
40 | 40 | } |
41 | 41 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | { |
37 | 37 | $confPath = $xpath->query("//h3/a[contains(@class, 'summary')]"); |
38 | 38 | |
39 | - if (! $confPath || $confPath->length == 0) { |
|
39 | + if (!$confPath || $confPath->length == 0) { |
|
40 | 40 | throw new \InvalidArgumentException('The CfP does not seem to have an eventname'); |
41 | 41 | } |
42 | 42 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | public function parse($dom, $xpath) |
36 | 36 | { |
37 | 37 | $locations = $xpath->query("//div[contains(@class, 'vevent')]/p[contains(@class, 'location')]/a"); ///a/abbr[class='dtstart'] |
38 | - if (! $locations || $locations->length == 0) { |
|
38 | + if (!$locations || $locations->length == 0) { |
|
39 | 39 | throw new \InvalidArgumentException('The Event does not seem to have an end date'); |
40 | 40 | } |
41 | 41 | $location = []; |
@@ -35,7 +35,7 @@ |
||
35 | 35 | public function parse($dom, $xpath) |
36 | 36 | { |
37 | 37 | $startDate = $xpath->query("//div[contains(@class, 'vevent')]/*/abbr[contains(@class, 'dtstart')]"); ///a/abbr[class='dtstart'] |
38 | - if (! $startDate || $startDate->length == 0) { |
|
38 | + if (!$startDate || $startDate->length == 0) { |
|
39 | 39 | throw new \InvalidArgumentException('The Event does not seem to have a start date'); |
40 | 40 | } |
41 | 41 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | { |
37 | 37 | $uriPath = $xpath->query("//a[contains(@title, 'visit their website')]"); |
38 | 38 | |
39 | - if (! $uriPath || $uriPath->length == 0) { |
|
39 | + if (!$uriPath || $uriPath->length == 0) { |
|
40 | 40 | throw new \InvalidArgumentException('The CfP does not seem to have an EventUri'); |
41 | 41 | } |
42 | 42 |
@@ -47,14 +47,14 @@ discard block |
||
47 | 47 | $content = json_decode($content, true); |
48 | 48 | |
49 | 49 | foreach ($content['events'] as $event) { |
50 | - if (! $event['cfp_url']) { |
|
50 | + if (!$event['cfp_url']) { |
|
51 | 51 | continue; |
52 | 52 | } |
53 | 53 | $info = new Cfp(); |
54 | 54 | $info->conferenceName = $event['name']; |
55 | 55 | $info->conferenceUri = $event['href']; |
56 | 56 | if ($event['icon']) { |
57 | - $info->iconUri = 'https://joind.in/inc/img/event_icons/' . $event['icon']; |
|
57 | + $info->iconUri = 'https://joind.in/inc/img/event_icons/'.$event['icon']; |
|
58 | 58 | } |
59 | 59 | $info->eventEndDate = new \DateTimeImmutable($event['end_date']); |
60 | 60 | $info->eventStartDate = new \DateTimeImmutable($event['start_date']); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $info->longitude = $event['longitude']; |
67 | 67 | $info->tags = $event['tags']; |
68 | 68 | $info->uri = $event['cfp_url']; |
69 | - $info->timezone = $event['tz_continent'] . '/' . $event['tz_place']; |
|
69 | + $info->timezone = $event['tz_continent'].'/'.$event['tz_place']; |
|
70 | 70 | |
71 | 71 | $writer->write($info, 'joind.in'); |
72 | 72 | } |