for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace League\Plates;
/** Template value object */
final class Template
{
public $name;
public $data;
public $context;
// public $content;
public function __construct(
$name,
array $data = [],
array $context = [],
Content $content = null
$content
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
) {
$this->name = $name;
$this->data = $data;
$this->context = $context;
// $this->content = $content ?: Content\StringContent::empty();
}
public function addData(array $data) {
$this->data = array_merge($this->data, $data);
return $this;
public function addContext(array $context) {
$this->context = array_merge($this->context, $context);
public function resolveName(callable $resolve_name) {
return $resolve_name($this->name, $this->context);
public function resolveData(callable $resolve_data) {
return $resolve_data($this->data, $this->context);
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.