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

Request #19863 Sniff to detect php_sapi_name() instead of PHP_SAPI
Submitted: 2013-03-20 17:09 UTC
From: hashar Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version SVN)
PHP Version: Irrelevant OS: Mac
Roadmaps: (Not assigned)    
Comments Add Comment Add patch

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 46 - 13 = ?

 [2013-03-20 17:09 UTC] hashar (Antoine Musso)
Description: ------------ MediaWiki used php_sapi_name() and we switched to use the constant PHP_SAPI ( ) The constant has been made available in PHP 4.2.0, it is more concise and has less overhead than a function call. Would you mind creating a Sniff that detects php_sapi_name() usage and suggest to use PHP_SAPI constant instead? Thanks!


 [2013-03-20 17:10 UTC] hashar (Antoine Musso)
 [2013-03-26 03:42 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Feedback -Assigned To: +Assigned To: squiz
I can't do all sniff requests, but this was a fairly easy one. I've committed it here: eddf39d07cc5 And it will be in the 1.4.5 release, which should be out within a couple of weeks. Can you please check this sniff to ensure it does what you are after.
 [2013-05-08 04:13 UTC] krinkle (Timo Tijhof)
Thanks, works as expected.
 [2013-09-25 06:43 UTC] squiz (Greg Sherwood)
-Status: Feedback +Status: Closed