Psalm
Get started
Documentation
Paid support
Plugins
Blog
GitHub
<?php /** * @psalm-assert iterable<string> $value * @param mixed $value * * @return void */ function AssertAllString($value) : void { throw new \Exception(\var_export($value, true)); // irrelevant } /** * @param ArrayIterator<string, mixed> $value * * @return ArrayIterator<string, string> */ function preserveContainerAllArrayIterator($value) { AssertAllString($value); return $value; }
Snippet created on March 2 2021 at 15:13 UTC
Settings
Get link