-
-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
Last change on this line cause an error.
di/src/DI/DependencyChecker.php
Line 182 in f9ca71d
? is_object($tmp = $param->getDefaultValue()) ? ['object' => $tmp::class] : ['value' => $tmp] |
Previous code works well
? is_object($tmp = Reflection::getParameterDefaultValue($param)) ? ['object' => $tmp::class] : ['value' => $tmp]
When I have a Presenter that use trait that contains the following code:
<?php
declare(strict_types=1);
namespace Interitty\FlashMessageControl;
use Nette\ComponentModel\IComponent as ComponentInterface;
use function assert;
trait FlashMessageControlHelperTrait
{
/** All available control name constants */
public const CONTROL_FLASH_MESSAGE = 'flashMessage';
/**
* Componentby name getter
*
* @param bool $throw Throw exception if component doesn't exist?
* @return ComponentInterface|null
*/
abstract public function getComponent(string $name, bool $throw = true): ?ComponentInterface;
/**
* FlashMessage control getter
*
* @param string $name [OPTIONAL]
* @return FlashMessageControl
*/
public function getComponentFlashMessage(string $name = self::CONTROL_FLASH_MESSAGE): FlashMessageControl
{
$control = $this->getComponent($name);
assert($control instanceof FlashMessageControl);
return $control;
}
}
Metadata
Metadata
Assignees
Labels
No labels