for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Phoole (PHP7.2+)
*
* @category Library
* @package Phoole\Config
* @copyright Copyright (c) 2019 Hong Zhang
*/
declare(strict_types=1);
namespace Phoole\Config\Util;
* Implementation of \ArrayAccess
* @see \ArrayAccess
trait ArrayAccessTrait
{
public function offsetExists($offset): bool
return $this->has($offset);
has()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
return $this->/** @scrutinizer ignore-call */ has($offset);
}
public function offsetGet($offset)
return $this->get($offset);
get()
return $this->/** @scrutinizer ignore-call */ get($offset);
public function offsetSet($offset, $value): void
$value
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function offsetSet($offset, /** @scrutinizer ignore-unused */ $value): void
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$offset
public function offsetSet(/** @scrutinizer ignore-unused */ $offset, $value): void
throw new \RuntimeException("config is immutable");
public function offsetUnset($offset): void
public function offsetUnset(/** @scrutinizer ignore-unused */ $offset): void