8000 generated factories: fix return type by matej21 · Pull Request #152 · nette/di · GitHub
[go: up one dir, main page]

Skip to content

generated factories: fix return type#152

Merged
dg merged 1 commit intonette:masterfrom
matej21:fix/return-type-covariance
Apr 12, 2017
Merged

generated factories: fix return type#152
dg merged 1 commit intonette:masterfrom
matej21:fix/return-type-covariance

Conversation

@matej21
Copy link
Contributor
@matej21 matej21 commented Apr 11, 2017
  • bug fix? yes
  • new feature? no
  • BC break? no

because php does not support return type covariance

@matej21 matej21 force-pushed the fix/return-type-covariance branch 2 times, most recently from 37c02a0 to bd30fea Compare April 11, 2017 14:10
->setParameters($this->convertParameters($def->parameters))
->setBody(str_replace('$this', '$this->container', $code))
->setReturnType($def->getClass());
->setReturnType(Reflection::getReturnType($rm)?: $def->getClass());
Copy link
Contributor

Choose a reason for hiding this comment

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

space before ?:

@matej21 matej21 force-pushed the fix/return-type-covariance branch from bd30fea to 116cebc Compare April 11, 2017 14:36
@dg
Copy link
Member
dg commented Apr 12, 2017

Thanks!

@dg dg merged commit 3e65fd5 into nette:master Apr 12, 2017
dg pushed a commit that referenced this pull request Apr 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0