case 'g':
$usedHour = true;
$h = substr( $ts, 8, 2 );
- $num = $h % 12 ? $h % 12 : 12;
+ $num = $h % 12 ?: 12;
break;
case 'G':
$usedHour = true;
case 'h':
$usedHour = true;
$h = substr( $ts, 8, 2 );
- $num = sprintf( '%02d', $h % 12 ? $h % 12 : 12 );
+ $num = sprintf( '%02d', $h % 12 ?: 12 );
break;
case 'H':
$usedHour = true;
}
# No difference ? Return time unchanged
- if ( 0 == $minDiff ) {
+ if ( $minDiff == 0 ) {
return $ts;
}
/**
* Perform output conversion on a string, and encode for safe HTML output.
* @param string $text Text to be converted
- * @param bool $isTitle Whether this conversion is for the article title
* @return string
* @todo this should get integrated somewhere sane
*/
- public function convertHtml( $text, $isTitle = false ) {
- return htmlspecialchars( $this->convert( $text, $isTitle ) );
+ public function convertHtml( $text ) {
+ return htmlspecialchars( $this->convert( $text ) );
}
/**