for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace NotificationChannels\Fcm\Resources;
class LightSettings implements FcmResource
{
/**
* @var Color
*/
protected $color;
* @var string|null
protected $lightOnDuration;
protected $lightOffDuration;
* @return static
public static function create(): self
return new self;
}
* @return Color
public function getColor(): Color
return $this->color;
* @param Color $color
* @return LightSettings
public function setColor(Color $color): self
$this->color = $color;
return $this;
* @return string|null
public function getLightOnDuration(): ?string
return $this->lightOnDuration;
* @param string|null $lightOnDuration
public function setLightOnDuration(?string $lightOnDuration): self
$this->lightOnDuration = $lightOnDuration;
public function getLightOffDuration(): ?string
return $this->lightOffDuration;
* @param string|null $lightOffDuration
public function setLightOffDuration(?string $lightOffDuration): self
$this->lightOffDuration = $lightOffDuration;
* {@inheritdoc}
public function toArray(): array
return [
'color' => ! is_null($this->getColor()) ? $this->getColor()->toArray() : null,
'light_on_duration' => $this->getLightOnDuration(),
'light_off_duration' => $this->getLightOffDuration(),
];