for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
/**
* This source file is subject to the license that is bundled with this package in the file LICENSE.
*/
namespace PhUml\Processors;
final class ImageProcessorName
{
/** @var string[] */
private const NAMES = ['neato', 'dot'];
private readonly string $name;
public function __construct(string $name)
if (! \in_array($name, self::NAMES, true)) {
throw UnknownImageProcessor::named($name, self::NAMES);
}
$this->name = $name;
name
PhUml\Processors\ImageProcessorName
public function command(): string
return $this->name;
public function value(): string
return ucfirst($this->name);
public function isDot(): bool
return $this->name === 'dot';