Fix code style
This commit is contained in:
parent
a7aff213de
commit
d02ac85697
@ -15,7 +15,8 @@ class Builder
|
|||||||
'.DS_Store', 'Thumbs.db',
|
'.DS_Store', 'Thumbs.db',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected static function isIgnored(\SplFileInfo $file, $ignore) {
|
protected static function isIgnored(\SplFileInfo $file, $ignore)
|
||||||
|
{
|
||||||
if (in_array($file->getFilename(), static::$IGNORED)) {
|
if (in_array($file->getFilename(), static::$IGNORED)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -59,8 +59,7 @@ class Directory extends Entry
|
|||||||
/*
|
/*
|
||||||
If the inherit_index flag is set, then we seek child content
|
If the inherit_index flag is set, then we seek child content
|
||||||
*/
|
*/
|
||||||
if (
|
if ($this->getConfig()['mode'] == Daux::LIVE_MODE
|
||||||
$this->getConfig()['mode'] == Daux::LIVE_MODE
|
|
||||||
&& !empty($this->getConfig()['live']['inherit_index'])
|
&& !empty($this->getConfig()['live']['inherit_index'])
|
||||||
&& $first_page = $this->seekFirstPage()
|
&& $first_page = $this->seekFirstPage()
|
||||||
) {
|
) {
|
||||||
@ -74,18 +73,18 @@ class Directory extends Entry
|
|||||||
* Seek the first available page from descendants
|
* Seek the first available page from descendants
|
||||||
* @return Content|null
|
* @return Content|null
|
||||||
*/
|
*/
|
||||||
public function seekFirstPage(){
|
public function seekFirstPage()
|
||||||
|
{
|
||||||
if ($this instanceof Directory) {
|
if ($this instanceof Directory) {
|
||||||
$index_key = $this->getConfig()['index_key'];
|
$index_key = $this->getConfig()['index_key'];
|
||||||
if (isset($this->children[$index_key])) {
|
if (isset($this->children[$index_key])) {
|
||||||
return $this->children[$index_key];
|
return $this->children[$index_key];
|
||||||
}
|
}
|
||||||
foreach( $this->children AS $node_key => $node ){
|
foreach ($this->children as $node_key => $node) {
|
||||||
if ($node instanceof Content) {
|
if ($node instanceof Content) {
|
||||||
return $node;
|
return $node;
|
||||||
}
|
}
|
||||||
if(
|
if ($node instanceof Directory
|
||||||
$node instanceof Directory
|
|
||||||
&& strpos($node->getUri(), '.') !== 0
|
&& strpos($node->getUri(), '.') !== 0
|
||||||
&& $childNode = $node->seekFirstPage() ) {
|
&& $childNode = $node->seekFirstPage() ) {
|
||||||
return $childNode;
|
return $childNode;
|
||||||
|
Loading…
Reference in New Issue
Block a user