* @ingroup Maintenance
*/
class ShowJobs extends Maintenance {
- protected static $stateMethods = array(
+ protected static $stateMethods = [
'unclaimed' => 'getAllQueuedJobs',
'delayed' => 'getAllDelayedJobs',
'claimed' => 'getAllAcquiredJobs',
'abandoned' => 'getAllAbandonedJobs',
- );
+ ];
public function __construct() {
parent::__construct();
$group = JobQueueGroup::singleton();
$filteredTypes = $typeFilter
- ? array( $typeFilter )
+ ? [ $typeFilter ]
: $group->getQueueTypes();
$filteredStates = $stateFilter
- ? array_intersect_key( self::$stateMethods, array( $stateFilter => 1 ) )
+ ? array_intersect_key( self::$stateMethods, [ $stateFilter => 1 ] )
: self::$stateMethods;
if ( $this->hasOption( 'list' ) ) {
}
}
-$maintClass = "ShowJobs";
+$maintClass = ShowJobs::class;
require_once RUN_MAINTENANCE_IF_MAIN;