-
Notifications
You must be signed in to change notification settings - Fork 77
[Bug] Trait & unused variable #244
Comments
This is caused because Trait method is merged into this Class Another moment |
Unused variable happens for me in class, variable is initialized and passed as argument to method of a class, im getting noticed that it is unused but clearly it is. Also i noticed that all warning of unused variables are when variable is passed to method as argument. |
@kilgaloon This is caused only for static method call, I am going to fix it |
Fixed in Tested on class Test
{
/**
* @return bool
*/
public function returnTrue()
{
$a = '127.0.0.1';
self::inet_pton($a);
}
/**
* @param $test
* @return int
*/
public static function inet_pton($test)
{
return inet_pton($test);
}
} Can you try latest changes from Thanks |
I can confirm that this is working now, but another problem is happening right now. It is related with unused variables, i will create new issue about this. #280 |
Warning: Unused variable $fqcnParts in method getMetadata() in ./src/Analyzer/Pass/Statement/ConstantNaming.php [unused-variable]
Warning: Unused variable $name in method getMetadata() in ./src/Analyzer/Pass/Statement/ConstantNaming.php [unused-variable]
Warning: Unused variable $description in method getMetadata() in ./src/Analyzer/Pass/Statement/ConstantNaming.php [unused-variable]
for every analyzer. But all of them are used in the trait method.
The text was updated successfully, but these errors were encountered: