dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Avoid DB_MASTER queries in User::newSystemUser() when possible"
[lhc/web/wiklou.git]
/
includes
/
jobqueue
/
JobQueueMemory.php
diff --git
a/includes/jobqueue/JobQueueMemory.php
b/includes/jobqueue/JobQueueMemory.php
index
7dad748
..
2866c7f
100644
(file)
--- a/
includes/jobqueue/JobQueueMemory.php
+++ b/
includes/jobqueue/JobQueueMemory.php
@@
-31,7
+31,7
@@
*/
class JobQueueMemory extends JobQueue {
/** @var array[] */
*/
class JobQueueMemory extends JobQueue {
/** @var array[] */
- protected static $data =
array()
;
+ protected static $data =
[]
;
/**
* @see JobQueue::doBatchPush
/**
* @see JobQueue::doBatchPush
@@
-40,7
+40,7
@@
class JobQueueMemory extends JobQueue {
* @param int $flags
*/
protected function doBatchPush( array $jobs, $flags ) {
* @param int $flags
*/
protected function doBatchPush( array $jobs, $flags ) {
- $unclaimed =& $this->getQueueData( 'unclaimed',
array()
);
+ $unclaimed =& $this->getQueueData( 'unclaimed',
[]
);
foreach ( $jobs as $job ) {
if ( $job->ignoreDuplicates() ) {
foreach ( $jobs as $job ) {
if ( $job->ignoreDuplicates() ) {
@@
-63,7
+63,7
@@
class JobQueueMemory extends JobQueue {
* @return string[]
*/
protected function supportedOrders() {
* @return string[]
*/
protected function supportedOrders() {
- return
array( 'random', 'timestamp', 'fifo' )
;
+ return
[ 'random', 'timestamp', 'fifo' ]
;
}
/**
}
/**
@@
-117,7
+117,7
@@
class JobQueueMemory extends JobQueue {
}
$unclaimed =& $this->getQueueData( 'unclaimed' );
}
$unclaimed =& $this->getQueueData( 'unclaimed' );
- $claimed =& $this->getQueueData( 'claimed',
array()
);
+ $claimed =& $this->getQueueData( 'claimed',
[]
);
if ( $this->order === 'random' ) {
$key = array_rand( $unclaimed );
if ( $this->order === 'random' ) {
$key = array_rand( $unclaimed );
@@
-172,14
+172,13
@@
class JobQueueMemory extends JobQueue {
public function getAllQueuedJobs() {
$unclaimed = $this->getQueueData( 'unclaimed' );
if ( !$unclaimed ) {
public function getAllQueuedJobs() {
$unclaimed = $this->getQueueData( 'unclaimed' );
if ( !$unclaimed ) {
- return new ArrayIterator(
array()
);
+ return new ArrayIterator(
[]
);
}
}
- $that = $this;
return new MappedIterator(
$unclaimed,
return new MappedIterator(
$unclaimed,
- function ( $value )
use ( $that )
{
- $th
at
->jobFromSpecInternal( $value );
+ function ( $value ) {
+ $th
is
->jobFromSpecInternal( $value );
}
);
}
}
);
}
@@
-192,14
+191,13
@@
class JobQueueMemory extends JobQueue {
public function getAllAcquiredJobs() {
$claimed = $this->getQueueData( 'claimed' );
if ( !$claimed ) {
public function getAllAcquiredJobs() {
$claimed = $this->getQueueData( 'claimed' );
if ( !$claimed ) {
- return new ArrayIterator(
array()
);
+ return new ArrayIterator(
[]
);
}
}
- $that = $this;
return new MappedIterator(
$claimed,
return new MappedIterator(
$claimed,
- function ( $value )
use ( $that )
{
- $th
at
->jobFromSpecInternal( $value );
+ function ( $value ) {
+ $th
is
->jobFromSpecInternal( $value );
}
);
}
}
);
}