Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Fixes #4670 #5567

Merged
merged 3 commits into from
Feb 15, 2014
Merged

Fixes #4670 #5567

merged 3 commits into from
Feb 15, 2014

Conversation

samsonasik
Copy link
Contributor

Fixes #4670

@@ -649,7 +649,12 @@ public function removeMethod($methodName)
*/
public function hasMethod($methodName)
{
return isset($this->methods[$methodName]);
Copy link
Member

Choose a reason for hiding this comment

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

Instead normalize the array key at the moment of set the value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Maks3w what you mean ?

Copy link
Member

Choose a reason for hiding this comment

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

here write return isset($this->methods[strtolower($methodName)]);

and change line 603 adding a strtolower to the key var.
Replace 596 with a call to hasMethod

Refactor getMethod and removeMethod removing the loops

Copy link
Member

Choose a reason for hiding this comment

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

As you see fixing the issue here only change the visible problem but don't fix the source of the problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Maks3w done ;)

@samsonasik
Copy link
Contributor Author

@Maks3w done ;), please let me know if I missed something. thanks.

@RSully
Copy link

RSully commented Feb 7, 2014

What is the status of this?

@samsonasik
Copy link
Contributor Author

I'm waiting for merge or review again if any something missed...

@ghost ghost assigned Maks3w Feb 15, 2014
Maks3w added a commit that referenced this pull request Feb 15, 2014
Maks3w added a commit that referenced this pull request Feb 15, 2014
Maks3w added a commit that referenced this pull request Feb 15, 2014
@Maks3w Maks3w merged commit a7e9391 into zendframework:master Feb 15, 2014
@samsonasik samsonasik deleted the fix/codehasmethod branch March 8, 2014 02:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zend\Code\Generator\ClassGenerator enhancement
3 participants