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 "i18n: Drop number_of_watching_users_pageview, unused since wgPageShowWatchingU...
[lhc/web/wiklou.git]
/
includes
/
libs
/
Timing.php
diff --git
a/includes/libs/Timing.php
b/includes/libs/Timing.php
index
7b1a914
..
65a9247
100644
(file)
--- a/
includes/libs/Timing.php
+++ b/
includes/libs/Timing.php
@@
-52,7
+52,7
@@
class Timing implements LoggerAwareInterface {
public function __construct( array $params = [] ) {
$this->clearMarks();
public function __construct( array $params = [] ) {
$this->clearMarks();
- $this->setLogger(
isset( $params['logger'] ) ? $params['logger'] :
new NullLogger() );
+ $this->setLogger(
$params['logger'] ??
new NullLogger() );
}
/**
}
/**
@@
-83,7
+83,7
@@
class Timing implements LoggerAwareInterface {
}
/**
}
/**
- * @param string $markName The name of the mark that should
+ * @param string
|null
$markName The name of the mark that should
* be cleared. If not specified, all marks will be cleared.
*/
public function clearMarks( $markName = null ) {
* be cleared. If not specified, all marks will be cleared.
*/
public function clearMarks( $markName = null ) {
@@
-117,7
+117,7
@@
class Timing implements LoggerAwareInterface {
*
* @param string $measureName
* @param string $startMark
*
* @param string $measureName
* @param string $startMark
- * @param string $endMark
+ * @param string
|null
$endMark
* @return array|bool The measure that has been created, or false if either
* the start mark or the end mark do not exist.
*/
* @return array|bool The measure that has been created, or false if either
* the start mark or the end mark do not exist.
*/
@@
-155,7
+155,7
@@
class Timing implements LoggerAwareInterface {
*/
private function sortEntries() {
uasort( $this->entries, function ( $a, $b ) {
*/
private function sortEntries() {
uasort( $this->entries, function ( $a, $b ) {
- return
10000 * ( $a['startTime'] - $b['startTime'] )
;
+ return
$a['startTime'] <=> $b['startTime']
;
} );
}
} );
}
@@
-188,6
+188,6
@@
class Timing implements LoggerAwareInterface {
* @return array|null Entry named $name or null if it does not exist.
*/
public function getEntryByName( $name ) {
* @return array|null Entry named $name or null if it does not exist.
*/
public function getEntryByName( $name ) {
- return
isset( $this->entries[$name] ) ? $this->entries[$name] :
null;
+ return
$this->entries[$name] ??
null;
}
}
}
}