Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed Dec 16, 2021
1 parent 89acc59 commit 0f85b83
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
4 changes: 1 addition & 3 deletions system/src/Grav/Common/Flex/Types/Pages/PageObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,7 @@ public function exists(): bool
return $this->root ?: parent::exists();
}

// TODO: Disabled because this slows down exception handling on missing Twig template files
/* *
/**
* @return array
* /
public function __debugInfo(): array
Expand All @@ -654,7 +653,6 @@ public function __debugInfo(): array
'_content:private' => $this->getRawContent()
];
}
*/
/**
* @param array $elements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use Grav\Common\Data\Blueprint;
use Grav\Common\Media\Interfaces\MediaCollectionInterface;
use Grav\Common\Page\Header;

/**
* Methods currently implemented in Flex Page emulation layer.
Expand All @@ -21,7 +22,7 @@ interface PageContentInterface
* Gets and Sets the header based on the YAML configuration at the top of the .md file
*
* @param object|array|null $var a YAML object representing the configuration for the file
* @return object the current YAML configuration
* @return \stdClass|Header The current YAML configuration
*/
public function header($var = null);

Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Page/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ public function frontmatter($var = null)
* Gets and Sets the header based on the YAML configuration at the top of the .md file
*
* @param object|array|null $var a YAML object representing the configuration for the file
* @return object the current YAML configuration
* @return \stdClass the current YAML configuration
*/
public function header($var = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public static function normalizeRoute($route): string

/**
* @inheritdoc
* @return Header
*/
public function header($var = null)
{
Expand Down
4 changes: 1 addition & 3 deletions system/src/Grav/Framework/Flex/Traits/FlexMediaTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,7 @@ public function deleteMediaFile(string $filename): void
$this->clearMediaCache();
}

// TODO: Disabled because this slows down exception handling on missing Twig template files
/* *
/**
* @return array
* /
#[\ReturnTypeWillChange]
Expand All @@ -297,7 +296,6 @@ public function __debugInfo()
'uploads:private' => $this->getUpdatedMedia()
];
}
*/
/**
* @param array $files
Expand Down
1 change: 1 addition & 0 deletions tests/phpstan/plugins.neon
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ parameters:
- Grav\Common\GPM\Common\Package
- Grav\Common\GPM\Local\Package
- Grav\Common\GPM\Remote\Package
- Grav\Common\Page\Header
- Grav\Common\Session
- Gantry\Component\Config\Config
dynamicConstantNames:
Expand Down

0 comments on commit 0f85b83

Please sign in to comment.