workaround PHP 8.4 deprecations

lifted from https://github.com/dmester/jdenticon-php/pull/10
This commit is contained in:
El RIDO 2025-07-05 20:09:43 +02:00
parent 7b444bf62b
commit 811b62b538
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
2 changed files with 121 additions and 121 deletions

View file

@ -426,7 +426,7 @@ class Identicon
*/ */
public function draw( public function draw(
\Jdenticon\Rendering\RendererInterface $renderer, \Jdenticon\Rendering\RendererInterface $renderer,
\Jdenticon\Rendering\Rectangle $rect = null) ?\Jdenticon\Rendering\Rectangle $rect = null)
{ {
if ($rect === null) { if ($rect === null) {
$rect = $this->getIconBounds(); $rect = $this->getIconBounds();

View file

@ -53,7 +53,7 @@ class IdenticonStyle
*/ */
private $hues; private $hues;
public function __construct(array $options = null) public function __construct(?array $options = null)
{ {
$this->backgroundColor = self::getDefaultBackgroundColor(); $this->backgroundColor = self::getDefaultBackgroundColor();
$this->padding = self::getDefaultPadding(); $this->padding = self::getDefaultPadding();