Completed
Pull Request — master (#141)
by Bhanu
37:51 queued 34s
created
vendor/psy/psysh/src/Psy/Command/ListCommand.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,6 @@
 block discarded – undo
42 42
     /**
43 43
      * PresenterAware interface.
44 44
      *
45
-     * @param Presenter $manager
46 45
      */
47 46
     public function setPresenter(Presenter $presenter)
48 47
     {
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -60,27 +60,27 @@  discard block
 block discarded – undo
60 60
             ->setDefinition(array(
61 61
                 new InputArgument('target', InputArgument::OPTIONAL, 'A target class or object to list.', null),
62 62
 
63
-                new InputOption('vars',        '',  InputOption::VALUE_NONE,     'Display variables.'),
64
-                new InputOption('constants',   'c', InputOption::VALUE_NONE,     'Display defined constants.'),
65
-                new InputOption('functions',   'f', InputOption::VALUE_NONE,     'Display defined functions.'),
66
-                new InputOption('classes',     'k', InputOption::VALUE_NONE,     'Display declared classes.'),
67
-                new InputOption('interfaces',  'I', InputOption::VALUE_NONE,     'Display declared interfaces.'),
68
-                new InputOption('traits',      't', InputOption::VALUE_NONE,     'Display declared traits.'),
69
-
70
-                new InputOption('properties',  'p', InputOption::VALUE_NONE,     'Display class or object properties (public properties by default).'),
71
-                new InputOption('methods',     'm', InputOption::VALUE_NONE,     'Display class or object methods (public methods by default).'),
72
-
73
-                new InputOption('grep',        'G', InputOption::VALUE_REQUIRED, 'Limit to items matching the given pattern (string or regex).'),
74
-                new InputOption('insensitive', 'i', InputOption::VALUE_NONE,     'Case-insensitive search (requires --grep).'),
75
-                new InputOption('invert',      'v', InputOption::VALUE_NONE,     'Inverted search (requires --grep).'),
76
-
77
-                new InputOption('globals',     'g', InputOption::VALUE_NONE,     'Include global variables.'),
78
-                new InputOption('internal',    'n', InputOption::VALUE_NONE,     'Limit to internal functions and classes.'),
79
-                new InputOption('user',        'u', InputOption::VALUE_NONE,     'Limit to user-defined constants, functions and classes.'),
80
-                new InputOption('category',    'C', InputOption::VALUE_REQUIRED, 'Limit to constants in a specific category (e.g. "date").'),
81
-
82
-                new InputOption('all',         'a', InputOption::VALUE_NONE,     'Include private and protected methods and properties.'),
83
-                new InputOption('long',        'l', InputOption::VALUE_NONE,     'List in long format: includes class names and method signatures.'),
63
+                new InputOption('vars', '', InputOption::VALUE_NONE, 'Display variables.'),
64
+                new InputOption('constants', 'c', InputOption::VALUE_NONE, 'Display defined constants.'),
65
+                new InputOption('functions', 'f', InputOption::VALUE_NONE, 'Display defined functions.'),
66
+                new InputOption('classes', 'k', InputOption::VALUE_NONE, 'Display declared classes.'),
67
+                new InputOption('interfaces', 'I', InputOption::VALUE_NONE, 'Display declared interfaces.'),
68
+                new InputOption('traits', 't', InputOption::VALUE_NONE, 'Display declared traits.'),
69
+
70
+                new InputOption('properties', 'p', InputOption::VALUE_NONE, 'Display class or object properties (public properties by default).'),
71
+                new InputOption('methods', 'm', InputOption::VALUE_NONE, 'Display class or object methods (public methods by default).'),
72
+
73
+                new InputOption('grep', 'G', InputOption::VALUE_REQUIRED, 'Limit to items matching the given pattern (string or regex).'),
74
+                new InputOption('insensitive', 'i', InputOption::VALUE_NONE, 'Case-insensitive search (requires --grep).'),
75
+                new InputOption('invert', 'v', InputOption::VALUE_NONE, 'Inverted search (requires --grep).'),
76
+
77
+                new InputOption('globals', 'g', InputOption::VALUE_NONE, 'Include global variables.'),
78
+                new InputOption('internal', 'n', InputOption::VALUE_NONE, 'Limit to internal functions and classes.'),
79
+                new InputOption('user', 'u', InputOption::VALUE_NONE, 'Limit to user-defined constants, functions and classes.'),
80
+                new InputOption('category', 'C', InputOption::VALUE_REQUIRED, 'Limit to constants in a specific category (e.g. "date").'),
81
+
82
+                new InputOption('all', 'a', InputOption::VALUE_NONE, 'Include private and protected methods and properties.'),
83
+                new InputOption('long', 'l', InputOption::VALUE_NONE, 'List in long format: includes class names and method signatures.'),
84 84
             ))
85 85
             ->setDescription('List local, instance or class variables, methods and constants.')
86 86
             ->setHelp(
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         if (!$input->getOption('grep')) {
235 235
             foreach (array('invert', 'insensitive') as $option) {
236 236
                 if ($input->getOption($option)) {
237
-                    throw new RuntimeException('--' . $option . ' does not make sense without --grep');
237
+                    throw new RuntimeException('--'.$option.' does not make sense without --grep');
238 238
                 }
239 239
             }
240 240
         }
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
             // if no target is passed, there can be no properties or methods
244 244
             foreach (array('properties', 'methods') as $option) {
245 245
                 if ($input->getOption($option)) {
246
-                    throw new RuntimeException('--' . $option . ' does not make sense without a specified target.');
246
+                    throw new RuntimeException('--'.$option.' does not make sense without a specified target.');
247 247
                 }
248 248
             }
249 249
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
             // if a target is passed, classes, functions, etc don't make sense
260 260
             foreach (array('vars', 'globals', 'functions', 'classes', 'interfaces', 'traits') as $option) {
261 261
                 if ($input->getOption($option)) {
262
-                    throw new RuntimeException('--' . $option . ' does not make sense with a specified target.');
262
+                    throw new RuntimeException('--'.$option.' does not make sense with a specified target.');
263 263
                 }
264 264
             }
265 265
 
@@ -270,9 +270,9 @@  discard block
 block discarded – undo
270 270
             }
271 271
 
272 272
             // default to --constants --properties --methods if no other options are passed
273
-            $input->setOption('constants',  true);
273
+            $input->setOption('constants', true);
274 274
             $input->setOption('properties', true);
275
-            $input->setOption('methods',    true);
275
+            $input->setOption('methods', true);
276 276
         }
277 277
     }
