Skip to content

Commit

Permalink
Fix PHPStan issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndiritu committed Jun 20, 2022
1 parent 377784b commit e0a15d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions serialization/php/json/src/JsonParseNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ public function getObjectValue(array $type): ?Parsable {
/** @var Parsable $result */
$result = $callableString($this);
if($this->onBeforeAssignFieldValues !== null) {
$this->getOnBeforeAssignFieldValues()($result);
$this->onBeforeAssignFieldValues($result)();
}
$this->assignFieldValues($result);
if ($this->onAfterAssignFieldValues !== null){
$this->getOnAfterAssignFieldValues()($result);
$this->onAfterAssignFieldValues($result)();
}
return $result;
}
Expand Down
6 changes: 3 additions & 3 deletions serialization/php/json/src/JsonSerializationWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,18 +159,18 @@ public function writeObjectValue(?string $key, $value): void {
$this->writePropertyName($key);
}
if ($this->onBeforeObjectSerialization !== null) {
$this->onBeforeObjectSerialization($value);
$this->onBeforeObjectSerialization($value)();
}
$this->writer [] = '{';
if ($this->onStartObjectSerialization !== null) {
$this->onStartObjectSerialization($value, $this);
$this->onStartObjectSerialization($value, $this)();
}
$value->serialize($this);
if ($this->writer[count($this->writer) - 1] === ',') {
array_pop($this->writer);
}
if ($this->onAfterObjectSerialization !== null) {
$this->onAfterObjectSerialization($value);
$this->onAfterObjectSerialization($value)();
}
$this->writer [] = '}';
}
Expand Down

0 comments on commit e0a15d9

Please sign in to comment.