Skip to content

Commit 43b757b

Browse files
committed
Fix PHP 8.1 deprecations
1 parent 40b9b55 commit 43b757b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Util/YamlSourceManipulator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ private function updateContents(string $newContents, array $newData, int $newPos
714714
private function convertToYaml($data)
715715
{
716716
$indent = $this->depth > 0 && isset($this->indentationForDepths[$this->depth])
717-
? $this->indentationForDepths[$this->depth] / $this->depth
717+
? intdiv($this->indentationForDepths[$this->depth], $this->depth)
718718
: 4;
719719

720720
$newDataString = Yaml::dump($data, 4, $indent);
@@ -1132,7 +1132,7 @@ private function removeMetadataKeys(array $data)
11321132
unset($data[$key]);
11331133
}
11341134

1135-
if (0 === strpos($val, self::COMMENT_PLACEHOLDER_VALUE)) {
1135+
if (null !== $val && 0 === strpos($val, self::COMMENT_PLACEHOLDER_VALUE)) {
11361136
unset($data[$key]);
11371137
}
11381138
}

0 commit comments

Comments
 (0)