for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Galileo\SettingBundle\Lib\Model\ValueObject;
use Galileo\SettingBundle\Lib\Model\Setting;
class SettingValueChooser
{
private $value;
public static function choose(Setting $setting = null, $default = null)
return new SettingValueChooser($setting, $default);
}
private function __construct(Setting $setting = null, $default = null)
$this->value = $setting ? $setting->value() : $default;
public function value()
return $this->value;