for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace mvc\core\meta;
abstract class Controller
{
public function render($view, $params = []): string
$layoutContent = $this->layoutContent();
$viewContent = $this->renderOnlyView($view, $params);
return str_replace('{{content}}', $viewContent, $layoutContent);
}
public function layoutContent(): string
ob_start();
include_once ROOT_DIR . "/app/views/layouts/base.php";
return ob_get_clean();
protected function renderOnlyView($view, $data): string
$data
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
protected function renderOnlyView($view, /** @scrutinizer ignore-unused */ $data): string
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
include_once ROOT_DIR . "/app/views/pages/$view.php";
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.