for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* Copyright (c) Arnaud Ligny <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cecil\Renderer;
use Cecil\Builder;
use Cecil\Collection\Page\Page;
use Cecil\Config;
use Cecil\Exception\Exception;
/**
* Class Site.
class Site
{
* Builder object.
* @var Builder
protected $builder;
* Configuration object.
* @var Config
protected $config;
* Site constructor.
* @param Config $config
$config
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
public function __construct(Builder $builder)
$this->builder = $builder;
$this->config = $builder->getConfig();
}
public function __call($method, $args) {
$camelMethod = 'get'.ucwords($method);
// local method
if (method_exists($this, $camelMethod)) {
return $this->$camelMethod($args);
// Config method
if (method_exists($this->config, $camelMethod)) {
return $this->config->$camelMethod($args);
// Config Data
return $this->config->get($method);
public function getPages() {
return $this->builder->getPages()->filter(function (Page $page) {
return $page->getVariable('published');
});
public function getMenus() {
return $this->builder->getMenus();
public function getTaxonomies() {
return $this->builder->getTaxonomies();
public function getTime() {
return time();
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.