public static function createForUnreadablePropertyFromStdClass(string $propertyPath) : NoSuchPropertyException { return new NoSuchPropertyException(sprintf('Cannot read property "%s" from stdClass.', $propertyPath)); }
/** * @inheritdoc */ public function getValue($objectOrArray, $propertyPath) { if (false === $objectOrArray instanceof \stdClass) { return $this->decoratedPropertyAccessor->getValue($objectOrArray, $propertyPath); } if (false === isset($objectOrArray->{$propertyPath})) { throw NoSuchPropertyExceptionFactory::createForUnreadablePropertyFromStdClass($propertyPath); } return $objectOrArray->{$propertyPath}; }