for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace AmaTeam\ElasticSearch\API\Mapping\Validation;
class DefaultContext implements ContextInterface
{
/**
* @var string[]
*/
private $path = [];
* @var bool
private $ignoreUnknownParameters = false;
* @return string[]
public function getPath(): array
return $this->path;
}
* @param string[] $path
* @return $this
public function setPath(array $path)
$this->path = $path;
return $this;
* @return bool
public function shouldIgnoreUnknownParameters(): bool
return $this->ignoreUnknownParameters;
* @param bool $ignoreUnknownParameters
public function setIgnoreUnknownParameters(bool $ignoreUnknownParameters)
$this->ignoreUnknownParameters = $ignoreUnknownParameters;
public static function from(ContextInterface $context): DefaultContext
return (new DefaultContext())
->setPath($context->getPath())
->setIgnoreUnknownParameters($context->shouldIgnoreUnknownParameters());