for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Jabe\Engine\Impl\Batch;
class DeploymentMappings extends \ArrayObject
{
protected $overallIdCount;
public static function of(DeploymentMapping $mapping): DeploymentMappings
$mappings = new DeploymentMappings();
$mappings->add($mapping);
return $mappings;
}
public function add(DeploymentMapping $mapping): bool
$this->overallIdCount += $mapping->getCount();
$this[] = $mapping;
return true;
public function get(int $mappingIndex)
$mappingIndex
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function get(/** @scrutinizer ignore-unused */ int $mappingIndex)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
if (isset($this[$index])) {
$index
return $this[$index];
} else {
throw new \Exception(sprintf("Undefined array key %d", $index));
public function remove(int $mappingIndex): bool
if (isset($this[$mappingIndex])) {
$this->overallIdCount -= $this[$mappingIndex]->getCount();
unset($this[$mappingIndex]);
return false;
public function getOverallIdCount(): int
return $this->overallIdCount;
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.