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

Conversation

@samsonasik
Copy link
Contributor

  • Is this related to quality assurance?

@samsonasik
Copy link
Contributor Author

after some check, it is actually needed, ref https://3v4l.org/umaZC

@samsonasik samsonasik closed this May 7, 2018
@samsonasik samsonasik deleted the strrpos branch May 7, 2018 17:52
@samsonasik samsonasik restored the strrpos branch May 7, 2018 17:55
@samsonasik
Copy link
Contributor Author

strrpos still possible, but with keep the strlen() usage, ref https://3v4l.org/I2N7t

@samsonasik samsonasik reopened this May 7, 2018
@samsonasik samsonasik changed the title change combination of strlen() and substr() check with strrpos at InjectTemplateListener::deriveControllerClass() change substr() check with strrpos at InjectTemplateListener::deriveControllerClass() May 7, 2018
Copy link
Member

@michalbundyra michalbundyra left a comment

Choose a reason for hiding this comment

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

Not convinced to this change, imo it decreased readability.

&& ('Controller' == substr($controller, -10))
$length = strlen($controller);
if ($length > 10
&& strrpos($controller, 'Controller') === ($length - 10)
Copy link
Member

Choose a reason for hiding this comment

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

Brackets are useless around ($length - 10).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done ;)

@Xerkus
Copy link
Member

Xerkus commented Feb 17, 2019

I would agree with @webimpress, this PR in its final form does not bring notable improvement. I am going to close this now.

@Xerkus Xerkus closed this Feb 17, 2019
@samsonasik samsonasik deleted the strrpos branch February 17, 2019 03:19
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.

3 participants