Skip to content
Merged
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/Nodes/SVGNodeContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct()
*
* @return $this This node instance, for call chaining.
*/
public function addChild(SVGNode $node, int $index = null): SVGNodeContainer
public function addChild(SVGNode $node, ?int $index = null): SVGNodeContainer
{
if ($node === $this || $node->parent === $this) {
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/Nodes/Shapes/SVGPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class SVGPath extends SVGNodeContainer
/**
* @param string|null $d The path description.
*/
public function __construct(string $d = null)
public function __construct(?string $d = null)
{
parent::__construct();

Expand Down
6 changes: 3 additions & 3 deletions src/Nodes/Shapes/SVGPolygonalShape.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
abstract class SVGPolygonalShape extends SVGNodeContainer
{
/**
* @param array[] $points Array of points (float 2-tuples).
* @param array[]|null $points Array of points (float 2-tuples).
*/
public function __construct(array $points = null)
public function __construct(?array $points = null)
{
parent::__construct();

if (isset($points)) {
if ($points !== null) {
$this->setAttribute('points', self::joinPoints($points));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Nodes/Structures/SVGClipPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class SVGClipPath extends SVGNodeContainer
{
public const TAG_NAME = 'clipPath';

public function __construct(string $id = null)
public function __construct(?string $id = null)
{
parent::__construct();

Expand Down
2 changes: 1 addition & 1 deletion src/Rasterization/Transform/TransformParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class TransformParser
* @param Transform|null $applyTo The optional starting Transform. If not provided, the identity will be used.
* @return Transform Either the mutated argument transform, or the newly computed transform.
*/
public static function parseTransformString(?string $input, Transform $applyTo = null): Transform
public static function parseTransformString(?string $input, ?Transform $applyTo = null): Transform
{
$transform = $applyTo ?? Transform::identity();
if ($input === null) {
Expand Down
Loading