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

View helpers cleanup #4137

Closed
wants to merge 4 commits into from
Closed

View helpers cleanup #4137

wants to merge 4 commits into from

Conversation

MatyCZ
Copy link
Contributor

@MatyCZ MatyCZ commented Mar 28, 2013

Overview:

  • Comments cleanup
  • CS cleanup
  • Add some missing docblocks and comments
  • Properties are sorted alphabetically
  • Methods in blocks are sorted alphabetically
  • All helpers now follow this structure set_, get_, has*
  • Some minor changes

Every helper now follow this structure:

__construct()
__invoke()
__call()
toString()
render()
toString()
...
set
()
get
()
has*()

@@ -157,6 +157,7 @@
public function setDoctype($doctype)
{
$this->getDoctypeHelper()->setDoctype($doctype);

Copy link
Member

Choose a reason for hiding this comment

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

We don't really need additional whitespace when there are only two lines in the method. (This comment applies throughout the changeset.)

@weierophinney
Copy link
Member

I appreciate the work -- it provides a lot of consistency.

A few points:

  • As noted in another comment already, there's a lot of whitespace addition where none is really needed.
  • I'd actually move __toString() to go with the other magic methods (__construct(), __invoke(), etc.). This more properly groups object behavioral methods together.
  • Because of the widespread changes, I'll likely merge to the develop branch, so we can catch any errors well in advance of a release. (You do not need to change the branch you're issuing the PR against; this is more an FYI.)

Matej Szendi added 3 commits March 29, 2013 00:57
Properties are sorted alphabetically
Methods are sorted to logical blocks: magic, renders, helper functions and setters/getters
Methods in blocks are sorted alphabetically
All helpers now follow this structure set*, get*, has*
Properties are sorted alphabetically
Methods are sorted to logical blocks: magic, renders, helper functions and setters/getters
Methods in blocks are sorted alphabetically
All helpers now follow this structure set*, get*, has*
@ghost ghost assigned weierophinney Apr 11, 2013
weierophinney added a commit that referenced this pull request Apr 11, 2013
View helpers cleanup

Conflicts:
	library/Zend/Form/View/Helper/FormRow.php
	library/Zend/I18n/View/Helper/NumberFormat.php
	library/Zend/View/Helper/HeadMeta.php
	library/Zend/View/Helper/Navigation/AbstractHelper.php
	library/Zend/View/Helper/Placeholder.php
	library/Zend/View/Helper/Placeholder/Container/AbstractStandalone.php
weierophinney added a commit that referenced this pull request Apr 11, 2013
- ran php-cs-fixer
weierophinney added a commit that referenced this pull request Apr 11, 2013
@weierophinney
Copy link
Member

Merged to develop for release with 2.2.0.

weierophinney added a commit that referenced this pull request Apr 11, 2013
- Decimal representations in NumberFormat view helper were broken due to
  bad merge.
weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
…elperCleanup

View helpers cleanup

Conflicts:
	library/Zend/Form/View/Helper/FormRow.php
	library/Zend/I18n/View/Helper/NumberFormat.php
	library/Zend/View/Helper/HeadMeta.php
	library/Zend/View/Helper/Navigation/AbstractHelper.php
	library/Zend/View/Helper/Placeholder.php
	library/Zend/View/Helper/Placeholder/Container/AbstractStandalone.php
weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-i18n that referenced this pull request May 15, 2015
- Decimal representations in NumberFormat view helper were broken due to
  bad merge.
weierophinney added a commit to zendframework/zend-view that referenced this pull request May 15, 2015
…elperCleanup

View helpers cleanup

Conflicts:
	library/Zend/Form/View/Helper/FormRow.php
	library/Zend/I18n/View/Helper/NumberFormat.php
	library/Zend/View/Helper/HeadMeta.php
	library/Zend/View/Helper/Navigation/AbstractHelper.php
	library/Zend/View/Helper/Placeholder.php
	library/Zend/View/Helper/Placeholder/Container/AbstractStandalone.php
weierophinney added a commit to zendframework/zend-view that referenced this pull request May 15, 2015
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.

2 participants