for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Claudsonm\Pedi\Structure\Types;
use Claudsonm\Pedi\Exceptions\PediException;
use Claudsonm\Pedi\Structure\Field;
class Any implements Type
{
/**
* {@inheritdoc}
*/
public function castFromLine(Field $field, $value)
if (! $this->isValidInput($value)) {
throw PediException::invalidInput($field, str_replace("\n", '\n', $value));
}
return (string) $value;
public function castToString(Field $field, $value): string
public function isValidInput($value): bool
return preg_match('/^.*$/', $value);