PHPSA\Variable::getSets PHP Method

getSets() public method

Gets the write counter.
public getSets ( ) : integer
return integer
    public function getSets()
    {
        return $this->sets;
    }

Usage Example

Example #1
0
 public function testIncSets()
 {
     $variable = new Variable('a', null, CompiledExpression::UNKNOWN);
     static::assertSame(0, $variable->getSets());
     $variable->incSets();
     static::assertSame(1, $variable->getSets());
     $variable->incSets();
     static::assertSame(2, $variable->getSets());
     $variable->incSets();
     $variable->incSets();
     static::assertSame(4, $variable->getSets());
 }