Setting a value inside a null coalescing operation doesn't trigger a violation of the rule 0012.
To Reproduce
Steps to reproduce the behavior:
Create a simple service class, like this:
<?php
namespace App\Service;
class CacheService
{
private int $value;
public function __construct()
{
}
public function singleTernary(int $value): int{
return $this->value ?? $this->value = $value * 2 + 1;
}
}
- Launch phanalist on it
- No violation
**Expected behavior**
Setting a value inside a null coalescing operation should trigger a violation of the rule 0012
Describe the bug
Setting a value inside a null coalescing operation doesn't trigger a violation of the rule 0012.
To Reproduce Steps to reproduce the behavior:
Create a simple service class, like this: