Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / psy / psysh / src / Input / FilterOptions.php
similarity index 93%
rename from vendor/psy/psysh/src/Psy/Input/FilterOptions.php
rename to vendor/psy/psysh/src/Input/FilterOptions.php
index 46017d2223929cc8cdf84ad4cea79532256159a0..113b8c94498df7128a7e75665a08fec1c67aa225 100644 (file)
@@ -3,7 +3,7 @@
 /*
  * This file is part of Psy Shell.
  *
- * (c) 2012-2017 Justin Hileman
+ * (c) 2012-2018 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -11,6 +11,7 @@
 
 namespace Psy\Input;
 
+use Psy\Exception\ErrorException;
 use Psy\Exception\RuntimeException;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Input\InputOption;
@@ -32,11 +33,11 @@ class FilterOptions
      */
     public static function getOptions()
     {
-        return array(
+        return [
             new InputOption('grep',        'G', InputOption::VALUE_REQUIRED, 'Limit to items matching the given pattern (string or regex).'),
             new InputOption('insensitive', 'i', InputOption::VALUE_NONE,     'Case-insensitive search (requires --grep).'),
             new InputOption('invert',      'v', InputOption::VALUE_NONE,     'Inverted search (requires --grep).'),
-        );
+        ];
     }
 
     /**
@@ -103,7 +104,7 @@ class FilterOptions
     private function validateInput(InputInterface $input)
     {
         if (!$input->getOption('grep')) {
-            foreach (array('invert', 'insensitive') as $option) {
+            foreach (['invert', 'insensitive'] as $option) {
                 if ($input->getOption($option)) {
                     throw new RuntimeException('--' . $option . ' does not make sense without --grep');
                 }
@@ -132,7 +133,7 @@ class FilterOptions
      */
     private function validateRegex($pattern)
     {
-        set_error_handler(array('Psy\Exception\ErrorException', 'throwException'));
+        set_error_handler(['Psy\Exception\ErrorException', 'throwException']);
         try {
             preg_match($pattern, '');
         } catch (ErrorException $e) {