Fix bugs reported by scrutinizer
This commit is contained in:
@ -167,7 +167,7 @@ class Builder
|
||||
/**
|
||||
* @param Directory $parent
|
||||
* @param string $path
|
||||
* @return Content
|
||||
* @return ContentAbstract
|
||||
*/
|
||||
public static function getOrCreatePage(Directory $parent, $path)
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use Webuni\FrontMatter\FrontMatter;
|
||||
|
||||
class Content extends Entry
|
||||
class Content extends ContentAbstract
|
||||
{
|
||||
/** @var string */
|
||||
protected $content;
|
||||
|
24
libs/Tree/ContentAbstract.php
Normal file
24
libs/Tree/ContentAbstract.php
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user