for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Muspelheim\C3ChartsBundle\C3;
/**
* Class ChartOption
* @package Muspelheim\C3ChartsBundle\C3
*/
class ChartOption
{
private $option;
* @param string $name
public function __construct(string $name)
$this->option = $name;
$this->{$name} = new \stdClass();
}
* @param array $value
*
* @return $this
public function __call(string $name, array $value): ChartOption
$option = $this->option;
$this->{$option}->{$name} = $value[0];
return $this;
* @return mixed
public function __get($name)
if (!property_exists($this->{$option}, $name)) {
$this->{$option}->{$name} = new static($name);
$value = $this->{$option}->{$name};
return $value;
* @return bool
public function __isset($name): bool
return isset($this->{$option}->{$name});