mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 08:17:22 +01:00
implemented pipe closure with $next as the first parameter
This commit is contained in:
@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user