for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
/**
* PHP version 7.4
*
* 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 static array $names = ['neato', 'dot'];
private string $name;
public function __construct(string $name)
if (! \in_array($name, self::$names, true)) {
throw UnknownImageProcessor::named($name, self::$names);
}
$this->name = $name;
public function command(): string
return $this->name;
public function value(): string
return ucfirst($this->name);
public function isDot(): bool
return $this->name === 'dot';