Skip to content

Instantly share code, notes, and snippets.

@Chekote
Last active December 7, 2018 20:34
Show Gist options
  • Save Chekote/e68d0372cfc9e77ac8c4927608384d90 to your computer and use it in GitHub Desktop.
Save Chekote/e68d0372cfc9e77ac8c4927608384d90 to your computer and use it in GitHub Desktop.
Can't get PHPStorm's generic style notation support to work :(
<?php
/**
* @return ArrayObject<int, Result>
*/
function getResults() {
$results = new ArrayObject();
$results[] = new Result();
return $results;
}
$results = getResults();
foreach ($results as $key => $result) {
// PHPStorm 2018.3 still thinks $result is mixed :(
$result->value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment