Fix bugs reported by scrutinizer

This commit is contained in:
Stéphane Goetz
2016-07-29 22:38:03 +02:00
parent fb5fb41e96
commit 948f2aaa39
12 changed files with 66 additions and 48 deletions

View File

@ -167,7 +167,7 @@ class Builder
/**
* @param Directory $parent
* @param string $path
* @return Content
* @return ContentAbstract
*/
public static function getOrCreatePage(Directory $parent, $path)
{

View File

@ -1,23 +1,5 @@
<?php namespace Todaymade\Daux\Tree;
class ComputedRaw extends Entry
class ComputedRaw extends ContentAbstract
{
/** @var string */
protected $content;
/**
* @return string
*/
public function getContent()
{
return $this->content;
}
/**
* @param string $content
*/
public function setContent($content)
{
$this->content = $content;
}
}

View File

@ -2,7 +2,7 @@
use Webuni\FrontMatter\FrontMatter;
class Content extends Entry
class Content extends ContentAbstract
{
/** @var string */
protected $content;

View File

@ -0,0 +1,24 @@
<?php namespace Todaymade\Daux\Tree;
abstract class ContentAbstract extends Entry
{
/** @var string */
protected $content;
/**
* @return string
*/
public function getContent()
{
return $this->content;
}
/**
* @param string $content
*/
public function setContent($content)
{
$this->content = $content;
}
}