Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: prevent invalid return type error #169

Merged
merged 2 commits into from
Jun 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Classes/Aspect/ContentCacheSegmentAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ public function wrapCachedSegment(JoinPointInterface $joinPoint): string

/**
* @Flow\Around("method(Neos\Fusion\Core\Cache\RuntimeContentCache->evaluateUncached()) && t3n\Neos\Debug\Aspect\ContentCacheSegmentAspect->debuggingActive")
*
* @return mixed the result of uncached segments might not be of type string, so we cannot define the return type
*/
public function wrapEvaluateUncached(JoinPointInterface $joinPoint): string
public function wrapEvaluateUncached(JoinPointInterface $joinPoint)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense, thx 👍

{
$start = microtime(true);
$segment = $joinPoint->getAdviceChain()->proceed($joinPoint);
Expand Down Expand Up @@ -170,8 +172,10 @@ public function interceptFusionObject(JoinPointInterface $joinPoint): void
/**
* @param mixed $segment This is mixed as the RuntimeContentCache might also return none string values
* @param mixed[] $info
*
* @return mixed the cached data might not be of type string, so we cannot define the return type
*/
protected function renderCacheInfoIntoSegment($segment, array $info): string
protected function renderCacheInfoIntoSegment($segment, array $info)
{
$injectPosition = 2;
$info = array_slice($info, 0, $injectPosition, true)
Expand Down