Skip to content

Instantly share code, notes, and snippets.

@vvondra
Forked from hrach/dynamicReturnTypeMeta.json
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vvondra/17304d296dd35cdb70b3 to your computer and use it in GitHub Desktop.
Save vvondra/17304d296dd35cdb70b3 to your computer and use it in GitHub Desktop.

HowTo

  • nainstaluj plugin DynamicReturnType
  • do projektu přijej soubor dynamicReturnTypeMeta.json.
  • soubor bohužel musí být v projektu, proto doporučujeme složku .idea
  • zační používat a IDE začne napovídat.
$foo = Mockery::mock(Nette\Caching\IStorage::class);
$foo->... // napoví MockInterface i metody IStorage

$bar = $container->getByType(Nette\Caching\IStorage::class);
$bar->... // napoví metody IStorage
{
"methodCalls": [
{
"class": "\\Mockery",
"method": "mock",
"position": 0,
"mask": "%s|\\Mockery\\MockInterface"
},
{
"class": "\\Nette\\DI\\Container",
"method": "getByType",
"position": 0
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment