{"action":"closed","issue":{"url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/issues/739","labels_url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/issues/739/labels{/name}","comments_url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/issues/739/comments","events_url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/issues/739/events","html_url":"https://github.com/hechoendrupal/DrupalConsole/issues/739","id":93605531,"number":739,"title":"[insight] Code violations","user":{"login":"jmolivas","id":366275,"avatar_url":"https://avatars.githubusercontent.com/u/366275?v=3","gravatar_id":"","url":"https://api.github.com/users/jmolivas","html_url":"https://github.com/jmolivas","followers_url":"https://api.github.com/users/jmolivas/followers","following_url":"https://api.github.com/users/jmolivas/following{/other_user}","gists_url":"https://api.github.com/users/jmolivas/gists{/gist_id}","starred_url":"https://api.github.com/users/jmolivas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmolivas/subscriptions","organizations_url":"https://api.github.com/users/jmolivas/orgs","repos_url":"https://api.github.com/users/jmolivas/repos","events_url":"https://api.github.com/users/jmolivas/events{/privacy}","received_events_url":"https://api.github.com/users/jmolivas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/labels/fixed","name":"fixed","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/milestones/7","html_url":"https://github.com/hechoendrupal/DrupalConsole/milestones/0.8.0-release","labels_url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/milestones/7/labels","id":1195987,"number":7,"title":"0.8.0-release","description":"","creator":{"login":"jmolivas","id":366275,"avatar_url":"https://avatars.githubusercontent.com/u/366275?v=3","gravatar_id":"","url":"https://api.github.com/users/jmolivas","html_url":"https://github.com/jmolivas","followers_url":"https://api.github.com/users/jmolivas/followers","following_url":"https://api.github.com/users/jmolivas/following{/other_user}","gists_url":"https://api.github.com/users/jmolivas/gists{/gist_id}","starred_url":"https://api.github.com/users/jmolivas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmolivas/subscriptions","organizations_url":"https://api.github.com/users/jmolivas/orgs","repos_url":"https://api.github.com/users/jmolivas/repos","events_url":"https://api.github.com/users/jmolivas/events{/privacy}","received_events_url":"https://api.github.com/users/jmolivas/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":5,"state":"open","created_at":"2015-07-07T01:22:31Z","updated_at":"2015-07-07T20:09:25Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-07-07T19:08:28Z","updated_at":"2015-07-07T20:09:25Z","closed_at":"2015-07-07T20:09:25Z","body":"**[in src/EventSubscriber/ShowGenerateChainListener.php, line 64](https://github.com/hechoendrupal/DrupalConsole/blob/0854d8bb6ea53a24baa1c575bfb122910b68ae26/src/EventSubscriber/ShowGenerateChainListener.php#L64)**\r\n\r\n> Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.\r\n\r\n```php\r\n\r\n        if ($command instanceof GeneratorCommand) {\r\n            $completedMessageKey = 'application.console.messages.generated.completed';\r\n        }\r\n\r\n        //print_r($command->getDefinition()->getArguments());\r\n        //print_r($command->getDefinition()->getOptions());\r\n\r\n        // get the input instance\r\n        $input = $event->getInput();\r\n\r\n```\r\n\r\n---------------------\r\n\r\n**[in src/EventSubscriber/ShowGenerateChainListener.php, line 65](https://github.com/hechoendrupal/DrupalConsole/blob/0854d8bb6ea53a24baa1c575bfb122910b68ae26/src/EventSubscriber/ShowGenerateChainListener.php#L65)**\r\n\r\n> Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.\r\n\r\n```php\r\n        if ($command instanceof GeneratorCommand) {\r\n            $completedMessageKey = 'application.console.messages.generated.completed';\r\n        }\r\n\r\n        //print_r($command->getDefinition()->getArguments());\r\n        //print_r($command->getDefinition()->getOptions());\r\n\r\n        // get the input instance\r\n        $input = $event->getInput();\r\n\r\n        //Get options list\r\n```\r\n\r\n---------------------\r\n\r\n**[in src/EventSubscriber/ShowGenerateChainListener.php, line 61](https://github.com/hechoendrupal/DrupalConsole/blob/0854d8bb6ea53a24baa1c575bfb122910b68ae26/src/EventSubscriber/ShowGenerateChainListener.php#L61)**\r\n\r\n> This `completedMessageKey` local variable is declared but never used. You should remove it.\r\n\r\n```php\r\n        }\r\n\r\n        $completedMessageKey = 'application.console.messages.completed';\r\n\r\n        if ($command instanceof GeneratorCommand) {\r\n            $completedMessageKey = 'application.console.messages.generated.completed';\r\n        }\r\n\r\n        //print_r($command->getDefinition()->getArguments());\r\n        //print_r($command->getDefinition()->getOptions());\r\n\r\n```\r\n\r\n---------------------\r\n\r\n**[in CodeQualityTool.php, line 19](https://github.com/hechoendrupal/DrupalConsole/blob/0854d8bb6ea53a24baa1c575bfb122910b68ae26/CodeQualityTool.php#L19)**\r\n\r\n> This `input` attribute is declared but never used. You should remove it.\r\n\r\n```php\r\n * http://carlosbuenosvinos.com/write-your-git-hooks-in-php-and-keep-them-under-git-control/\r\n */\r\nclass CodeQualityTool extends Application\r\n{\r\n    private $output;\r\n    private $input;\r\n\r\n    const PHP_FILES_IN_SRC = '/^src\\/(.*)(\\.php)$/';\r\n    const PHP_FILES_IN_CLASSES = '/^classes\\/(.*)(\\.php)$/';\r\n\r\n    public function __construct()\r\n```\r\n\r\n---------------------\r\n\r\n**[in src/Command/YamlMergeCommand.php, line 111](https://github.com/hechoendrupal/DrupalConsole/blob/0854d8bb6ea53a24baa1c575bfb122910b68ae26/src/Command/YamlMergeCommand.php#L111)**\r\n\r\n> This `site_url` local variable is declared but never used. You should remove it.\r\n\r\n```php\r\n        $dialog = $this->getDialogHelper();\r\n\r\n      // --yaml-destination option\r\n        $yaml_destination = $input->getArgument('yaml-destination');\r\n        if (!$yaml_destination) {\r\n            $site_url = $dialog->askAndValidate(\r\n                $output,\r\n                $dialog->getQuestion($this->trans('commands.yaml.merge.questions.yaml-destination'), ''),\r\n                $validator_filename,\r\n                false,\r\n                null\r\n```\r\n\r\n---------------------\r\n\r\n**[in src/EventSubscriber/DefaultValueEventListener.php, line 10](https://github.com/hechoendrupal/DrupalConsole/blob/0854d8bb6ea53a24baa1c575bfb122910b68ae26/src/EventSubscriber/DefaultValueEventListener.php#L10)**\r\n\r\n> The class `Drupal\\AppConsole\\Command\\Helper\\TranslatorHelper` is declared but never used. You should remove the `use` statement.\r\n\r\n```php\r\n * Contains \\Drupal\\AppConsole\\EventSubscriber\\DefaultValueEventListener.\r\n */\r\n\r\nnamespace Drupal\\AppConsole\\EventSubscriber;\r\n\r\nuse Drupal\\AppConsole\\Command\\Helper\\TranslatorHelper;\r\nuse Symfony\\Component\\Console\\ConsoleEvents;\r\nuse Symfony\\Component\\Console\\Event\\ConsoleCommandEvent;\r\nuse Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;\r\n\r\nclass DefaultValueEventListener implements EventSubscriberInterface\r\n```\r\n\r\n---------------------\r\n\r\n**[in config/translations/console.en.yml, line 666](https://github.com/hechoendrupal/DrupalConsole/blob/0854d8bb6ea53a24baa1c575bfb122910b68ae26/config/translations/console.en.yml#L666)**\r\n\r\n> This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.\r\n\r\n```\r\n        wrong-parse: \"Yaml file '%s' is empty or doesn\\'t exist the file.\"\r\n        error-parsing: 'An error occurs during parsing of Yaml file \"%s\".'\r\n        two-files-required: 'At least two files are required.'\r\n        error-generating: 'Error generating merged YAML.'\r\n        error-writing: 'Error writing merged YAML file.'\r\n        merged: 'New file \"%s\" was created sucessfully after merge Yaml files.'\r\n```\r\n\r\n---------------------\r\n"}}