- Removed tmp file from phpstorm

This commit is contained in:
Dave Mc Nicoll 2025-09-19 13:12:56 +00:00
parent d08d1f0fe7
commit 9070bf3862
2 changed files with 0 additions and 52 deletions

View File

@ -1,27 +0,0 @@
<?php
namespace Mcnd\CLI\Option;
class CountOption extends ParsedOption
{
protected int $count = 0;
public function toggle() : void
{
$this->count++;
}
public function getValue() : null|int
{
return $this->count ?: null;
}
public function setValue(mixed $value) : void
{
if ( ! is_int($value) ) {
throw new \RuntimeException("A value was given to an option (%s) which is countable");
}
$this->count = $value;
}
}

View File

@ -1,25 +0,0 @@
<?php
namespace Mcnd\CLI\Option;
class KeyValueOption extends ParsedOption
{
protected array $values = [];
public function setValue(string $key, string $value) : void
{
$this->values[$key] = $value;
}
public function setRawValue(string $value) : void
{
list($key, $value) = explode('=', trim($value), 2);
$this->setValue($key, $value);
}
public function getValue() : null|array
{
return $this->values ?: null;
}
}