implemented pipe closure with $next as the first parameter

This commit is contained in:
Fabio Ivona
2021-10-10 01:02:04 +02:00
parent bc4e5b9b4e
commit fc53f08e37
6 changed files with 55 additions and 87 deletions

View File

@ -1,17 +1,14 @@
<?php
declare(strict_types=1);
namespace Pest\Exceptions;
use Exception;
class PipeException extends Exception
final class PipeException extends Exception
{
public static function optionalParmetersShouldBecomeRequired(string $expectationName): PipeException
{
return new self("You're attempting to pipe '$expectationName', but in pipelines optional parmeters should be declared as required)");
}
public static function expectationNotFound($expectationName): PipeException
public static function expectationNotFound(string $expectationName): PipeException
{
return new self("Expectation $expectationName was not found in Pest");
}