278 278
 }
Please login to merge, or discard this patch.
vendor/psy/psysh/src/Psy/Command/ListCommand/ClassConstantEnumerator.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
      *
79 79
      * @param array $constants
80 80
      *
81
-     * @return array
81
+     * @return \ReflectionClass
82 82
      */
83 83
     protected function prepareConstants(array $constants)
84 84
     {
Please login to merge, or discard this patch.
vendor/psy/psysh/src/Psy/Command/ListCommand/ClassEnumerator.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     /**
55 55
      * Prepare formatted class array.
56 56
      *
57
-     * @param array $class
57
+     * @param array $classes
58 58
      *
59 59
      * @return array
60 60
      */
Please login to merge, or discard this patch.
vendor/psy/psysh/src/Psy/Command/ListCommand/Enumerator.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      * Return a list of categorized things with the given input options and target.
51 51
      *
52 52
      * @param InputInterface $input
53
-     * @param Reflector      $reflector
53
+     * @param \Reflector      $reflector
54 54
      * @param mixed          $target
55 55
      *
56 56
      * @return array
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      *     ]
79 79
      *
80 80
      * @param InputInterface $input
81
-     * @param Reflector      $reflector
81
+     * @param \Reflector      $reflector
82 82
      * @param mixed          $target
83 83
      *
84 84
      * @return array
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      *
122 122
      * @param string $pattern
123 123
      *
124
-     * @return bool
124
+     * @return boolean|null
125 125
      */
126 126
     private function validateRegex($pattern)
