Skip to content

Commit

Permalink
fix: implicit nullable parameters (part 3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris8934 committed Dec 12, 2024
1 parent a83b0d0 commit 968a9a7
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 31 deletions.
12 changes: 6 additions & 6 deletions src/Control/ControlManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function getFullscreenControl()
return $this->fullscreenControl;
}

public function setFullscreenControl(FullscreenControl $fullscreenControl = null)
public function setFullscreenControl(?FullscreenControl $fullscreenControl = null)
{
$this->fullscreenControl = $fullscreenControl;
}
Expand All @@ -88,7 +88,7 @@ public function getMapTypeControl()
return $this->mapTypeControl;
}

public function setMapTypeControl(MapTypeControl $mapTypeControl = null)
public function setMapTypeControl(?MapTypeControl $mapTypeControl = null)
{
$this->mapTypeControl = $mapTypeControl;
}
Expand All @@ -109,7 +109,7 @@ public function getRotateControl()
return $this->rotateControl;
}

public function setRotateControl(RotateControl $rotateControl = null)
public function setRotateControl(?RotateControl $rotateControl = null)
{
$this->rotateControl = $rotateControl;
}
Expand All @@ -130,7 +130,7 @@ public function getScaleControl()
return $this->scaleControl;
}

public function setScaleControl(ScaleControl $scaleControl = null)
public function setScaleControl(?ScaleControl $scaleControl = null)
{
$this->scaleControl = $scaleControl;
}
Expand All @@ -151,7 +151,7 @@ public function getStreetViewControl()
return $this->streetViewControl;
}

public function setStreetViewControl(StreetViewControl $streetViewControl = null)
public function setStreetViewControl(?StreetViewControl $streetViewControl = null)
{
$this->streetViewControl = $streetViewControl;
}
Expand All @@ -172,7 +172,7 @@ public function getZoomControl()
return $this->zoomControl;
}

