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

Simplify FileCacheStorage #593

Merged
merged 6 commits into from
Jul 26, 2021
Merged

Simplify FileCacheStorage #593

merged 6 commits into from
Jul 26, 2021

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Jul 26, 2021

while porting the cache impl to rector I stumbled over this line - which I think can be simplified.

@@ -55,7 +55,7 @@ public function load(string $key, string $variableKey)
}

return $cacheItem->getData();
})($key, $variableKey);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

instead of defining a function and immediately invoking it, I wen't with closure-params which feels easier to read for me

@ondrejmirtes ondrejmirtes merged commit 5606520 into phpstan:master Jul 26, 2021
@ondrejmirtes
Copy link
Member

Thank you.

@staabm staabm deleted the patch-1 branch July 26, 2021 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants