Skip to content

Instantly share code, notes, and snippets.

@fprochazka
Forked from hrach/dynamicReturnTypeMeta.json
Last active August 29, 2015 14:21
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 fprochazka/acf04463d5bd25721151 to your computer and use it in GitHub Desktop.
Save fprochazka/acf04463d5bd25721151 to your computer and use it in GitHub Desktop.

HowTo

  • nainstaluj plugin DynamicReturnType
  • do projektu přidej 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
},
{
"class": "\\Doctrine\\ORM\\EntityManager",
"method": "find",
"position": 0
},
{
"class": "\\Doctrine\\ORM\\EntityManager",
"method": "getReference",
"position": 0
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment