zendframework / zend-coding-standard

Zend Framework Coding Standard
BSD 3-Clause "New" or "Revised" License
35 stars 8 forks source link

[v2] Rule: UnusedPrivateElements #11

Closed michalbundyra closed 5 years ago

michalbundyra commented 5 years ago

Not sure if we should include this rule. Please see the following error in zend-diactoros:

FILE: zend-diactoros/src/Uri.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------
 649 | ERROR | Class Uri contains unused private method urlEncodeChar().
     |       | (SlevomatCodingStandard.Classes.UnusedPrivateElements.UnusedMethod)
---------------------------------------------------------------------------------------------------------------------------------------------
Ocramius commented 5 years ago

It should most likely be included: if a private member is used dynamically, that is a rare case, and it should lead to a manual exclusion.

michalbundyra commented 5 years ago

@Ocramius Ok, fine for me. Closing. Thanks!