Bug #19354 [Opn->Csd]: Not recognizing references passed to method

From: Date: Thu, 29 Mar 2012 00:32:01 +0000
Subject: Bug #19354 [Opn->Csd]: Not recognizing references passed to method
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-8459@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=19354&edit=1 ID: 19354 Updated by: gsherwood@squiz.net Reported By: cdburgess at gmail dot com Summary: Not recognizing references passed to method -Status: Open +Status: Closed Type: Bug Package: PHP_CodeSniffer Operating System: Mac OSX Package Version: 1.3.3 PHP Version: 5.3.6 -Assigned To: +Assigned To: squiz Roadmap Versions: New Comment: -Status: Open +Status: Closed -Assigned To: +Assigned To: squiz Fixed in git repo: https://github.com/squizlabs/PHP_CodeSniffer/commit/9b44f6d0411de4c7d53328f83f 6eda11020dd439 Previous Comments: ------------------------------------------------------------------------ [2012-03-27 23:41:38] cdburgess 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 ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=19354&edit=1

« previous php.pear.bugs (#8459) next »