Your project uses discouraged functions to kill scripts 2
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.use_exit_function
- * @param AdapterInterface $console
- */
- public function __invoke(Route $route, AdapterInterface $console)
- {
- if (empty($this->config)) {
- exit('Unable to proceed because config data is missing.');
- }
- $table = new Table(['columnWidths' => [23, 21, 21, 100]]);
- $table->setAutoSeparate(Table::AUTO_SEPARATE_HEADER);
- $table->setPadding(1);
- LocationService::DATABASE_COUNTRY,
- ];
- }
- if (!array_key_exists($identifier, LocationService::DATABASES)) {
- exit(sprintf('Invalid database identifier: %s. Use one of the following identifiers: %s.',
- $identifier,
- implode(', ', self::getValidIdentifiers())
- ));
- }
Your project should not contain commented code 3
- Read doc
- Productivity
- Minor
More information: https://insight.symfony.com/what-we-analyse/php.commented_out_code
- $bytes[3] = '0';
- return implode('.', $bytes);
- }
- // if (filter_var($ipAddress, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
- // $bytes = explode(':', $ipAddress);
- // $bytes[count($bytes) - 1] = '0000';
- // return implode(':', $bytes);
- // }
- throw new Exception('Invalid IP address: ' . $ipAddress);
- return implode('.', $bytes);
- }
- // if (filter_var($ipAddress, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
- // $bytes = explode(':', $ipAddress);
- // $bytes[count($bytes) - 1] = '0000';
- // return implode(':', $bytes);
- // }
- throw new Exception('Invalid IP address: ' . $ipAddress);
- }
- }
- // if (filter_var($ipAddress, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
- // $bytes = explode(':', $ipAddress);
- // $bytes[count($bytes) - 1] = '0000';
- // return implode(':', $bytes);
- // }
- throw new Exception('Invalid IP address: ' . $ipAddress);
- }
- }