Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.7.2

Request #20306 Squiz.FunctionComment and array/callable
Submitted: 2014-06-22 15:00 UTC
From: aik099 Assigned:
Status: Open Package: PHP_CodeSniffer (version 1.5.3)
PHP Version: 5.4.20 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2014-06-22 15:00 UTC] aik099 (Alexander Obuhovich)
Description: ------------ The Squiz.FunctionComment sniff has hardcoded checks for array/callable types, however it also checks in PHP_CodeSniffer::$allowedTypes array where both of them are listed: http://screencast.com/t/szbpYSsa I suggest that you remove hardcoded checks. Also the "typehint" callable would give Fatal Error in PHP < 5.4, but it's a valid in PHPDoc. Sniff still requires "callable" to be used which is not good.

Comments

 [2014-07-02 12:00 UTC] squiz (Greg Sherwood)
-Type: Bug +Type: Feature/Change Request