Completed
Push — develop ( 316159...00443b )
by Zack
20:22
created
vendor/symfony/console/Output/TrimmedBufferOutput.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
  *
20 20
  * @author Jérémy Derussé <[email protected]>
21 21
  */
22
-class TrimmedBufferOutput extends Output
23
-{
22
+class TrimmedBufferOutput extends Output {
24 23
     private $maxLength;
25 24
     private $buffer = '';
26 25
 
@@ -38,8 +37,7 @@  discard block
 block discarded – undo
38 37
      *
39 38
      * @return string
40 39
      */
41
-    public function fetch()
42
-    {
40
+    public function fetch() {
43 41
         $content = $this->buffer;
44 42
         $this->buffer = '';
45 43
 
@@ -49,8 +47,7 @@  discard block
 block discarded – undo
49 47
     /**
50 48
      * {@inheritdoc}
51 49
      */
52
-    protected function doWrite(string $message, bool $newline)
53
-    {
50
+    protected function doWrite(string $message, bool $newline) {
54 51
         $this->buffer .= $message;
55 52
 
56 53
         if ($newline) {
Please login to merge, or discard this patch.
vendor/symfony/console/Output/ConsoleSectionOutput.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
  * @author Pierre du Plessis <[email protected]>
20 20
  * @author Gabriel Ostrolucký <[email protected]>
21 21
  */
22
-class ConsoleSectionOutput extends StreamOutput
23
-{
22
+class ConsoleSectionOutput extends StreamOutput {
24 23
     private $content = [];
25 24
     private $lines = 0;
26 25
     private $sections;
@@ -30,8 +29,7 @@  discard block
 block discarded – undo
30 29
      * @param resource               $stream
31 30
      * @param ConsoleSectionOutput[] $sections
32 31
      */
33
-    public function __construct($stream, array &$sections, int $verbosity, bool $decorated, OutputFormatterInterface $formatter)
34
-    {
32
+    public function __construct($stream, array &$sections, int $verbosity, bool $decorated, OutputFormatterInterface $formatter) {
35 33
         parent::__construct($stream, $verbosity, $decorated, $formatter);
36 34
         array_unshift($sections, $this);
37 35
         $this->sections = &$sections;
@@ -43,8 +41,7 @@  discard block
 block discarded – undo
43 41
      *
44 42
      * @param int $lines Number of lines to clear. If null, then the entire output of this section is cleared
45 43
      */
46
-    public function clear(int $lines = null)
47
-    {
44
+    public function clear(int $lines = null) {
48 45
         if (empty($this->content) || !$this->isDecorated()) {
49 46
             return;
50 47
         }
@@ -66,8 +63,7 @@  discard block
 block discarded – undo
66 63
      *
67 64
      * @param array|string $message
68 65
      */
69
-    public function overwrite($message)
70
-    {
66
+    public function overwrite($message) {
71 67
         $this->clear();
72 68
         $this->writeln($message);
73 69
     }
@@ -80,8 +76,7 @@  discard block
 block discarded – undo
80 76
     /**
81 77
      * @internal
82 78
      */
83
-    public function addContent(string $input)
84
-    {
79
+    public function addContent(string $input) {
85 80
         foreach (explode(\PHP_EOL, $input) as $lineContent) {
86 81
             $this->lines += ceil($this->getDisplayLength($lineContent) / $this->terminal->getWidth()) ?: 1;
87 82
             $this->content[] = $lineContent;
@@ -92,8 +87,7 @@  discard block
 block discarded – undo
92 87
     /**
93 88
      * {@inheritdoc}
94 89
      */
95
-    protected function doWrite(string $message, bool $newline)
96
-    {
90
+    protected function doWrite(string $message, bool $newline) {
97 91
         if (!$this->isDecorated()) {
98 92
             parent::doWrite($message, $newline);
99 93
 
Please login to merge, or discard this patch.
vendor/symfony/console/Output/NullOutput.php 1 patch
Braces   +13 added lines, -26 removed lines patch added patch discarded remove patch
@@ -22,23 +22,20 @@  discard block
 block discarded – undo
22 22
  * @author Fabien Potencier <[email protected]>
23 23
  * @author Tobias Schultze <http://tobion.de>
24 24
  */
25
-class NullOutput implements OutputInterface
26
-{
25
+class NullOutput implements OutputInterface {
27 26
     private $formatter;
28 27
 
29 28
     /**
30 29
      * {@inheritdoc}
31 30
      */
32
-    public function setFormatter(OutputFormatterInterface $formatter)
33
-    {
31
+    public function setFormatter(OutputFormatterInterface $formatter) {
34 32
         // do nothing
35 33
     }
36 34
 
37 35
     /**
38 36
      * {@inheritdoc}
39 37
      */
40
-    public function getFormatter()
41
-    {
38
+    public function getFormatter() {
42 39
         if ($this->formatter) {
43 40
             return $this->formatter;
44 41
         }
@@ -49,80 +46,70 @@  discard block
 block discarded – undo
49 46
     /**
50 47
      * {@inheritdoc}
51 48
      */
52
-    public function setDecorated(bool $decorated)
53
-    {
49
+    public function setDecorated(bool $decorated) {
54 50
         // do nothing
55 51
     }
56 52
 
57 53
     /**
58 54
      * {@inheritdoc}
59 55
      */
60
-    public function isDecorated()
61
-    {
56
+    public function isDecorated() {
62 57
         return false;
63 58
     }
64 59
 
65 60
     /**
66 61
      * {@inheritdoc}
67 62
      */
68
-    public function setVerbosity(int $level)
69
-    {
63
+    public function setVerbosity(int $level) {
70 64
         // do nothing
71 65
     }
72 66
 
73 67
     /**
74 68
      * {@inheritdoc}
75 69
      */
76
-    public function getVerbosity()
77
-    {
70
+    public function getVerbosity() {
78 71
         return self::VERBOSITY_QUIET;
79 72
     }
80 73
 
81 74
     /**
82 75
      * {@inheritdoc}
83 76
      */
84
-    public function isQuiet()
85
-    {
77
+    public function isQuiet() {
86 78
         return true;
87 79
     }
88 80
 
89 81
     /**
90 82
      * {@inheritdoc}
91 83
      */
92
-    public function isVerbose()
93
-    {
84
+    public function isVerbose() {
94 85
         return false;
95 86
     }
96 87
 
97 88
     /**
98 89
      * {@inheritdoc}
99 90
      */
100
-    public function isVeryVerbose()
101
-    {
91
+    public function isVeryVerbose() {
102 92
         return false;
103 93
     }
104 94
 
105 95
     /**
106 96
      * {@inheritdoc}
107 97
      */
108
-    public function isDebug()
109
-    {
98
+    public function isDebug() {
110 99
         return false;
111 100
     }
112 101
 
113 102
     /**
114 103
      * {@inheritdoc}
115 104
      */
116
-    public function writeln($messages, int $options = self::OUTPUT_NORMAL)
117
-    {
105
+    public function writeln($messages, int $options = self::OUTPUT_NORMAL) {
118 106
         // do nothing
119 107
     }
120 108
 
121 109
     /**
122 110
      * {@inheritdoc}
123 111
      */
124
-    public function write($messages, bool $newline = false, int $options = self::OUTPUT_NORMAL)
125
-    {
112
+    public function write($messages, bool $newline = false, int $options = self::OUTPUT_NORMAL) {
126 113
         // do nothing
127 114
     }
128 115
 }
Please login to merge, or discard this patch.
vendor/symfony/console/Input/InputOption.php 1 patch
Braces   +12 added lines, -24 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
  *
20 20
  * @author Fabien Potencier <[email protected]>
21 21
  */
22
-class InputOption
23
-{
22
+class InputOption {
24 23
     /**
25 24
      * Do not accept input for the option (e.g. --yell). This is the default behavior of options.
26 25
      */
@@ -61,8 +60,7 @@  discard block
 block discarded – undo
61 60
      *
62 61
      * @throws InvalidArgumentException If option mode is invalid or incompatible
63 62
      */
64
-    public function __construct(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null)
65
-    {
63
+    public function __construct(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null) {
66 64
         if (str_starts_with($name, '--')) {
67 65
             $name = substr($name, 2);
68 66
         }
@@ -114,8 +112,7 @@  discard block
 block discarded – undo
114 112
      *
115 113
      * @return string|null The shortcut
116 114
      */
117
-    public function getShortcut()
118
-    {
115
+    public function getShortcut() {
119 116
         return $this->shortcut;
120 117
     }
121 118
 
@@ -124,8 +121,7 @@  discard block
 block discarded – undo
124 121
      *
125 122
      * @return string The name
126 123
      */
127
-    public function getName()
128
-    {
124
+    public function getName() {
129 125
         return $this->name;
130 126
     }
131 127
 
@@ -134,8 +130,7 @@  discard block
 block discarded – undo
134 130
      *
135 131
      * @return bool true if value mode is not self::VALUE_NONE, false otherwise
136 132
      */
137
-    public function acceptValue()
138
-    {
133
+    public function acceptValue() {
139 134
         return $this->isValueRequired() || $this->isValueOptional();
140 135
     }
141 136
 
@@ -144,8 +139,7 @@  discard block
 block discarded – undo
144 139
      *
145 140
      * @return bool true if value mode is self::VALUE_REQUIRED, false otherwise
146 141
      */
147
-    public function isValueRequired()
148
-    {
142
+    public function isValueRequired() {
149 143
         return self::VALUE_REQUIRED === (self::VALUE_REQUIRED & $this->mode);
150 144
     }
151 145
 
@@ -154,8 +148,7 @@  discard block
 block discarded – undo
154 148
      *
155 149
      * @return bool true if value mode is self::VALUE_OPTIONAL, false otherwise
156 150
      */
157
-    public function isValueOptional()
158
-    {
151
+    public function isValueOptional() {
159 152
         return self::VALUE_OPTIONAL === (self::VALUE_OPTIONAL & $this->mode);
160 153
     }
161 154
 
@@ -164,8 +157,7 @@  discard block
 block discarded – undo
164 157
      *
165 158
      * @return bool true if mode is self::VALUE_IS_ARRAY, false otherwise
166 159
      */
167
-    public function isArray()
168
-    {
160
+    public function isArray() {
169 161
         return self::VALUE_IS_ARRAY === (self::VALUE_IS_ARRAY & $this->mode);
170 162
     }
171 163
 
@@ -177,8 +169,7 @@  discard block
 block discarded – undo
177 169
     /**
178 170
      * @param string|bool|int|float|array|null $default
179 171
      */
180
-    public function setDefault($default = null)
181
-    {
172
+    public function setDefault($default = null) {
182 173
         if (self::VALUE_NONE === (self::VALUE_NONE & $this->mode) && null !== $default) {
183 174
             throw new LogicException('Cannot set a default value when using InputOption::VALUE_NONE mode.');
184 175
         }
@@ -199,8 +190,7 @@  discard block
 block discarded – undo
199 190
      *
200 191
      * @return string|bool|int|float|array|null
201 192
      */
202
-    public function getDefault()
203
-    {
193
+    public function getDefault() {
204 194
         return $this->default;
205 195
     }
206 196
 
@@ -209,8 +199,7 @@  discard block
 block discarded – undo
209 199
      *
210 200
      * @return string The description text
211 201
      */
212
-    public function getDescription()
213
-    {
202
+    public function getDescription() {
214 203
         return $this->description;
215 204
     }
216 205
 
@@ -219,8 +208,7 @@  discard block
 block discarded – undo
219 208
      *
220 209
      * @return bool
221 210
      */
222
-    public function equals(self $option)
223
-    {
211
+    public function equals(self $option) {
224 212
         return $option->getName() === $this->getName()
225 213
             && $option->getShortcut() === $this->getShortcut()
226 214
             && $option->getDefault() === $this->getDefault()
Please login to merge, or discard this patch.
vendor/symfony/console/Input/StringInput.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,16 +22,14 @@
 block discarded – undo
22 22
  *
23 23
  * @author Fabien Potencier <[email protected]>
24 24
  */
25
-class StringInput extends ArgvInput
26
-{
25
+class StringInput extends ArgvInput {
27 26
     public const REGEX_STRING = '([^\s]+?)(?:\s|(?<!\\\\)"|(?<!\\\\)\'|$)';
28 27
     public const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')';
29 28
 
30 29
     /**
31 30
      * @param string $input A string representing the parameters from the CLI
32 31
      */
33
-    public function __construct(string $input)
34
-    {
32
+    public function __construct(string $input) {
35 33
         parent::__construct([]);
36 34
 
37 35
         $this->setTokens($this->tokenize($input));
Please login to merge, or discard this patch.
vendor/symfony/console/Input/InputArgument.php 1 patch
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
  *
20 20
  * @author Fabien Potencier <[email protected]>
21 21
  */
22
-class InputArgument
23
-{
22
+class InputArgument {
24 23
     public const REQUIRED = 1;
25 24
     public const OPTIONAL = 2;
26 25
     public const IS_ARRAY = 4;
@@ -38,8 +37,7 @@  discard block
 block discarded – undo
38 37
      *
39 38
      * @throws InvalidArgumentException When argument mode is not valid
40 39
      */
41
-    public function __construct(string $name, int $mode = null, string $description = '', $default = null)
42
-    {
40
+    public function __construct(string $name, int $mode = null, string $description = '', $default = null) {
43 41
         if (null === $mode) {
44 42
             $mode = self::OPTIONAL;
45 43
         } elseif ($mode > 7 || $mode < 1) {
@@ -58,8 +56,7 @@  discard block
 block discarded – undo
58 56
      *
59 57
      * @return string The argument name
60 58
      */
61
-    public function getName()
62
-    {
59
+    public function getName() {
63 60
         return $this->name;
64 61
     }
65 62
 
@@ -68,8 +65,7 @@  discard block
 block discarded – undo
68 65
      *
69 66
      * @return bool true if parameter mode is self::REQUIRED, false otherwise
70 67
      */
71
-    public function isRequired()
72
-    {
68
+    public function isRequired() {
73 69
         return self::REQUIRED === (self::REQUIRED & $this->mode);
74 70
     }
75 71
 
@@ -78,8 +74,7 @@  discard block
 block discarded – undo
78 74
      *
79 75
      * @return bool true if mode is self::IS_ARRAY, false otherwise
80 76
      */
81
-    public function isArray()
82
-    {
77
+    public function isArray() {
83 78
         return self::IS_ARRAY === (self::IS_ARRAY & $this->mode);
84 79
     }
85 80
 
@@ -90,8 +85,7 @@  discard block
 block discarded – undo
90 85
      *
91 86
      * @throws LogicException When incorrect default value is given
92 87
      */
93
-    public function setDefault($default = null)
94
-    {
88
+    public function setDefault($default = null) {
95 89
         if (self::REQUIRED === $this->mode && null !== $default) {
96 90
             throw new LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.');
97 91
         }
@@ -112,8 +106,7 @@  discard block
 block discarded – undo
112 106
      *
113 107
      * @return string|bool|int|float|array|null
114 108
      */
115
-    public function getDefault()
116
-    {
109
+    public function getDefault() {
117 110
         return $this->default;
118 111
     }
119 112
 
@@ -122,8 +115,7 @@  discard block
 block discarded – undo
122 115
      *
123 116
      * @return string The description text
124 117
      */
125
-    public function getDescription()
126
-    {
118
+    public function getDescription() {
127 119
         return $this->description;
128 120
     }
129 121
 }
Please login to merge, or discard this patch.
vendor/symfony/console/Input/ArgvInput.php 1 patch
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -38,13 +38,11 @@  discard block
 block discarded – undo
38 38
  * @see http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
39 39
  * @see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02
40 40
  */
41
-class ArgvInput extends Input
42
-{
41
+class ArgvInput extends Input {
43 42
     private $tokens;
44 43
     private $parsed;
45 44
 
46
-    public function __construct(array $argv = null, InputDefinition $definition = null)
47
-    {
45
+    public function __construct(array $argv = null, InputDefinition $definition = null) {
48 46
         $argv = $argv ?? $_SERVER['argv'] ?? [];
49 47
 
50 48
         // strip the application name
@@ -55,16 +53,14 @@  discard block
 block discarded – undo
55 53
         parent::__construct($definition);
56 54
     }
57 55
 
58
-    protected function setTokens(array $tokens)
59
-    {
56
+    protected function setTokens(array $tokens) {
60 57
         $this->tokens = $tokens;
61 58
     }
62 59
 
63 60
     /**
64 61
      * {@inheritdoc}
65 62
      */
66
-    protected function parse()
67
-    {
63
+    protected function parse() {
68 64
         $parseOptions = true;
69 65
         $this->parsed = $this->tokens;
70 66
         while (null !== $token = array_shift($this->parsed)) {
@@ -85,8 +81,7 @@  discard block
 block discarded – undo
85 81
     /**
86 82
      * Parses a short option.
87 83
      */
88
-    private function parseShortOption(string $token)
89
-    {
84
+    private function parseShortOption(string $token) {
90 85
         $name = substr($token, 1);
91 86
 
92 87
         if (\strlen($name) > 1) {
@@ -106,8 +101,7 @@  discard block
 block discarded – undo
106 101
      *
107 102
      * @throws RuntimeException When option given doesn't exist
108 103
      */
109
-    private function parseShortOptionSet(string $name)
110
-    {
104
+    private function parseShortOptionSet(string $name) {
111 105
         $len = \strlen($name);
112 106
         for ($i = 0; $i < $len; ++$i) {
113 107
             if (!$this->definition->hasShortcut($name[$i])) {
@@ -129,8 +123,7 @@  discard block
 block discarded – undo
129 123
     /**
130 124
      * Parses a long option.
131 125
      */
132
-    private function parseLongOption(string $token)
133
-    {
126
+    private function parseLongOption(string $token) {
134 127
         $name = substr($token, 2);
135 128
 
136 129
         if (false !== $pos = strpos($name, '=')) {
@@ -148,8 +141,7 @@  discard block
 block discarded – undo
148 141
      *
149 142
      * @throws RuntimeException When too many arguments are given
150 143
      */
151
-    private function parseArgument(string $token)
152
-    {
144
+    private function parseArgument(string $token) {
153 145
         $c = \count($this->arguments);
154 146
 
155 147
         // if input is expecting another argument, add it
@@ -192,8 +184,7 @@  discard block
 block discarded – undo
192 184
      *
193 185
      * @throws RuntimeException When option given doesn't exist
194 186
      */
195
-    private function addShortOption(string $shortcut, $value)
196
-    {
187
+    private function addShortOption(string $shortcut, $value) {
197 188
         if (!$this->definition->hasShortcut($shortcut)) {
198 189
             throw new RuntimeException(sprintf('The "-%s" option does not exist.', $shortcut));
199 190
         }
@@ -206,8 +197,7 @@  discard block
 block discarded – undo
206 197
      *
207 198
      * @throws RuntimeException When option given doesn't exist
208 199
      */
209
-    private function addLongOption(string $name, $value)
210
-    {
200
+    private function addLongOption(string $name, $value) {
211 201
         if (!$this->definition->hasOption($name)) {
212 202
             if (!$this->definition->hasNegation($name)) {
213 203
                 throw new RuntimeException(sprintf('The "--%s" option does not exist.', $name));
@@ -259,8 +249,7 @@  discard block
 block discarded – undo
259 249
     /**
260 250
      * {@inheritdoc}
261 251
      */
262
-    public function getFirstArgument()
263
-    {
252
+    public function getFirstArgument() {
264 253
         $isOption = false;
265 254
         foreach ($this->tokens as $i => $token) {
266 255
             if ($token && '-' === $token[0]) {
@@ -294,8 +283,7 @@  discard block
 block discarded – undo
294 283
     /**
295 284
      * {@inheritdoc}
296 285
      */
297
-    public function hasParameterOption($values, bool $onlyParams = false)
298
-    {
286
+    public function hasParameterOption($values, bool $onlyParams = false) {
299 287
         $values = (array) $values;
300 288
 
301 289
         foreach ($this->tokens as $token) {
@@ -319,8 +307,7 @@  discard block
 block discarded – undo
319 307
     /**
320 308
      * {@inheritdoc}
321 309
      */
322
-    public function getParameterOption($values, $default = false, bool $onlyParams = false)
323
-    {
310
+    public function getParameterOption($values, $default = false, bool $onlyParams = false) {
324 311
         $values = (array) $values;
325 312
         $tokens = $this->tokens;
326 313
 
@@ -352,8 +339,7 @@  discard block
 block discarded – undo
352 339
      *
353 340
      * @return string
354 341
      */
355
-    public function __toString()
356
-    {
342
+    public function __toString() {
357 343
         $tokens = array_map(function ($token) {
358 344
             if (preg_match('{^(-[^=]+=)(.+)}', $token, $match)) {
359 345
                 return $match[1].$this->escapeToken($match[2]);
Please login to merge, or discard this patch.
vendor/symfony/console/Input/StreamableInputInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
  *
18 18
  * @author Robin Chalas <[email protected]>
19 19
  */
20
-interface StreamableInputInterface extends InputInterface
21
-{
20
+interface StreamableInputInterface extends InputInterface {
22 21
     /**
23 22
      * Sets the input stream to read from when interacting with the user.
24 23
      *
Please login to merge, or discard this patch.
vendor/symfony/console/Input/InputInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@
 block discarded – undo
19 19
  *
20 20
  * @author Fabien Potencier <[email protected]>
21 21
  */
22
-interface InputInterface
23
-{
22
+interface InputInterface {
24 23
     /**
25 24
      * Returns the first argument from the raw parameters (not parsed).
26 25
      *
Please login to merge, or discard this patch.