Skip to content

Commit

Permalink
TASK: Cookie Punch -> Rector
Browse files Browse the repository at this point in the history
  • Loading branch information
skurfuerst committed Oct 26, 2023
1 parent d3ee75e commit 95b609d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Classes/Eel/Helper/CookiePunchConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ public function translate($path): ?string

/**
* @param array $services
* @param NodeInterface $siteNode
* @param \Neos\ContentRepository\Core\Projection\ContentGraph\Node $siteNode
* @return array
* @throws Exception
*/
public function filterServicesArrayByWhenCondition(array $services, NodeInterface $siteNode): array
public function filterServicesArrayByWhenCondition(array $services, \Neos\ContentRepository\Core\Projection\ContentGraph\Node $siteNode): array
{
return array_filter($services, function($service) use(&$siteNode) {
return !isset($service['when']) || $this->evaluateEelExpression($service['when'], $siteNode);
Expand All @@ -57,11 +57,11 @@ public function filterServicesArrayByWhenCondition(array $services, NodeInterfac

/**
* @param string $eelExpression
* @param NodeInterface $siteNode
* @param \Neos\ContentRepository\Core\Projection\ContentGraph\Node $siteNode
* @return bool
* @throws Exception for invalid eel expressions
*/
public function evaluateEelExpression(string $eelExpression, NodeInterface $siteNode): bool
public function evaluateEelExpression(string $eelExpression, \Neos\ContentRepository\Core\Projection\ContentGraph\Node $siteNode): bool
{
if (preg_match(\Neos\Eel\Package::EelExpressionRecognizer, $eelExpression)) {
$defaultContextVariables = EelUtility::getDefaultContextVariables($this->defaultContext);
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/Eel/Helper/CookiePunchConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public function initDummySiteNode() {
$this->dummySiteNode = new Node(
new NodeData(
"/sites/website",
new Workspace("")),
new Context("",
new \Neos\ContentRepository\Core\Projection\Workspace\Workspace("")),
new \Neos\Rector\ContentRepository90\Legacy\LegacyContextStub("",
new DateTime(),
[],
[],
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
],
"license": "MIT",
"require": {
"neos/neos": "^5.0 || ^7.0 || ^8.0 || ^9.0 || dev-master"
"neos/neos": "^9.0"
},
"authors": [
{
Expand Down

0 comments on commit 95b609d

Please sign in to comment.