Passed
Push — master ( 67c359...bd01b7 )
by Kacper
09:26 queued 04:15
created
Parser/UnprocessedTokens.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         foreach (array_keys($this->_pending) as $position) {
64 64
             uasort(
65 65
                 $this->_tokens[$position],
66
-                Token::class . '::compare'
66
+                Token::class.'::compare'
67 67
             );
68 68
         }
69 69
         $this->_pending = [];
Please login to merge, or discard this patch.
bin/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     protected function getDefaultInputDefinition()
68 68
     {
69 69
         $input = parent::getDefaultInputDefinition();
70
-        $input->setOptions(array_filter($input->getOptions(), function (InputOption $option) {
70
+        $input->setOptions(array_filter($input->getOptions(), function(InputOption $option) {
71 71
             return $option->getShortcut() != 'q';
72 72
         }));
73 73
         $input->addOption(new InputOption('no-output', 's', InputOption::VALUE_NONE, 'Disables output, useful for debug'));
Please login to merge, or discard this patch.
bin/VerboseOutput.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
         }
84 84
 
85 85
         if ($this->wants('detailed-time')) {
86
-            $this->_slashed('Times             [s]', array_map(function ($t) {
86
+            $this->_slashed('Times             [s]', array_map(function($t) {
87 87
                 return number_format($t, 5);
88 88
             }, $this->_times));
89
-            $this->_slashed('Performance [chars/s]', array_map(function ($t) {
89
+            $this->_slashed('Performance [chars/s]', array_map(function($t) {
90 90
                 return number_format(strlen($this->_source) / $t);
91 91
             }, $this->_times));
92 92
         }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         }
97 97
 
98 98
         if ($this->wants('density')) {
99
-            $this->_slashed('Token density [tokens/kB]', array_map(function ($c) {
99
+            $this->_slashed('Token density [tokens/kB]', array_map(function($c) {
100 100
                 return number_format($c / strlen($this->_source) * 1024, 1);
101 101
             }, $this->_counts));
102 102
         }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
     protected function tokenize()
113 113
     {
114
-        $tokens = $this->benchmark(function () {
114
+        $tokens = $this->benchmark(function() {
115 115
             return $this->_language->tokenize($this->_source);
116 116
         }, $this->_times['tokenization']);
117 117
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
     protected function parse(Tokens $tokens)
142 142
     {
143
-        $tokens = $this->benchmark(function () use ($tokens) {
143
+        $tokens = $this->benchmark(function() use ($tokens) {
144 144
             return $this->_language->parse($tokens);
145 145
         }, $this->_times['parsing']);
146 146
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
     protected function format(Tokens $tokens)
156 156
     {
157
-        return $this->benchmark(function () use ($tokens) {
157
+        return $this->benchmark(function() use ($tokens) {
158 158
             return $this->_formatter->format($tokens);
159 159
         }, $this->_times['formatting']);
160 160
     }
@@ -163,10 +163,10 @@  discard block
 block discarded – undo
163 163
     {
164 164
         $this->_output->writeln(sprintf(
165 165
             "$message %s: %s",
166
-            implode(' / ', array_map(function ($f) {
166
+            implode(' / ', array_map(function($f) {
167 167
                 return "<comment>{$f}</comment>";
168 168
             }, array_keys($data))),
169
-            implode(' / ', array_map(function ($f) {
169
+            implode(' / ', array_map(function($f) {
170 170
                 return "<info>{$f}</info>";
171 171
             }, array_values($data)))
172 172
         ));
Please login to merge, or discard this patch.
bin/Commands/Dev/GenerateTableCommand.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
         if ($input->getOption('dry')) {
31 31
             $output->writeln($this->generate());
32 32
         } else {
33
-            $path = __DIR__ . '/../../../Docs/A-languages.md';
33
+            $path = __DIR__.'/../../../Docs/A-languages.md';
34 34
 
35 35
             $output->writeln("<info>Opening file ./Docs/A-languages.md ...</info>", OutputInterface::VERBOSITY_VERBOSE);
36 36
             $content = file_get_contents($path);
37 37
             file_put_contents($path, preg_replace(
38 38
                 '/^<!-- aliasbegin -->\R.*?^<!-- aliasend -->\R/ms',
39
-                "<!-- aliasbegin -->\n" . $this->generate() . "<!-- aliasend -->\n",
39
+                "<!-- aliasbegin -->\n".$this->generate()."<!-- aliasend -->\n",
40 40
                 $content
41 41
             ));
42 42
             $output->writeln("<info>Closing file ./Docs/A-languages.md ...</info>", OutputInterface::VERBOSITY_VERBOSE);
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 
64 64
         ksort($result);
65 65
 
66
-        $return  =  "Class | Name | MIME | Extension\n";
67
-        $return .=  "------|------|------|----------\n";
66
+        $return  = "Class | Name | MIME | Extension\n";
67
+        $return .= "------|------|------|----------\n";
68 68
         foreach ($result as $class => $aliases) {
69
-            $return .= '`' . $class . '` | ';
70
-            $return .= (isset($aliases['name']) ? '`' . implode('`, `', $aliases['name']) . '`' : 'none') . ' | ';
71
-            $return .= (isset($aliases['mime']) ? '`' . implode('`, `', $aliases['mime']) . '`' : 'none') . ' | ';
72
-            $return .= (isset($aliases['extension']) ? '`' . implode('`, `', $aliases['extension']) . '`' : 'none') . "\n";
69
+            $return .= '`'.$class.'` | ';
70
+            $return .= (isset($aliases['name']) ? '`'.implode('`, `', $aliases['name']).'`' : 'none').' | ';
71
+            $return .= (isset($aliases['mime']) ? '`'.implode('`, `', $aliases['mime']).'`' : 'none').' | ';
72
+            $return .= (isset($aliases['extension']) ? '`'.implode('`, `', $aliases['extension']).'`' : 'none')."\n";
73 73
         }
74 74
 
75 75
         return $return;
Please login to merge, or discard this patch.
bin/Commands/HighlightCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
                 'debug',
44 44
                 'd',
45 45
                 InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
46
-                'Debug features: ' . implode(', ', array_map(function ($f) {
46
+                'Debug features: '.implode(', ', array_map(function($f) {
47 47
                     return "<info>{$f}</info>";
48 48
                 }, $this->_debug))
49 49
             )
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
58 58
         }
59 59
 
60
-        $output->writeln($this->getApplication()->getLongVersion() . "\n", Output::VERBOSITY_VERBOSE);
60
+        $output->writeln($this->getApplication()->getLongVersion()."\n", Output::VERBOSITY_VERBOSE);
61 61
         $formatter = KeyLighter::get()->getFormatter($input->getOption('format')) ?: KeyLighter::get()->getDefaultFormatter();
62 62
 
63 63
         foreach ($input->getArgument('path') as $filename) {
Please login to merge, or discard this patch.
bin/Commands/Test/RegenerateCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
         $this->_keylighter = KeyLighter::get();
40 40
         $this->_formatter  = new TestFormatter();
41 41
 
42
-        $this->_input  = realpath(__DIR__ . '/../../../Tests/Samples');
43
-        $this->_output = realpath(__DIR__ . '/../../../Tests/Expected/Test');
42
+        $this->_input  = realpath(__DIR__.'/../../../Tests/Samples');
43
+        $this->_output = realpath(__DIR__.'/../../../Tests/Expected/Test');
44 44
     }
45 45
 
46 46
     protected function execute(InputInterface $input, OutputInterface $output)
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
             if ($this->review($input, $output, $tokens, $reviewer)) {
71 71
                 $result = StringHelper::normalize($this->_formatter->format($tokens));
72 72
 
73
-                if (!file_exists($this->_output . '/' . dirname($pathname))) {
74
-                    mkdir($this->_output . '/' . dirname($pathname), 0755, true);
73
+                if (!file_exists($this->_output.'/'.dirname($pathname))) {
74
+                    mkdir($this->_output.'/'.dirname($pathname), 0755, true);
75 75
                 }
76 76
 
77 77
                 file_put_contents("{$this->_output}/$pathname.tkn", $result);
Please login to merge, or discard this patch.
bin/Commands/LanguagesCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     protected function configure()
33 33
     {
34 34
         $this->setName('languages')
35
-            ->addArgument('by', InputArgument::OPTIONAL, 'Alias type, one of ' . implode(', ', array_map(function ($f) {
35
+            ->addArgument('by', InputArgument::OPTIONAL, 'Alias type, one of '.implode(', ', array_map(function($f) {
36 36
                 return "<info>{$f}</info>";
37 37
             }, $this->types)), 'name')
38 38
             ->addOption('no-group', 'g', InputOption::VALUE_NONE, 'Do not group languages by type')
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
             $table->setHeaders([ucfirst($input->getArgument('by')), $input->getOption('classes') ? 'Class name' : 'Language']);
53 53
         }
54 54
 
55
-        $table->setRows(array_map(function ($language) {
55
+        $table->setRows(array_map(function($language) {
56 56
             return [
57
-                implode(', ', array_map(function ($f) {
57
+                implode(', ', array_map(function($f) {
58 58
                     return "<comment>{$f}</comment>";
59 59
                 }, $language['aliases'])),
60 60
                 $language['class']
Please login to merge, or discard this patch.
bin/Commands/FormattersCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
             $table->setHeaders(['Name', 'Formatter']);
45 45
         }
46 46
 
47
-        $table->setRows(array_map(function ($alias, $class) {
47
+        $table->setRows(array_map(function($alias, $class) {
48 48
             return [
49 49
                 "<comment>{$alias}</comment>",
50 50
                 get_class($class)
Please login to merge, or discard this patch.
Matcher/CommentMatcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function __construct(array $singleLine = null, array $multiLine = null)
33 33
     {
34 34
         $this->singleLine = $singleLine ?: [];
35
-        $this->multiLine  = $multiLine  ?: [];
35
+        $this->multiLine  = $multiLine ?: [];
36 36
     }
37 37
 
38 38
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $all = [];
51 51
 
52 52
         foreach ($this->multiLine as $name => $comment) {
53
-            $comment = array_map(function ($e) {
53
+            $comment = array_map(function($e) {
54 54
                 return preg_quote($e, '/');
55 55
             }, $comment);
56 56
 
Please login to merge, or discard this patch.