mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
27 lines
644 B
PHP
27 lines
644 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pest\Exceptions;
|
|
|
|
use LogicException;
|
|
use NunoMaduro\Collision\Contracts\RenderlessEditor;
|
|
use NunoMaduro\Collision\Contracts\RenderlessTrace;
|
|
use Symfony\Component\Console\Exception\ExceptionInterface;
|
|
|
|
/**
|
|
* @internal
|
|
*/
|
|
final class InvalidExpectation extends LogicException implements ExceptionInterface, RenderlessEditor, RenderlessTrace
|
|
{
|
|
/**
|
|
* @param array<int, string> $methods
|
|
*
|
|
* @throws self
|
|
*/
|
|
public static function fromMethods(array $methods): never
|
|
{
|
|
throw new self(sprintf('Expectation [%s] is not valid.', implode('->', $methods)));
|
|
}
|
|
}
|