Fix PhanTypeMismatchDeclaredParam
[lhc/web/wiklou.git] / includes / jobqueue / JobRunner.php
index 977fbda..7c5d0ae 100644 (file)
@@ -69,7 +69,7 @@ class JobRunner implements LoggerAwareInterface {
        }
 
        /**
-        * @param LoggerInterface $logger
+        * @param LoggerInterface|null $logger
         */
        public function __construct( LoggerInterface $logger = null ) {
                if ( $logger === null ) {
@@ -109,9 +109,9 @@ class JobRunner implements LoggerAwareInterface {
 
                $response = [ 'jobs' => [], 'reached' => 'none-ready' ];
 
-               $type = isset( $options['type'] ) ? $options['type'] : false;
-               $maxJobs = isset( $options['maxJobs'] ) ? $options['maxJobs'] : false;
-               $maxTime = isset( $options['maxTime'] ) ? $options['maxTime'] : false;
+               $type = $options['type'] ?? false;
+               $maxJobs = $options['maxJobs'] ?? false;
+               $maxTime = $options['maxTime'] ?? false;
                $noThrottle = isset( $options['throttle'] ) && !$options['throttle'];
 
                // Bail if job type is invalid