for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Bonfim\Component\View;
class View
{
private static $view = null;
private static $data = [];
private static function view(): Tpl
__construct()
if (!isset(self::$view) || is_null(self::$view)) {
self::$view = new Tpl;
}
return self::$view;
public static function config(array $config): void
self::view()->config($config);
public static function assign(string $key, $value): void
self::$data[$key] = $value;
public static function render(string $view, array $data = null): string
$data
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public static function render(string $view, /** @scrutinizer ignore-unused */ array $data = null): string
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return self::view()->render($view, self::$data);