diff --git a/src/Sav/Record/Info/LongStringMissingValues.php b/src/Sav/Record/Info/LongStringMissingValues.php index 11c507b..3064e39 100644 --- a/src/Sav/Record/Info/LongStringMissingValues.php +++ b/src/Sav/Record/Info/LongStringMissingValues.php @@ -32,7 +32,7 @@ public function write(Buffer $buffer) foreach ($this->data as $varName => $values) { $localBuffer->writeInt(mb_strlen($varName)); $localBuffer->writeString($varName); - $localBuffer->write(\chr(is_countable($values) ? \count($values) : 0), 1); + $localBuffer->write(\chr(\is_countable($values) ? \count($values) : 0), 1); $localBuffer->writeInt(8); foreach ($values as $value) { $localBuffer->writeString($value, 8); diff --git a/src/Sav/Record/Info/LongStringValueLabels.php b/src/Sav/Record/Info/LongStringValueLabels.php index 010b265..fa623a7 100644 --- a/src/Sav/Record/Info/LongStringValueLabels.php +++ b/src/Sav/Record/Info/LongStringValueLabels.php @@ -47,7 +47,7 @@ public function write(Buffer $buffer) $localBuffer->writeInt(mb_strlen($varName)); $localBuffer->writeString($varName); $localBuffer->writeInt($width); - $localBuffer->writeInt(is_countable($data['values']) ? \count($data['values']) : 0); + $localBuffer->writeInt(\is_countable($data['values']) ? \count($data['values']) : 0); foreach ($data['values'] as $value => $label) { $localBuffer->writeInt($width); $localBuffer->writeString($value, $width); diff --git a/src/Sav/Writer.php b/src/Sav/Writer.php index dd31cc1..fc74667 100644 --- a/src/Sav/Writer.php +++ b/src/Sav/Writer.php @@ -191,7 +191,7 @@ public function write($data) } // TODO: refactory - $dataCount = is_countable($var->data) ? \count($var->data) : 0; + $dataCount = \count($var->data); if ($dataCount > $this->header->casesCount) { $this->header->casesCount = $dataCount;