for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PHPSemVerChecker\Operation;
use PhpParser\Node\Stmt\Function_;
use PHPSemVerChecker\Node\Statement\Function_ as PFunction;
class FunctionAdded extends Operation {
/**
* @var string
*/
protected $code = 'V003';
protected $reason = 'Function has been added.';
protected $fileAfter;
* @var \PhpParser\Node\Stmt\Function_
protected $functionAfter;
* @param string $fileAfter
* @param \PhpParser\Node\Stmt\Function_ $functionAfter
public function __construct($fileAfter, Function_ $functionAfter)
{
$this->fileAfter = $fileAfter;
$this->functionAfter = $functionAfter;
}
* @return string
public function getLocation()
return $this->fileAfter;
* @return int
public function getLine()
return $this->functionAfter->getLine();
public function getTarget()
return PFunction::getFullyQualifiedName($this->functionAfter);