Completed
Branch master (70af61)
by Michał
03:52
created
input/Definition.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -70,6 +70,7 @@
 block discarded – undo
70 70
      *                                                  pass a Definition as the first argument to this method right
71 71
      *                                                  away, in which case the default of "true" will be used).
72 72
      * @param   Definition          ...$definitions     The Definitions to merge with this one.
73
+     * @param Definition[] $definitions
73 74
      * @return  Definition                              The merged Definition as a new instance.
74 75
      * @throws  \InvalidArgumentException               When one or more of the parameters is not a Definition
75 76
      *                                                  instance (not including the $mergeArguments bool).
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     public function __construct($arguments = null, $options = null)
36 36
     {
37 37
         $this->arguments = $arguments instanceof definitions\Arguments ? $arguments : new definitions\Arguments($arguments);
38
-        $this->options   = $arguments instanceof definitions\Options   ? $options   : new definitions\Options($options);
38
+        $this->options   = $arguments instanceof definitions\Options ? $options : new definitions\Options($options);
39 39
     }
40 40
 
41 41
     /**
Please login to merge, or discard this patch.
input/formats/tokens/Argv.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     {
28 28
         foreach ($this->items as $token) {
29 29
 
30
-            if ($token === $parameter || 0 === strpos($token, $parameter . '=')) {
30
+            if ($token === $parameter || 0 === strpos($token, $parameter.'=')) {
31 31
                 if (false !== $pos = strpos($parameter, '=')) {
32 32
                     return substr($token, $pos + 1);
33 33
                 }
Please login to merge, or discard this patch.
input/Option.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      *
66 66
      * @return  string
67 67
      */
68
-    public function getShortcut() : ?string
68
+    public function getShortcut() : ? string
69 69
     {
70 70
         return $this->shortcut;
71 71
     }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      *
76 76
      * @return  callable
77 77
      */
78
-    public function getCallback() : ?callable
78
+    public function getCallback() : ? callable
79 79
     {
80 80
         return $this->callback;
81 81
     }
Please login to merge, or discard this patch.
input/parameter/definitions/Arguments.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
      * @param   input\parameter\values\Arguments    $values
52 52
      * @return  input\Argument
53 53
      */
54
-    public function getNextDefinition(input\parameter\values\Arguments $values) : ?input\Argument
54
+    public function getNextDefinition(input\parameter\values\Arguments $values) : ? input\Argument
55 55
     {
56 56
         $nextIndex = $values->count();
57 57
 
Please login to merge, or discard this patch.
input/Parameter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      *
62 62
      * @return  string
63 63
      */
64
-    public function getDescription() : ?string
64
+    public function getDescription() : ? string
65 65
     {
66 66
         return $this->description;
67 67
     }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      *
85 85
      * @return  Value
86 86
      */
87
-    public function getValue() : ?Value
87
+    public function getValue() : ? Value
88 88
     {
89 89
         return $this->value;
90 90
     }
Please login to merge, or discard this patch.
interfaces/Input.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,12 +38,12 @@
 block discarded – undo
38 38
      *
39 39
      * @return  console\input\parameter\values\Arguments
40 40
      */
41
-    public function arguments() : ?console\input\parameter\values\Arguments;
41
+    public function arguments() : ? console\input\parameter\values\Arguments;
42 42
 
43 43
     /**
44 44
      * Returns the Input Options collection.
45 45
      *
46 46
      * @return  console\input\parameter\values\Options
47 47
      */
48
-    public function options() : ?console\input\parameter\values\Options;
48
+    public function options() : ? console\input\parameter\values\Options;
49 49
 }
Please login to merge, or discard this patch.
Terminal.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      * @return  array   An array containing two keys - 'width' and 'height'. The values for those keys can be null
23 23
      *                  if the respective value could not be determined.
24 24
      */
25
-    abstract protected function getDimensions() : ?array;
25
+    abstract protected function getDimensions() : ? array;
26 26
 
27 27
     /**
28 28
      * Creates a new Terminal instance.
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      * @return  string              The output of the process or null if the process could not be executed.
95 95
      * @todo                        Use the Process component instead since we're relying on proc_open() anyways?
96 96
      */
97
-    protected function execute(string $command) : ?string
97
+    protected function execute(string $command) : ? string
98 98
     {
99 99
         // We require proc_open() to suppress error output.
100 100
         if (!function_exists('proc_open')) {
Please login to merge, or discard this patch.
terminals/Posix.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     /**
18 18
      * {@inheritDoc}
19 19
      */
20
-    protected function getDimensions() : ?array
20
+    protected function getDimensions() : ? array
21 21
     {
22 22
         // Query stty first, then fall back to tput.
23 23
         if (null === $dimensions = $this->getDimensionsFromStty()) {
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      * @return  array   Either an array containing two keys - 'width' and 'height' or null if the data couldn't
39 39
      *                  be parsed to retrieve anything useful.
40 40
      */
41
-    protected function getDimensionsFromStty() : ?array
41
+    protected function getDimensionsFromStty() : ? array
42 42
     {
43 43
         if (empty($output = $this->execute('stty -a | grep columns'))) {
44 44
             return null;
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @return  array   Either an array containing two keys - 'width' and 'height' or null if the data couldn't
61 61
      *                  be parsed to retrieve anything useful.
62 62
      */
63
-    protected function getDimensionsFromTput() : ?array
63
+    protected function getDimensionsFromTput() : ? array
64 64
     {
65 65
         if (empty($output = $this->execute('tput cols && tput lines'))) {
66 66
             return null;
Please login to merge, or discard this patch.
terminals/Windows.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     /**
18 18
      * {@inheritDoc}
19 19
      */
20
-    protected function getDimensions() : ?array
20
+    protected function getDimensions() : ? array
21 21
     {
22 22
         // Ansicon environmental variable is our first fallback. Result of 'mode CON' is the next one.
23 23
         if (null === $dimensions = $this->getDimensionsFromAnsicon()) {
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      * @return  array   Either an array containing two keys - 'width' and 'height' or null if the data couldn't
39 39
      *                  be parsed to retrieve anything useful.
40 40
      */
41
-    protected function getDimensionsFromAnsicon() : ?array
41
+    protected function getDimensionsFromAnsicon() : ? array
42 42
     {
43 43
         if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) {
44 44
             return [
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      * @return  array   Either an array containing two keys - 'width' and 'height' or null if the data couldn't
57 57
      *                  be parsed to retrieve anything useful.
58 58
      */
59
-    protected function getDimensionsFromMode() : ?array
59
+    protected function getDimensionsFromMode() : ? array
60 60
     {
61 61
         if (empty($output = $this->execute('mode CON'))) {
62 62
             return null;
Please login to merge, or discard this patch.