pending = max( 0, $pending ); $this->processing = max( 0, $processing ); $this->failed = max( 0, $failed ); $this->completed = max( 0, $completed ); } /** * Convert the summary to an array. * * @return array */ public function to_array(): array { return array( 'pending' => $this->pending, 'processing' => $this->processing, 'failed' => $this->failed, 'completed' => $this->completed, ); } }