@@ -77,7 +77,7 @@  | 
                                                    ||
| 77 | 77 |              $output->writeln('Fetching data for version...'); | 
                                                        
| 78 | 78 | $generator = TgScraper::fromVersion($logger, $version);  | 
                                                        
| 79 | 79 |          } catch (Throwable $e) { | 
                                                        
| 80 | - $logger->critical((string)$e);  | 
                                                        |
| 80 | + $logger->critical((string) $e);  | 
                                                        |
| 81 | 81 | return Command::FAILURE;  | 
                                                        
| 82 | 82 | }  | 
                                                        
| 83 | 83 |          $output->writeln('Exporting schema from data...'); | 
                                                        
@@ -62,7 +62,7 @@ discard block  | 
                                                    ||
| 62 | 62 | |
| 63 | 63 | protected function execute(InputInterface $input, OutputInterface $output): int  | 
                                                        
| 64 | 64 |      { | 
                                                        
| 65 | -        $versionReplacer = function (string $ver) { | 
                                                        |
| 65 | +        $versionReplacer = function(string $ver) { | 
                                                        |
| 66 | 66 | /** @noinspection PhpUndefinedFieldInspection */  | 
                                                        
| 67 | 67 | $this->version = $ver;  | 
                                                        
| 68 | 68 | };  | 
                                                        
@@ -79,7 +79,7 @@ discard block  | 
                                                    ||
| 79 | 79 | mkdir($destination . '/openapi/yaml', 0755, true);  | 
                                                        
| 80 | 80 | mkdir($destination . '/stubs', 0755, true);  | 
                                                        
| 81 | 81 |          } catch (Exception $e) { | 
                                                        
| 82 | - $logger->critical((string)$e);  | 
                                                        |
| 82 | + $logger->critical((string) $e);  | 
                                                        |
| 83 | 83 | return Command::FAILURE;  | 
                                                        
| 84 | 84 | }  | 
                                                        
| 85 | 85 | $versions = array_keys(  | 
                                                        
@@ -94,7 +94,7 @@ discard block  | 
                                                    ||
| 94 | 94 | $logger->info($version . ': Fetching data...');  | 
                                                        
| 95 | 95 | $generator = TgScraper::fromVersion($logger, $version);  | 
                                                        
| 96 | 96 |              } catch (Throwable $e) { | 
                                                        
| 97 | - $logger->critical((string)$e);  | 
                                                        |
| 97 | + $logger->critical((string) $e);  | 
                                                        |
| 98 | 98 | return Command::FAILURE;  | 
                                                        
| 99 | 99 | }  | 
                                                        
| 100 | 100 | $versionReplacer->call($generator, $version);  | 
                                                        
@@ -153,7 +153,7 @@  | 
                                                    ||
| 153 | 153 | 'name' => $this->name,  | 
                                                        
| 154 | 154 | 'types' => $this->types,  | 
                                                        
| 155 | 155 | 'optional' => $this->optional,  | 
                                                        
| 156 | - 'description' => (string)$this->description,  | 
                                                        |
| 156 | + 'description' => (string) $this->description,  | 
                                                        |
| 157 | 157 | ];  | 
                                                        
| 158 | 158 | $defaultValue = $this->getDefaultValue();  | 
                                                        
| 159 | 159 |          if (null !== $defaultValue) { | 
                                                        
@@ -275,7 +275,7 @@  | 
                                                    ||
| 275 | 275 |          $phrases = explode('.', $description); | 
                                                        
| 276 | 276 | $phrases = array_filter(  | 
                                                        
| 277 | 277 | $phrases,  | 
                                                        
| 278 | -            function ($phrase) { | 
                                                        |
| 278 | +            function($phrase) { | 
                                                        |
| 279 | 279 | return (false !== stripos($phrase, 'returns') or false !== stripos($phrase, 'is returned'));  | 
                                                        
| 280 | 280 | }  | 
                                                        
| 281 | 281 | );  | 
                                                        
@@ -24,7 +24,7 @@ discard block  | 
                                                    ||
| 24 | 24 | |
| 25 | 25 | public function getDefaultValue(): mixed  | 
                                                        
| 26 | 26 |      { | 
                                                        
| 27 | - $description = (string)$this;  | 
                                                        |
| 27 | + $description = (string) $this;  | 
                                                        |
| 28 | 28 |          if (stripos($description, 'must be') !== false) { | 
                                                        
| 29 | 29 |              $text = explode('must be ', $this->dom->html())[1] ?? ''; | 
                                                        
| 30 | 30 |              if (!empty($text)) { | 
                                                        
@@ -50,7 +50,7 @@ discard block  | 
                                                    ||
| 50 | 50 | return str_replace(['“', '”'], ['', ''], $value);  | 
                                                        
| 51 | 51 | }  | 
                                                        
| 52 | 52 |          if (is_numeric($value)) { | 
                                                        
| 53 | - return (int)$value;  | 
                                                        |
| 53 | + return (int) $value;  | 
                                                        |
| 54 | 54 | }  | 
                                                        
| 55 | 55 |          if (strtolower($value) == 'true') { | 
                                                        
| 56 | 56 | return true;  | 
                                                        
@@ -233,7 +233,7 @@  | 
                                                    ||
| 233 | 233 | ];  | 
                                                        
| 234 | 234 | $default = $field['default'] ?? null;  | 
                                                        
| 235 | 235 |                      if (!empty($default)) { | 
                                                        
| 236 | - $data['value'] = (string)$default;  | 
                                                        |
| 236 | + $data['value'] = (string) $default;  | 
                                                        |
| 237 | 237 | }  | 
                                                        
| 238 | 238 | $formData[] = $data;  | 
                                                        
| 239 | 239 | }  | 
                                                        
@@ -105,7 +105,7 @@  | 
                                                    ||
| 105 | 105 | $client = new Client();  | 
                                                        
| 106 | 106 |          try { | 
                                                        
| 107 | 107 | $html = $client->get($url)->getBody();  | 
                                                        
| 108 | - $dom = HtmlDomParser::str_get_html((string)$html);  | 
                                                        |
| 108 | + $dom = HtmlDomParser::str_get_html((string) $html);  | 
                                                        |
| 109 | 109 |          } catch (GuzzleException $e) { | 
                                                        
| 110 | 110 |              $logger->critical(sprintf('Unable to load data from URL "%s": %s', $url, $e->getMessage())); | 
                                                        
| 111 | 111 | throw $e;  |