for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Shoot\Shoot\Tests\Fixtures;
use Shoot\Shoot\HasPresenterInterface;
use Shoot\Shoot\PresentationModel;
use Shoot\Shoot\View;
final class ViewFactory
{
/**
* @return View
*/
public static function create(): View
return self::createWithCallback(function () {
// noop
});
}
* @param callable $callback
*
public static function createWithCallback(callable $callback): View
$presentationModel = new class extends PresentationModel implements HasPresenterInterface
protected $variable = '';
public function getPresenterName(): string
return 'MockPresenter';
};
return new View('template.twig', $presentationModel, $callback);