File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public function __construct()
41
41
*
42
42
* @return $this This node instance, for call chaining.
43
43
*/
44
- public function addChild (SVGNode $ node , int $ index = null ): SVGNodeContainer
44
+ public function addChild (SVGNode $ node , ? int $ index = null ): SVGNodeContainer
45
45
{
46
46
if ($ node === $ this || $ node ->parent === $ this ) {
47
47
return $ this ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class SVGPath extends SVGNodeContainer
19
19
/**
20
20
* @param string|null $d The path description.
21
21
*/
22
- public function __construct (string $ d = null )
22
+ public function __construct (? string $ d = null )
23
23
{
24
24
parent ::__construct ();
25
25
Original file line number Diff line number Diff line change 12
12
abstract class SVGPolygonalShape extends SVGNodeContainer
13
13
{
14
14
/**
15
- * @param array[] $points Array of points (float 2-tuples).
15
+ * @param array[]|null $points Array of points (float 2-tuples).
16
16
*/
17
- public function __construct (array $ points = null )
17
+ public function __construct (? array $ points = null )
18
18
{
19
19
parent ::__construct ();
20
20
21
- if (isset ( $ points) ) {
21
+ if ($ points !== null ) {
22
22
$ this ->setAttribute ('points ' , self ::joinPoints ($ points ));
23
23
}
24
24
}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class SVGClipPath extends SVGNodeContainer
12
12
{
13
13
public const TAG_NAME = 'clipPath ' ;
14
14
15
- public function __construct (string $ id = null )
15
+ public function __construct (? string $ id = null )
16
16
{
17
17
parent ::__construct ();
18
18
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ final class TransformParser
15
15
* @param Transform|null $applyTo The optional starting Transform. If not provided, the identity will be used.
16
16
* @return Transform Either the mutated argument transform, or the newly computed transform.
17
17
*/
18
- public static function parseTransformString (?string $ input , Transform $ applyTo = null ): Transform
18
+ public static function parseTransformString (?string $ input , ? Transform $ applyTo = null ): Transform
19
19
{
20
20
$ transform = $ applyTo ?? Transform::identity ();
21
21
if ($ input === null ) {
You can’t perform that action at this time.
0 commit comments