PHPSA\Variable::getGets PHP Method

getGets() public method

Gets the read counter.
public getGets ( ) : integer
return integer
    public function getGets()
    {
        return $this->gets;
    }

Usage Example

コード例 #1
0
ファイル: VariableTest.php プロジェクト: sekjun9878/phpsa
 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());
 }