From ebe61ad378503049d9f1ffe13f907c752604347f Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Thu, 19 Sep 2024 12:21:45 +0200 Subject: [PATCH] Refactor custom points handling in Swar6 reader The logic for handling custom points in the Swar6 reader has been refactored. Previously, if presence points were not set, the absence value was set to the presence value and then the presence key was unset. Now, if presence points are not set, the absence value is directly set to 0 and then the presence key is unset. --- src/Readers/Swar6.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Readers/Swar6.php b/src/Readers/Swar6.php index 5688bc3..7c9009d 100644 --- a/src/Readers/Swar6.php +++ b/src/Readers/Swar6.php @@ -285,8 +285,8 @@ class Swar6 implements ReaderInterface $custompoints['presence'] = $this->readData('Int', $swshandle) / 4; $this->Tournament->IsPresencePoints = (bool)$this->readData('Int', $swshandle); if(!$this->Tournament->IsPresencePoints) { - $custompoints['absence'] = $custompoints['presence']; - unset($custompoints['presence']) + $custompoints['absence'] = 0; + unset($custompoints['presence']); } if($applycustompoints) $this->Tournament->CustomPoints = $custompoints; $this->Tournament->TournoiStd = $this->readData('Int', $swshandle);