clock->now(); $expired = $this->bookings->find_expired_holds( $now, $limit ); $count = 0; foreach ( $expired as $booking ) { $id = $booking->id(); if ( null === $id ) { continue; } $this->release->handle( $id, 'expired' ); ++$count; } return $count; } }