127 127
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
     {
100 100
         if ($pattern = $input->getOption('grep')) {
101 101
             if (substr($pattern, 0, 1) !== '/' || substr($pattern, -1) !== '/' || strlen($pattern) < 3) {
102
-                $pattern = '/' . preg_quote($pattern, '/') . '/';
102
+                $pattern = '/'.preg_quote($pattern, '/').'/';
103 103
             }
104 104
 
105 105
             if ($input->getOption('insensitive')) {
Please login to merge, or discard this patch.
vendor/psy/psysh/src/Psy/Command/ListCommand/MethodEnumerator.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
      *
81 81
      * @param array $methods
82 82
      *
83
-     * @return array
83
+     * @return \ReflectionClass
84 84
      */
85 85
     protected function prepareMethods(array $methods)
86 86
     {
Please login to merge, or discard this patch.
vendor/psy/psysh/src/Psy/Command/ListCommand/PropertyEnumerator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
      *
81 81
      * @param array $properties
82 82
      *
83
-     * @return array
83
+     * @return \ReflectionClass
84 84
      */
85 85
     protected function prepareProperties(array $properties, $target = null)
86 86
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
 
90 90
         foreach ($properties as $name => $property) {
91 91
             if ($this->showItem($name)) {
92
-                $fname = '$' . $name;
92
+                $fname = '$'.$name;
93 93
                 $ret[$fname] = array(
94 94
                     'name'  => $fname,
95 95
                     'style' => $this->getVisibilityStyle($property),
Please login to merge, or discard this patch.
vendor/psy/psysh/src/Psy/Command/WtfCommand.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
      *
78 78
      * --verbose is not hidden for this option :)
79 79
      *
80
-     * @return array
80
+     * @return string[]
81 81
      */
82 82
     protected function getHiddenOptions()
83 83
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             ->setAliases(array('last-exception', 'wtf?'))
52 52
             ->setDefinition(array(
53 53
                 new InputArgument('incredulity', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'Number of lines to show'),
54
-                new InputOption('verbose', 'v',  InputOption::VALUE_NONE, 'Show entire backtrace.'),
54
+                new InputOption('verbose', 'v', InputOption::VALUE_NONE, 'Show entire backtrace.'),
55 55
             ))
56 56
             ->setDescription('Show the backtrace of the most recent exception.')
57 57
             ->setHelp(
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         $trace     = $this->getBacktrace($exception, $count);
103 103
 
104 104
         $shell = $this->getApplication();
105
-        $output->page(function ($output) use ($exception, $trace, $shell) {
105
+        $output->page(function($output) use ($exception, $trace, $shell) {
106 106
             $shell->renderException($exception, $output);
107 107
             $output->writeln('--');
108 108
             $output->write($trace, true, ShellOutput::NUMBER_LINES);
Please login to merge, or discard this patch.
vendor/psy/psysh/src/Psy/Compiler.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
     /**
71 71
      * Add a file to the psysh Phar.
72 72
      *
73
-     * @param Phar        $phar
73
+     * @param \Phar        $phar
74 74
      * @param SplFileInfo $file
75 75
      * @param bool        $strip (default: true)
76 76
      */
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             ->name('*.php')
43 43
             ->notName('Compiler.php')
44 44
             ->notName('Autoloader.php')
45
-            ->in(__DIR__ . '/..');
45
+            ->in(__DIR__.'/..');
46 46
 
47 47
         foreach ($finder as $file) {
48 48
             $this->addFile($phar, $file);
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             ->ignoreVCS(true)
54 54
             ->name('*.php')
55 55
             ->exclude('Tests')
56
-            ->in(__DIR__ . '/../../build-vendor');
56
+            ->in(__DIR__.'/../../build-vendor');
57 57
 
58 58
         foreach ($finder as $file) {
59 59
             $this->addFile($phar, $file);
@@ -76,13 +76,13 @@  discard block
 block discarded – undo
76 76
      */
77 77
     private function addFile($phar, $file, $strip = true)
78 78
     {
79
-        $path = str_replace(dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR, '', $file->getRealPath());
79
+        $path = str_replace(dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR, '', $file->getRealPath());
80 80
 
81 81
         $content = file_get_contents($file);
82 82
         if ($strip) {
83 83
             $content = $this->stripWhitespace($content);
84 84
         } elseif ('LICENSE' === basename($file)) {
85
-            $content = "\n" . $content . "\n";
85
+            $content = "\n".$content."\n";
86 86
         }
87 87
 
88 88
         $phar->addFromString($path, $content);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
     private static function getStubLicense()
127 127
     {
128
-        $license = file_get_contents(__DIR__ . '/../../LICENSE');
128
+        $license = file_get_contents(__DIR__.'/../../LICENSE');
129 129
         $license = str_replace('The MIT License (MIT)', '', $license);
130 130
         $license = str_replace("\n", "\n * ", trim($license));
131 131
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      */
147 147
     private function getStub()
148 148
     {
149
-        $content = file_get_contents(__DIR__ . '/../../bin/psysh');
149
+        $content = file_get_contents(__DIR__.'/../../bin/psysh');
150 150
         $content = preg_replace('{/\* <<<.*?>>> \*/}sm', self::STUB_AUTOLOAD, $content);
151 151
         $content = preg_replace('/\\(c\\) .*?with this source code./sm', self::getStubLicense(), $content);
152 152
 
Please login to merge, or discard this patch.
vendor/psy/psysh/src/Psy/Configuration.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -450,7 +450,7 @@
 block discarded – undo
450 450
      * The pipe will be created inside the current temporary directory.
451 451
      *
452 452
      * @param string $type
453
-     * @param id     $pid
453
+     * @param integer     $pid
454 454
      *
455 455
      * @return string Pipe name
456 456
      */
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
         // legacy baseDir option
97 97
         if (isset($config['baseDir'])) {
98
-            $msg = "The 'baseDir' configuration option is deprecated. " .
98
+            $msg = "The 'baseDir' configuration option is deprecated. ".
99 99
                 "Please specify 'configDir' and 'dataDir' options instead.";
100 100
             throw new DeprecatedException($msg);
101 101
         }
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      */
175 175
     public function getLocalConfigFile()
176 176
     {
177
-        $localConfig = getenv('PWD') . '/.psysh.php';
177
+        $localConfig = getenv('PWD').'/.psysh.php';
178 178
 
179 179
         if (@is_file($localConfig)) {
180 180
             return $localConfig;
@@ -190,14 +190,14 @@  discard block
 block discarded – undo
190 190
     {
191 191
         foreach (self::$AVAILABLE_OPTIONS as $option) {
192 192
             if (isset($options[$option])) {
193
-                $method = 'set' . ucfirst($option);
193
+                $method = 'set'.ucfirst($option);
194 194
                 $this->$method($options[$option]);
195 195
             }
196 196
         }
197 197
 
198 198
         foreach (array('commands', 'tabCompletionMatchers', 'casters') as $option) {
199 199
             if (isset($options[$option])) {
200
-                $method = 'add' . ucfirst($option);
200
+                $method = 'add'.ucfirst($option);
201 201
                 $this->$method($options[$option]);
202 202
             }
203 203
         }
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     public function loadConfigFile($file)
218 218
     {
219 219
         $__psysh_config_file__ = $file;
220
-        $load = function ($config) use ($__psysh_config_file__) {
220
+        $load = function($config) use ($__psysh_config_file__) {
221 221
             $result = require $__psysh_config_file__;
222 222
             if ($result !== 1) {
223 223
                 return $result;
@@ -352,10 +352,10 @@  discard block
 block discarded – undo
352 352
         // Deprecation warning for incorrect psysh_history path.
353 353
         // TODO: remove this before v0.8.0
354 354
         $xdg = new Xdg();
355
-        $oldHistory = $xdg->getHomeConfigDir() . '/psysh_history';
355
+        $oldHistory = $xdg->getHomeConfigDir().'/psysh_history';
356 356
         if (@is_file($oldHistory)) {
357 357
             $dir = $this->configDir ?: ConfigPaths::getCurrentConfigDir();
358
-            $newHistory = $dir . '/psysh_history';
358
+            $newHistory = $dir.'/psysh_history';
359 359
 
360 360
             $msg = sprintf(
361 361
                 "PsySH history file found at '%s'. Please delete it or move it to '%s'.",
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
             mkdir($dir, 0700, true);
385 385
         }
386 386
 
387
-        return $this->historyFile = $dir . '/psysh_history';
387
+        return $this->historyFile = $dir.'/psysh_history';
388 388
     }
389 389
 
390 390
     /**
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
      */
442 442
     public function getTempFile($type, $pid)
443 443
     {
444
-        return tempnam($this->getRuntimeDir(), $type . '_' . $pid . '_');
444
+        return tempnam($this->getRuntimeDir(), $type.'_'.$pid.'_');
445 445
     }
446 446
 
447 447
     /**
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
                 $this->pager = $pager;
804 804
             } elseif ($less = exec('which less 2>/dev/null')) {
805 805
                 // check for the presence of less...
806
-                $this->pager = $less . ' -R -S -F -X';
806
+                $this->pager = $less.' -R -S -F -X';
807 807
             }
808 808
         }
809 809
 
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
             $dbFile = $this->getManualDbFile();
976 976
             if (is_file($dbFile)) {
977 977
                 try {
978
-                    $this->manualDb = new \PDO('sqlite:' . $dbFile);
978
+                    $this->manualDb = new \PDO('sqlite:'.$dbFile);
979 979
                 } catch (\PDOException $e) {
980 980
                     if ($e->getMessage() === 'could not find driver') {
981 981
                         throw new RuntimeException('SQLite PDO driver not found', 0, $e);
@@ -1058,7 +1058,7 @@  discard block
 block discarded – undo
1058 1058
         if (in_array($colorMode, $validColorModes)) {
1059 1059
             $this->colorMode = $colorMode;
1060 1060
         } else {
1061
-            throw new \InvalidArgumentException('invalid color mode: ' . $colorMode);
1061
+            throw new \InvalidArgumentException('invalid color mode: '.$colorMode);
1062 1062
         }
1063 1063
     }
1064 1064
 
Please login to merge, or discard this patch.