-
Notifications
You must be signed in to change notification settings - Fork 79
completes hasSomething & removeSomething methods on the Classgenerator #26
Conversation
Any chance this will get merged? |
@basz just checked this again: question, are |
I added it to complement removeMethod (same class). Whether it is consistently a common thing,.. it doesn't seem to be - but I do see some remove references. |
@basz can you complete the API for the |
0b1471a
to
b8873da
Compare
*/ | ||
protected $traitUsageGenerator; |
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.
This is a BC break
I am done with this PR, review (please) the ones still missing are |
need rebase |
…out changing the format of $this->uses
e6d678d
to
6e7f0c6
Compare
*/ | ||
public function hasExtentedClass() | ||
{ | ||
return !empty($this->extendedClass); |
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.
if empty()
is used to compare against null
, then use null !== $this->extendedClass
instead, as an empty string would pass this check (and would be invalid)
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.
if (!empty($this->extendedClass)) {
$output .= ' extends ' . $this->extendedClass;
}
both null and "" should be false.
This was present. I just reused...
@Ocramius what's the plan for this? You mentioned refactoring TraitUsageGenerator::$uses which now is an strongly typed representation Can we merge this in 3 (ugly but it works) and refactor that for 4.0? |
Totally missed this PR, sorry @basz. Merging into |
…nerator' into develop Close #26
This PR introduces removeSomething and hasSomething methods to the ClassGenerator and it's helpers classes.