Skip to content

Commit

Permalink
clean up PHP version checks
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Aug 17, 2024
1 parent 8ece294 commit a75d03d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Tests/Encoder/CsvEncoderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function testEncodeCustomSettings()
$this->encoder = new CsvEncoder([
CsvEncoder::DELIMITER_KEY => ';',
CsvEncoder::ENCLOSURE_KEY => "'",
CsvEncoder::ESCAPE_CHAR_KEY => \PHP_VERSION_ID < 70400 ? '|' : '',
CsvEncoder::ESCAPE_CHAR_KEY => '',
CsvEncoder::KEY_SEPARATOR_KEY => '-',
]);

Expand All @@ -175,7 +175,7 @@ public function testEncodeCustomSettingsPassedInContext()
, $this->encoder->encode($value, 'csv', [
CsvEncoder::DELIMITER_KEY => ';',
CsvEncoder::ENCLOSURE_KEY => "'",
CsvEncoder::ESCAPE_CHAR_KEY => \PHP_VERSION_ID < 70400 ? '|' : '',
CsvEncoder::ESCAPE_CHAR_KEY => '',
CsvEncoder::KEY_SEPARATOR_KEY => '-',
]));
}
Expand All @@ -185,7 +185,7 @@ public function testEncodeCustomSettingsPassedInConstructor()
$encoder = new CsvEncoder([
CsvEncoder::DELIMITER_KEY => ';',
CsvEncoder::ENCLOSURE_KEY => "'",
CsvEncoder::ESCAPE_CHAR_KEY => \PHP_VERSION_ID < 70400 ? '|' : '',
CsvEncoder::ESCAPE_CHAR_KEY => '',
CsvEncoder::KEY_SEPARATOR_KEY => '-',
]);
$value = ['a' => 'he\'llo', 'c' => ['d' => 'foo']];
Expand Down Expand Up @@ -574,7 +574,7 @@ public function testDecodeCustomSettings()
$this->encoder = new CsvEncoder([
CsvEncoder::DELIMITER_KEY => ';',
CsvEncoder::ENCLOSURE_KEY => "'",
CsvEncoder::ESCAPE_CHAR_KEY => \PHP_VERSION_ID < 70400 ? '|' : '',
CsvEncoder::ESCAPE_CHAR_KEY => '',
CsvEncoder::KEY_SEPARATOR_KEY => '-',
]);

Expand All @@ -596,7 +596,7 @@ public function testDecodeCustomSettingsPassedInContext()
, 'csv', [
CsvEncoder::DELIMITER_KEY => ';',
CsvEncoder::ENCLOSURE_KEY => "'",
CsvEncoder::ESCAPE_CHAR_KEY => \PHP_VERSION_ID < 70400 ? '|' : '',
CsvEncoder::ESCAPE_CHAR_KEY => '',
CsvEncoder::KEY_SEPARATOR_KEY => '-',
]));
}
Expand All @@ -606,7 +606,7 @@ public function testDecodeCustomSettingsPassedInConstructor()
$encoder = new CsvEncoder([
CsvEncoder::DELIMITER_KEY => ';',
CsvEncoder::ENCLOSURE_KEY => "'",
CsvEncoder::ESCAPE_CHAR_KEY => \PHP_VERSION_ID < 70400 ? '|' : '',
CsvEncoder::ESCAPE_CHAR_KEY => '',
CsvEncoder::KEY_SEPARATOR_KEY => '-',
CsvEncoder::AS_COLLECTION_KEY => true, // Can be removed in 5.0
]);
Expand Down

0 comments on commit a75d03d

Please sign in to comment.