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

Fix undefined classes, constants and methods #6094

Closed
wants to merge 3 commits into from
Closed

Fix undefined classes, constants and methods #6094

wants to merge 3 commits into from

Conversation

micheh
Copy link
Contributor

@micheh micheh commented Apr 7, 2014

This pull request fixes undefined classes in phpDoc and one undefined class constant. In addition, the visibility for some methods was increased to protected as those methods were called with static.

@@ -179,7 +179,7 @@ public static function removeFromAttribute(array &$data, $attribName, $value)
* @param mixed $value
* @return string|null
*/
private static function valueToLdap($value)
protected static function valueToLdap($value)
Copy link
Member

Choose a reason for hiding this comment

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

Are these methods called statically only from within the class? Because I'd simply change the static:: calls to self:: calls instead of increasing visibility

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. But in my opinion these methods would be useful in possible subclasses anyway (e.g. if you want to change the conversion). Therefore I preferred the increased visibility.

Copy link
Member

Choose a reason for hiding this comment

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

I'd personally disallow inheritance usage here unless there's a very strong use-case for it - if you don't have it, then changing static:: to self:: is preferable.

@Ocramius Ocramius added Barcode and removed Barcode labels Apr 8, 2014
@Ocramius Ocramius self-assigned this Apr 8, 2014
@Ocramius Ocramius added this to the 2.3.1 milestone Apr 8, 2014
@micheh
Copy link
Contributor Author

micheh commented Apr 12, 2014

Pull request updated to use self, although I don't think its a good idea to keep those methods private.

@@ -551,7 +551,7 @@ protected function resolveAndCallInjectionMethodForInstance($instance, $method,
* @param string $method
* @param array $callTimeUserParams
* @param string $alias
* @param int|bolean $methodRequirementType
* @param int|boolean $methodRequirementType
Copy link
Contributor

Choose a reason for hiding this comment

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

use bool instead. see #3342

Copy link
Member

Choose a reason for hiding this comment

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

@samsonasik handled @786757c5ab564de8d23495566ab3fbca459e45cb

Copy link
Contributor

Choose a reason for hiding this comment

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

@Ocramius thank you ;)

@Ocramius
Copy link
Member

@micheh thanks for changing the visibility as requested. I will merge as-is: if you feel like changing visibility of the discussed methods is required, then I'd still want to see a good use-case before accepting such a change ;-)

Ocramius added a commit that referenced this pull request Apr 13, 2014
@Ocramius Ocramius closed this in d4c42f4 Apr 13, 2014
Ocramius added a commit that referenced this pull request Apr 13, 2014
@micheh micheh deleted the fix-undefined branch April 13, 2014 12:38
weierophinney pushed a commit to zendframework/zend-mail that referenced this pull request May 14, 2015
weierophinney pushed a commit to zendframework/zend-mail that referenced this pull request May 14, 2015
weierophinney pushed a commit to zendframework/zend-barcode that referenced this pull request May 14, 2015
weierophinney pushed a commit to zendframework/zend-barcode that referenced this pull request May 14, 2015
gianarb pushed a commit to zendframework/zend-modulemanager that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-modulemanager that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-test that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-test that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-serializer that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-di that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-di that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-di that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-http that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-http that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-filter that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-filter that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-ldap that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-ldap that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-dom that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-dom that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-session that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-session that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-log that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-log that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-soap that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-soap that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-mime that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-mime that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-view that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-view that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-navigation that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-navigation that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-feed that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-feed that referenced this pull request May 15, 2015
weierophinney pushed a commit to zendframework/zend-permissions-acl that referenced this pull request May 15, 2015
weierophinney pushed a commit to zendframework/zend-permissions-acl 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants