Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function getMetadata()
* which is a value of any type other than a resource.
* @since 5.4.0
*/
public function jsonSerialize()
public function jsonSerialize(): mixed
{
return [
'value' => $this->getValue(),
Expand Down
4 changes: 2 additions & 2 deletions src/AssetType.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private function stableSort(&$array, $cmp_function = 'strcmp')
return;
}
// Split the array in half
$halfway = count($array) / 2;
$halfway = (int)(count($array) / 2);
$array1 = array_slice($array, 0, $halfway);
$array2 = array_slice($array, $halfway);
// Recurse to sort the two halves
Expand Down Expand Up @@ -141,7 +141,7 @@ public function getValues() : array
* which is a value of any type other than a resource.
* @since 5.4.0
*/
public function jsonSerialize()
public function jsonSerialize(): mixed
{
return array_map(function (Asset $asset) {
return $asset->jsonSerialize();
Expand Down