PHPSA\Variable::incGets PHP Method

incGets() public method

Increases the read counter.
public incGets ( ) : integer
return integer
    public function incGets()
    {
        return $this->gets++;
    }

Usage Example

Example #1
0
 public function testIncGets()
 {
     $variable = new Variable('a', null, CompiledExpression::UNKNOWN);
     static::assertSame(0, $variable->getGets());
     $variable->incGets();
     static::assertSame(1, $variable->getGets());
     $variable->incGets();
     static::assertSame(2, $variable->getGets());
     $variable->incGets();
     $variable->incGets();
     static::assertSame(4, $variable->getGets());
 }
All Usage Examples Of PHPSA\Variable::incGets