mirror of
https://github.com/getgrav/grav.git
synced 2026-07-15 12:13:46 +02:00
Phpstan fixes
This commit is contained in:
@@ -39,6 +39,7 @@ class FlexPageObject extends FlexObject implements PageInterface, FlexTranslateI
|
||||
use PageAuthorsTrait;
|
||||
use PageContentTrait;
|
||||
use PageFormTrait;
|
||||
/** @phpstan-use PageLegacyTrait<FlexPageObject,FlexPageCollection> */
|
||||
use PageLegacyTrait;
|
||||
use PageRoutableTrait;
|
||||
use PageTranslateTrait;
|
||||
|
||||
@@ -37,6 +37,9 @@ use function strlen;
|
||||
|
||||
/**
|
||||
* Implements PageLegacyInterface
|
||||
*
|
||||
* @template T of FlexPageObject
|
||||
* @template C of FlexPageCollection
|
||||
*/
|
||||
trait PageLegacyTrait
|
||||
{
|
||||
@@ -862,6 +865,7 @@ trait PageLegacyTrait
|
||||
* Returns children of this page.
|
||||
*
|
||||
* @return PageCollectionInterface|FlexIndexInterface
|
||||
* @phpstan-return FlexPageIndex<T,C>
|
||||
*/
|
||||
public function children()
|
||||
{
|
||||
@@ -1040,6 +1044,7 @@ trait PageLegacyTrait
|
||||
* @param string|array $params
|
||||
* @param bool $pagination
|
||||
* @return PageCollectionInterface|Collection
|
||||
* @phpstan-return PageCollectionInterface<T,C>|Collection
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function collection($params = 'content', $pagination = true)
|
||||
@@ -1069,6 +1074,7 @@ trait PageLegacyTrait
|
||||
* @param string|array $value
|
||||
* @param bool $only_published
|
||||
* @return PageCollectionInterface|Collection
|
||||
* @phpstan-return PageCollectionInterface<T,C>|Collection
|
||||
*/
|
||||
public function evaluate($value, $only_published = true)
|
||||
{
|
||||
|
||||
@@ -21,8 +21,8 @@ use function is_object;
|
||||
* ObjectCollection Trait
|
||||
* @package Grav\Framework\Object
|
||||
*
|
||||
* @template TKey as array-key
|
||||
* @template T as ObjectInterface
|
||||
* @template TKey of array-key
|
||||
* @template T of ObjectInterface
|
||||
*/
|
||||
trait ObjectCollectionTrait
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user