Passed
Branch 0.8.x (fca16e)
by Alexander
13:00
created
src/components/Encryption/EncryptionServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function register()
40 40
     {
41
-        $this->app->singleton('encrypter', function ($app) {            
41
+        $this->app->singleton('encrypter', function($app) {            
42 42
             $config = $app->make('config')->get('security');
43 43
             
44 44
             return new Encrypter($this->parseKey($config), $config['cipher']);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     protected function key(array $config)
74 74
     {
75
-        return take($config['key'], function ($key) {
75
+        return take($config['key'], function($key) {
76 76
             if (empty($key)) {
77 77
                 throw new RuntimeException('No application encryption key has been specified.');
78 78
             }            
Please login to merge, or discard this patch.
src/components/Encryption/Encrypter.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@
 block discarded – undo
232 232
         return hash_equals(
233 233
                     hash_hmac('sha256', $payload['hmac'], $bytes, true),
234 234
                     $calc
235
-               );
235
+                );
236 236
     }
237 237
 
238 238
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         if (static::supported($key, $cipher)) {
66 66
             $this->key    = $key;
67 67
             $this->cipher = $cipher;
68
-        } else   {
68
+        } else {
69 69
             throw new RuntimeException('The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths');
70 70
         }        
71 71
     }
Please login to merge, or discard this patch.
src/components/Console/Util/FormatUtil.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
         $text = '';
45 45
 
46 46
         $options = \array_merge([
47
-            'leftChar'    => '',   // e.g '  ', ' * '
48
-            'sepChar'     => ' ',  // e.g ' | ' OUT: key | value
49
-            'keyStyle'    => '',   // e.g 'info','comment'
50
-            'valStyle'    => '',   // e.g 'info','comment'
47
+            'leftChar'    => '', // e.g '  ', ' * '
48
+            'sepChar'     => ' ', // e.g ' | ' OUT: key | value
49
+            'keyStyle'    => '', // e.g 'info','comment'
50
+            'valStyle'    => '', // e.g 'info','comment'
51 51
             'keyMinWidth' => 8,
52 52
             'keyMaxWidth' => 0,
53 53
             'keyPadPos'   => 'right',
54
-            'ucFirst'     => true,  // upper first char for value
54
+            'ucFirst'     => true, // upper first char for value
55 55
         ], $options);
56 56
 
57 57
         $keyStyle  = \trim($options['keyStyle']);
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
                         $val = \is_scalar($val) ? (string) $val : $val;
87 87
                     }
88 88
 
89
-                    $temp .= ( ! \is_numeric($k) ? "$k: " : '') . "$val, ";
89
+                    $temp .= ( ! \is_numeric($k) ? "$k: " : '')."$val, ";
90 90
                 }
91 91
 
92
-                $value = \rtrim($temp, ' ,') . ']';
92
+                $value = \rtrim($temp, ' ,').']';
93 93
             } elseif (\is_bool($value)) {
94 94
                 $value = $value ? '(True)' : '(False)';
95 95
             } else {
Please login to merge, or discard this patch.
src/components/Console/Util/Table.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -36,15 +36,15 @@
 block discarded – undo
36 36
      * @param    
37 37
      */
38 38
     /**
39
- 	 * Returns a well formatted table.
40
- 	 *
41
- 	 * @param  array  $tbody  List of rows
42
- 	 * @param  array  $thead  List of columns
43
- 	 *
44
- 	 * @return void
45
- 	 */
46
- 	public static function table(array $tbody, array $thead = [])
47
- 	{
39
+     * Returns a well formatted table.
40
+     *
41
+     * @param  array  $tbody  List of rows
42
+     * @param  array  $thead  List of columns
43
+     *
44
+     * @return void
45
+     */
46
+        public static function table(array $tbody, array $thead = [])
47
+        {
48 48
  		
49
- 	}
49
+        }
50 50
 }
51 51
\ No newline at end of file
Please login to merge, or discard this patch.
src/components/Console/Style/TagStyle.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
         'blink'      => 5,
60 60
         'reverse'    => 7,
61 61
         'conceal'    => 8,
62
-	];
62
+    ];
63 63
 
64 64
     /**
65 65
      * Gets the background of CLI command.
Please login to merge, or discard this patch.
src/components/Console/Application.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -519,7 +519,7 @@
 block discarded – undo
519 519
      * 
520 520
      * @param  \Syscodes\Components\Console\Command\Command  $command  The command name
521 521
      * @param  \Syscodes\Components\Contracts\Console\Input\Input  $input  The input interface implemented
522
-	 * @param  \Syscodes\Components\Contracts\Console\Output\Output  $output  The output interface implemented
522
+     * @param  \Syscodes\Components\Contracts\Console\Output\Output  $output  The output interface implemented
523 523
      * 
524 524
      * @return int  0 if everything went fine, or an error code
525 525
      */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         try {
282 282
             $this->runningCommand = null;
283 283
             $command = $this->findCommand($name);
284
-        } catch(Throwable $e) {
284
+        } catch (Throwable $e) {
285 285
             if ( ! ($e instanceof CommandNotFoundException && ! $e instanceof NamespaceNotFoundException) || 1 !== \count($alternatives = $e->getAlternatives()) || ! $input->isInteractive()) {
286 286
                 throw $e;
287 287
             }
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
             
437 437
             if ($alternatives = $this->findCommandAlternatives($name, $allCommands)) {
438 438
                 // remove hidden commands
439
-                $alternatives = array_filter($alternatives, function ($name) {
439
+                $alternatives = array_filter($alternatives, function($name) {
440 440
                     return ! $this->get($name)->isHidden();
441 441
                 });
442 442
                 
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
 
583 583
             $commands = $this->commands;
584 584
             foreach ($this->commandLoader->getNames() as $name) {
585
-                if (!isset($commands[$name]) && $this->has($name)) {
585
+                if ( ! isset($commands[$name]) && $this->has($name)) {
586 586
                     $commands[$name] = $this->get($name);
587 587
                 }
588 588
             }
@@ -754,7 +754,7 @@  discard block
 block discarded – undo
754 754
             }
755 755
         }
756 756
         
757
-        $alternatives = array_filter($alternatives, function ($levenhtein) use ($threshold) { 
757
+        $alternatives = array_filter($alternatives, function($levenhtein) use ($threshold) { 
758 758
             return $levenhtein < 2 * $threshold; 
759 759
         });
760 760
         
Please login to merge, or discard this patch.
src/components/Console/Helper/Description/TextDescriptor.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,14 +67,14 @@
 block discarded – undo
67 67
         ), $options);
68 68
     }
69 69
 
70
-     /**
71
-     * Describes an InputOption instance.
72
-     * 
73
-     * @param  \Syscodes\Components\Console\Input\InputOption  $option  The option implemented
74
-     * @param  array  $options  The options of the console
75
-     * 
76
-     * @return void
77
-     */
70
+        /**
71
+         * Describes an InputOption instance.
72
+         * 
73
+         * @param  \Syscodes\Components\Console\Input\InputOption  $option  The option implemented
74
+         * @param  array  $options  The options of the console
75
+         * 
76
+         * @return void
77
+         */
78 78
     protected function describeOption(InputOption $option, array $options = [])
79 79
     {
80 80
         if ($option->isAcceptValue() && null !== $option->getDefault() && ( ! is_array($option->getDefault()) || count($option->getDefault()))) {
Please login to merge, or discard this patch.
src/components/Console/Concerns/InteractsIO.php 1 patch
Indentation   +121 added lines, -121 removed lines patch added patch discarded remove patch
@@ -27,136 +27,136 @@
 block discarded – undo
27 27
  */
28 28
 trait InteractsIO
29 29
 {
30
-	/**
31
-	 * The output interface implementation.
32
-	 * 
33
-	 * @var \Syscodes\Components\Contracts\Console\Output $output
34
-	 */
35
-	protected $output;
30
+    /**
31
+     * The output interface implementation.
32
+     * 
33
+     * @var \Syscodes\Components\Contracts\Console\Output $output
34
+     */
35
+    protected $output;
36 36
 	
37
-	/**
38
-	 * Enter a number of empty lines.
39
-	 * 
40
-	 * @param  int  $num  Number of lines to output
41
-	 * 
42
-	 * @return string
43
-	 */
44
-	public function newline(int $num = 1)
45
-	{
46
-		$this->newLine($num);
47
-	}
37
+    /**
38
+     * Enter a number of empty lines.
39
+     * 
40
+     * @param  int  $num  Number of lines to output
41
+     * 
42
+     * @return string
43
+     */
44
+    public function newline(int $num = 1)
45
+    {
46
+        $this->newLine($num);
47
+    }
48 48
 	
49
-	/**
50
-	 * Writes a string formatting for comment output.
51
-	 * 
52
-	 * @param  string  $message
53
-	 * 
54
-	 * @return void
55
-	 */
56
-	public function comment(string $message)
57
-	{
58
-		$this->commandline($message, 'comment');
59
-	}
49
+    /**
50
+     * Writes a string formatting for comment output.
51
+     * 
52
+     * @param  string  $message
53
+     * 
54
+     * @return void
55
+     */
56
+    public function comment(string $message)
57
+    {
58
+        $this->commandline($message, 'comment');
59
+    }
60 60
 
61
-	/**
62
-	 * Writes a string formatting for note output.
63
-	 * 
64
-	 * @param  string  $message
65
-	 * 
66
-	 * @return void
67
-	 */
68
-	public function note(string $message)
69
-	{
70
-		$this->commandline($message, 'note');
71
-	}
61
+    /**
62
+     * Writes a string formatting for note output.
63
+     * 
64
+     * @param  string  $message
65
+     * 
66
+     * @return void
67
+     */
68
+    public function note(string $message)
69
+    {
70
+        $this->commandline($message, 'note');
71
+    }
72 72
 	
73
-	/**
74
-	 * Writes a string formatting for success output.
75
-	 * 
76
-	 * @param  string  $message
77
-	 * 
78
-	 * @return void
79
-	 */
80
-	public function success(string $message)
81
-	{
82
-		$this->commandline($message, 'success');
83
-	}
73
+    /**
74
+     * Writes a string formatting for success output.
75
+     * 
76
+     * @param  string  $message
77
+     * 
78
+     * @return void
79
+     */
80
+    public function success(string $message)
81
+    {
82
+        $this->commandline($message, 'success');
83
+    }
84 84
 	
85
-	/**
86
-	 * Writes a string formatting for info output.
87
-	 * 
88
-	 * @param  string  $message
89
-	 * 
90
-	 * @return void
91
-	 */
92
-	public function info(string $message)
93
-	{
94
-		$this->commandline($message, 'info');
95
-	}
85
+    /**
86
+     * Writes a string formatting for info output.
87
+     * 
88
+     * @param  string  $message
89
+     * 
90
+     * @return void
91
+     */
92
+    public function info(string $message)
93
+    {
94
+        $this->commandline($message, 'info');
95
+    }
96 96
 
97
-	/**
98
-	 * Writes a string formatting for question output.
99
-	 * 
100
-	 * @param  string  $message
101
-	 * 
102
-	 * @return void
103
-	 */
104
-	public function question(string $message)
105
-	{
106
-		$this->commandline($message, 'question');
107
-	}
97
+    /**
98
+     * Writes a string formatting for question output.
99
+     * 
100
+     * @param  string  $message
101
+     * 
102
+     * @return void
103
+     */
104
+    public function question(string $message)
105
+    {
106
+        $this->commandline($message, 'question');
107
+    }
108 108
 	
109
-	/**
110
-	 * Writes a string formatting for warning output.
111
-	 * 
112
-	 * @param  string  $message
113
-	 * 
114
-	 * @return void
115
-	 */
116
-	public function warning(string $message)
117
-	{
118
-		$this->commandline($message, 'warning');
119
-	}
109
+    /**
110
+     * Writes a string formatting for warning output.
111
+     * 
112
+     * @param  string  $message
113
+     * 
114
+     * @return void
115
+     */
116
+    public function warning(string $message)
117
+    {
118
+        $this->commandline($message, 'warning');
119
+    }
120 120
 	
121
-	/**
122
-	 * Writes a string formatting for error output.
123
-	 * 
124
-	 * @param  string  $message
125
-	 * 
126
-	 * @return void
127
-	 */
128
-	public function error(string $message)
129
-	{
130
-		$this->commandline($message, 'error');
131
-	}
121
+    /**
122
+     * Writes a string formatting for error output.
123
+     * 
124
+     * @param  string  $message
125
+     * 
126
+     * @return void
127
+     */
128
+    public function error(string $message)
129
+    {
130
+        $this->commandline($message, 'error');
131
+    }
132 132
 	
133
-	/**
134
-	 * Writes a string formatting for stantard output.
135
-	 * 
136
-	 * @param  string  $message
137
-	 * @param  string|null  $style
138
-	 * 
139
-	 * @return void
140
-	 */
141
-	public function commandline(string $message, string $style = null)
142
-	{
143
-		$styled = $style ? "<$style>$message</>" : $message;
133
+    /**
134
+     * Writes a string formatting for stantard output.
135
+     * 
136
+     * @param  string  $message
137
+     * @param  string|null  $style
138
+     * 
139
+     * @return void
140
+     */
141
+    public function commandline(string $message, string $style = null)
142
+    {
143
+        $styled = $style ? "<$style>$message</>" : $message;
144 144
 		
145
-		return $this->writeln($styled);
146
-	}
145
+        return $this->writeln($styled);
146
+    }
147 147
 	
148
-	/**
149
-	 * Outputs series of minus characters to CLI output, specified as a visual separator.
150
-	 * 
151
-	 * @param  int  $newlines  Number of lines to output, defaults to 0
152
-	 * @param  int  $width  Width of the line, default to 79
153
-	 * 
154
-	 * @return string
155
-	 */
156
-	public function hr(int $newlines = 0, $width = 79) 
157
-	{
158
-		$this->writeln('', $newlines);
159
-		$this->writeln(str_repeat('-', $width));
160
-		$this->write('', $newlines);
161
-	}
148
+    /**
149
+     * Outputs series of minus characters to CLI output, specified as a visual separator.
150
+     * 
151
+     * @param  int  $newlines  Number of lines to output, defaults to 0
152
+     * @param  int  $width  Width of the line, default to 79
153
+     * 
154
+     * @return string
155
+     */
156
+    public function hr(int $newlines = 0, $width = 79) 
157
+    {
158
+        $this->writeln('', $newlines);
159
+        $this->writeln(str_repeat('-', $width));
160
+        $this->write('', $newlines);
161
+    }
162 162
 }
163 163
\ No newline at end of file
Please login to merge, or discard this patch.
src/components/Console/Output/ConsoleOutput.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
     
70 70
     /**
71 71
      * Sets the decorated flag.
72
-	 * 
73
-	 * @param  bool  $decorated  Whether to decorated messages
74
-	 * 
75
-	 * @return void
72
+     * 
73
+     * @param  bool  $decorated  Whether to decorated messages
74
+     * 
75
+     * @return void
76 76
      */
77 77
     public function setDecorated(bool $decorated): void
78 78
     {
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
     
84 84
     /**
85 85
      * Sets a output formatter instance.
86
-	 * 
87
-	 * @param  \Syscodes\Components\Contracts\Console\Output\OutputFormatter  $formatter;
88
-	 * 
89
-	 * @return void
86
+     * 
87
+     * @param  \Syscodes\Components\Contracts\Console\Output\OutputFormatter  $formatter;
88
+     * 
89
+     * @return void
90 90
      */
91 91
     public function setFormatter(OutputFormatterInterface $formatter): void
92 92
     {
@@ -97,10 +97,10 @@  discard block
 block discarded – undo
97 97
     
98 98
     /**
99 99
      * Sets the verbosity of the output.
100
-	 * 
101
-	 * @param  int  $level
102
-	 * 
103
-	 * @return void
100
+     * 
101
+     * @param  int  $level
102
+     * 
103
+     * @return void
104 104
      */
105 105
     public function setVerbosity(int $level): void
106 106
     {
Please login to merge, or discard this patch.