public function __construct( array $params = [] ) {
$this->clearMarks();
- $this->setLogger( isset( $params['logger'] ) ? $params['logger'] : new NullLogger() );
+ $this->setLogger( $params['logger'] ?? new NullLogger() );
}
/**
}
/**
- * @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 ) {
*
* @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|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;
}
}