This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Added fix to prevent method lines to be intended again and again #7210
Merged
weierophinney
merged 3 commits into
zendframework:develop
from
RalfEggert:bug/method-indention-from-class-reflection
Feb 25, 2015
Merged
Added fix to prevent method lines to be intended again and again #7210
weierophinney
merged 3 commits into
zendframework:develop
from
RalfEggert:bug/method-indention-from-class-reflection
Feb 25, 2015
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think this can use a test 😉 |
@@ -61,12 +61,41 @@ public static function fromReflection(MethodReflection $reflectionMethod) | |||
$method->setParameter(ParameterGenerator::fromReflection($reflectionParameter)); | |||
} | |||
|
|||
$method->setBody($reflectionMethod->getBody()); | |||
$method->setBody(self::clearBodyIndention($reflectionMethod->getBody())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static::
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
…yIndention() method
I added a unit test |
<?php | ||
/** | ||
* File header here | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license header here :
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
…leClassMultiLines
Would be great if this fix could be added to milestone 2.4.0... |
weierophinney
added a commit
that referenced
this pull request
Feb 25, 2015
…ass-reflection Added fix to prevent method lines to be intended again and again
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #7209
It makes sure that all unnecessary leading spaces from all code lines within a method are removed properly. Please look into issue #7209 for more details.