Merge "ApiSetNotificationTimestamp: Make entirewatchlist more efficient"
[lhc/web/wiklou.git] / includes / libs / filebackend / filejournal / FileJournal.php
index 5ba59c5..999594b 100644 (file)
@@ -48,7 +48,7 @@ abstract class FileJournal {
         *     'ttlDays' : days to keep log entries around (false means "forever")
         */
        protected function __construct( array $config ) {
-               $this->ttlDays = isset( $config['ttlDays'] ) ? $config['ttlDays'] : false;
+               $this->ttlDays = $config['ttlDays'] ?? false;
        }
 
        /**
@@ -97,7 +97,7 @@ abstract class FileJournal {
         * @return StatusValue
         */
        final public function logChangeBatch( array $entries, $batchId ) {
-               if ( !count( $entries ) ) {
+               if ( $entries === [] ) {
                        return StatusValue::newGood();
                }
 
@@ -149,9 +149,9 @@ abstract class FileJournal {
         * Get an array of file change log entries.
         * A starting change ID and/or limit can be specified.
         *
-        * @param int $start Starting change ID or null
+        * @param int|null $start Starting change ID or null
         * @param int $limit Maximum number of items to return
-        * @param string &$next Updated to the ID of the next entry.
+        * @param string|null &$next Updated to the ID of the next entry.
         * @return array List of associative arrays, each having:
         *     id         : unique, monotonic, ID for this change
         *     batch_uuid : UUID for an operation batch