for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PHPKitchen\CodeSpecsCore\Expectation\Dispatcher;
/**
* Extends base dispatcher to delay asserts.
*
* Asserts won;t be executed once they are called and only would be started when
* matcher object would ca called as a function.
* For example:
* <code>
* $delayedMatcher = $dispatcher->isArray()->isNotEmpty()->hasKey('name');
* $delayedMatcher($myArray);
* </code>
* @package PHPKitchen\CodeSpecsCore\Expectation\Dispatchers
* @author Dmitry Kolodko <[email protected]>
*/
class DelayedDispatcher extends Dispatcher {
protected function init(): void {
$this->useDelayedAsserts = true;
}