for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Static Analysis Results Baseliner (sarb).
*
* (c) Dave Liddament
* For the full copyright and licence information please view the LICENSE file distributed with this source code.
*/
declare(strict_types=1);
namespace DaveLiddament\StaticAnalysisResultsBaseliner\Plugins\GitDiffHistoryAnalyser\internal;
* Holds current Original and New Line numbers.
final class LineNumberMapper
{
* @var int
private $originalLineNumber;
private $newLineNumber;
public function __construct()
$this->originalLineNumber = 0;
$this->newLineNumber = 0;
}
public function incrementBoth(): void
++$this->originalLineNumber;
++$this->newLineNumber;
public function incrementOriginal(): void
public function incrementNew(): void
public function getOriginalLineNumber(): int
return $this->originalLineNumber;
public function getNewLineNumber(): int
return $this->newLineNumber;