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 "Enable jquery.ui.position on mobile"
[lhc/web/wiklou.git]
/
includes
/
parser
/
Preprocessor.php
diff --git
a/includes/parser/Preprocessor.php
b/includes/parser/Preprocessor.php
index
df5d499
..
cc98abd
100644
(file)
--- a/
includes/parser/Preprocessor.php
+++ b/
includes/parser/Preprocessor.php
@@
-33,23
+33,23
@@
abstract class Preprocessor {
/**
* @var array Brace matching rules.
*/
/**
* @var array Brace matching rules.
*/
- protected $rules =
array(
- '{' =>
array(
+ protected $rules =
[
+ '{' =>
[
'end' => '}',
'end' => '}',
- 'names' =>
array(
+ 'names' =>
[
2 => 'template',
3 => 'tplarg',
2 => 'template',
3 => 'tplarg',
-
)
,
+
]
,
'min' => 2,
'max' => 3,
'min' => 2,
'max' => 3,
-
)
,
- '[' =>
array(
+
]
,
+ '[' =>
[
'end' => ']',
'end' => ']',
- 'names' =>
array( 2 => null )
,
+ 'names' =>
[ 2 => null ]
,
'min' => 2,
'max' => 2,
'min' => 2,
'max' => 2,
- )
-
)
;
+ ]
+
]
;
/**
* Store a document tree in the cache.
/**
* Store a document tree in the cache.
@@
-67,9
+67,7
@@
abstract class Preprocessor {
}
$key = wfMemcKey(
}
$key = wfMemcKey(
- // TODO: Once we require PHP 5.5, use static::class instead of
- // get_called_class() or get_class( $this ).
- defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : get_called_class(),
+ defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : static::class,
md5( $text ), $flags );
$value = sprintf( "%08d", static::CACHE_VERSION ) . $tree;
md5( $text ), $flags );
$value = sprintf( "%08d", static::CACHE_VERSION ) . $tree;
@@
-100,9
+98,7
@@
abstract class Preprocessor {
$cache = ObjectCache::getInstance( $config->get( 'MainCacheType' ) );
$key = wfMemcKey(
$cache = ObjectCache::getInstance( $config->get( 'MainCacheType' ) );
$key = wfMemcKey(
- // TODO: Once we require PHP 5.5, use static::class instead of
- // get_called_class() or get_class( $this ).
- defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : get_called_class(),
+ defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : static::class,
md5( $text ), $flags );
$value = $cache->get( $key );
md5( $text ), $flags );
$value = $cache->get( $key );
@@
-264,8
+260,8
@@
interface PPFrame {
/**
* Get an argument to this frame by name
/**
* Get an argument to this frame by name
- * @param string $name
- * @return bool
+ * @param
int|
string $name
+ * @return
string|
bool
*/
public function getArgument( $name );
*/
public function getArgument( $name );