Skip to content

Commit

Permalink
PHP 8.4 compat nits
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Sep 4, 2024
1 parent be9a270 commit 916925b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Core/AES/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ParagonIE_Sodium_Core_AES_Block extends SplFixedArray
/**
* @param int $size
*/
public function __construct($size = 8)
public function __construct(int $size = 8)
{
parent::__construct($size);
$this->size = $size;
Expand All @@ -50,7 +50,7 @@ public static function init(): self
* @psalm-suppress MethodSignatureMismatch
*/
#[ReturnTypeWillChange]
public static function fromArray($array, $save_indexes = null)
public static function fromArray($array, ?bool $save_indexes = null)
{
$count = count($array);
if ($save_indexes) {
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Curve25519/Fe.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function offsetUnset($offset): void
* @psalm-suppress ImplementedReturnTypeMismatch
*/
#[ReturnTypeWillChange]
public function offsetGet($offset)
public function offsetGet($offset): int
{
if (!isset($this->container[$offset])) {
$this->container[$offset] = 0;
Expand Down

0 comments on commit 916925b

Please sign in to comment.