Skip to content

Commit ba5f9ad

Browse files
committed
suppressed false positives psalm
1 parent 38505e7 commit ba5f9ad

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"nyholm/psr7": "^1.3",
4444
"nyholm/psr7-server": "^1.0",
4545
"kriswallsmith/buzz": "^1.2",
46-
"vimeo/psalm": "^4.10",
46+
"vimeo/psalm": "^4.10.0",
4747
"friendsofphp/php-cs-fixer": "3.0.2",
4848
"psalm/plugin-phpunit": "^0.15.1",
4949
"vlucas/phpdotenv": "^5.0"

src/Formatter/Specialised/BoltOGMTranslator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ private function mapArray(array $value)
225225
*/
226226
public function mapValueToType($value)
227227
{
228+
/** @psalm-suppress ImpureFunctionCall false positive in version php 7.4 */
228229
$type = get_debug_type($value);
229230
if (!isset($this->rawToTypes[$type])) {
230231
throw new UnexpectedValueException('Cannot handle value of debug type: '.$type);

src/Formatter/Specialised/HttpOGMStringTranslator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public function translate(int $metaIndex, array $meta, string $value)
8181
*/
8282
private function translateDuration(string $value): Duration
8383
{
84+
/** @psalm-suppress ImpureFunctionCall false positive in version php 7.4 */
8485
if (str_contains($value, '.')) {
8586
[$format, $secondsFraction] = explode('.', $value);
8687
$nanoseconds = (int) substr($secondsFraction, 6);
@@ -131,6 +132,7 @@ private function translateDateTime(string $value): DateTime
131132
{
132133
[$date, $time] = explode('T', $value);
133134
$tz = null;
135+
/** @psalm-suppress ImpureFunctionCall false positive in version php 7.4 */
134136
if (str_contains($time, '+')) {
135137
[$time, $timezone] = explode('+', $time);
136138
[$tzHours, $tzMinutes] = explode(':', $timezone);

0 commit comments

Comments
 (0)