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

Bug #19354 Not recognizing references passed to method
Submitted: 2012-03-28 03:41 UTC
From: cdburgess Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.3.3)
PHP Version: 5.3.6 OS: Mac OSX
Roadmaps: (Not assigned)    

 [2012-03-28 03:41 UTC] cdburgess (Chuck Burgess)
Description: ------------ When I use a reference to a variable while calling another function, Code sniffer thinks the & in &$model is an operator and throws an error indicating it expects a space before and after the &. Test script: --------------- Run the code sniffer on this: $model->data[$model->alias][$field] = $this->saveFile(&$model, $field, $model->data[$model->alias][$field]); Expected result: ---------------- &$model should be considered valid. Actual result: -------------- Squiz.WhiteSpace.OperatorSpacing.NoSpaceBeforeAmp Expected 1 space before "&" operator; 0 found


 [2012-03-29 05:32 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
Fixed in git repo: 6eda11020dd439
 [2012-03-29 06:36 UTC] cdburgess (Chuck Burgess)
Confirmed! Fix worked. Thanks!