public function setZoomControl(ZoomControl $zoomControl = null)
public function setZoomControl(?ZoomControl $zoomControl = null)
{
$this->zoomControl = $zoomControl;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Helper/Builder/AbstractJavascriptHelperBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ abstract class AbstractJavascriptHelperBuilder extends AbstractHelperBuilder
*/
private $jsonBuilder;

public function __construct(Formatter $formatter = null, JsonBuilder $jsonBuilder = null)
public function __construct(?Formatter $formatter = null, ?JsonBuilder $jsonBuilder = null)
{
$this->setFormatter($formatter ?: new Formatter());
$this->setJsonBuilder($jsonBuilder ?: new JsonBuilder());
Expand Down
4 changes: 2 additions & 2 deletions src/Helper/Builder/ApiHelperBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ class ApiHelperBuilder extends AbstractJavascriptHelperBuilder
* @param string|null $key
*/
public function __construct(
Formatter $formatter = null,
JsonBuilder $jsonBuilder = null,
?Formatter $formatter = null,
?JsonBuilder $jsonBuilder = null,
$language = 'en',
$key = null
) {
Expand Down
2 changes: 1 addition & 1 deletion src/Helper/Renderer/Overlay/InfoWindowOpenRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class InfoWindowOpenRenderer extends AbstractRenderer
/**
* @return string
*/
public function render(InfoWindow $infoWindow, Map $map, Marker $marker = null)
public function render(InfoWindow $infoWindow, Map $map, ?Marker $marker = null)
{
$arguments = [$map->getVariable()];

Expand Down
2 changes: 1 addition & 1 deletion src/Helper/Renderer/Overlay/MarkerRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function setAnimationRenderer(AnimationRenderer $animationRenderer)
/**
* @return string
*/
public function render(Marker $marker, Map $map = null)
public function render(Marker $marker, ?Map $map = null)
{
$formatter = $this->getFormatter();
$jsonBuilder = $this->getJsonBuilder()
Expand Down
16 changes: 8 additions & 8 deletions src/Overlay/Icon.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ class Icon implements VariableAwareInterface
*/
public function __construct(
$url = self::DEFAULT_URL,
Point $anchor = null,
Point $origin = null,
Size $scaledSize = null,
Size $size = null,
Point $labelOrigin = null
?Point $anchor = null,
?Point $origin = null,
?Size $scaledSize = null,
?Size $size = null,
?Point $labelOrigin = null
) {
$this->setUrl($url);
$this->setAnchor($anchor);
Expand Down Expand Up @@ -108,7 +108,7 @@ public function getAnchor()
return $this->anchor;
}

public function setAnchor(Point $anchor = null)
public function setAnchor(?Point $anchor = null)
{
$this->anchor = $anchor;
}
Expand All @@ -129,7 +129,7 @@ public function getOrigin()
return $this->origin;
}

public function setOrigin(Point $origin = null)
public function setOrigin(?Point $origin = null)
{
$this->origin = $origin;
}
Expand All @@ -150,7 +150,7 @@ public function getScaledSize()
return $this->scaledSize;
}

public function setScaledSize(Size $scaledSize = null)
public function setScaledSize(?Size $scaledSize = null)
{
$this->scaledSize = $scaledSize;
}
Expand Down
14 changes: 7 additions & 7 deletions src/Overlay/Marker.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ class Marker implements ExtendableInterface, OptionsAwareInterface, StaticOption
public function __construct(
Coordinate $position,
$animation = null,
Icon $icon = null,
Symbol $symbol = null,
MarkerShape $shape = null,
?Icon $icon = null,
?Symbol $symbol = null,
?MarkerShape $shape = null,
array $options = []
) {
$this->setPosition($position);
Expand Down Expand Up @@ -136,7 +136,7 @@ public function getIcon()
return $this->icon;
}

public function setIcon(Icon $icon = null)
public function setIcon(?Icon $icon = null)
{
$this->icon = $icon;

Expand All @@ -161,7 +161,7 @@ public function getSymbol()
return $this->symbol;
}

public function setSymbol(Symbol $symbol = null)
public function setSymbol(?Symbol $symbol = null)
{
$this->symbol = $symbol;

Expand All @@ -186,7 +186,7 @@ public function getShape()
return $this->shape;
}

public function setShape(MarkerShape $shape = null)
public function setShape(?MarkerShape $shape = null)
{
$this->shape = $shape;
}
Expand All @@ -207,7 +207,7 @@ public function getInfoWindow()
return $this->infoWindow;
}

public function setInfoWindow(InfoWindow $infoWindow = null)
public function setInfoWindow(?InfoWindow $infoWindow = null)
{
$this->infoWindow = $infoWindow;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Overlay/Symbol.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Symbol implements OptionsAwareInterface, VariableAwareInterface
/**
* @param string $path
*/
public function __construct($path, Point $anchor = null, Point $labelOrigin = null, array $options = [])
public function __construct($path, ?Point $anchor = null, ?Point $labelOrigin = null, array $options = [])
{
$this->setPath($path);
$this->setAnchor($anchor);
Expand Down Expand Up @@ -85,7 +85,7 @@ public function getAnchor()
return $this->anchor;
}

public function setAnchor(Point $anchor = null)
public function setAnchor(?Point $anchor = null)
{
$this->anchor = $anchor;
}
Expand All @@ -106,7 +106,7 @@ public function getLabelOrigin()
return $this->labelOrigin;
}

public function setLabelOrigin(Point $labelOrigin = null)
public function setLabelOrigin(?Point $labelOrigin = null)
{
$this->labelOrigin = $labelOrigin;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Service/Base/AddressComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function getLongName(): ?string
return $this->longName;
}

public function setLongName(string $longName = null): void
public function setLongName(?string $longName = null): void
{
$this->longName = $longName;
}
Expand All @@ -53,7 +53,7 @@ public function getShortName(): ?string
return $this->shortName;
}

public function setShortName(string $shortName = null): void
public function setShortName(?string $shortName = null): void
{
$this->shortName = $shortName;
}
Expand Down

0 comments on commit 968a9a7

Please sign in to comment.