update DocBlock #840
continuous-integration.yml
on: push
Matrix: Validate Project / Lint PHP
Matrix: Validate Project / Linting with overtrue/phplint
Matrix: Validate Project / Validate composer
Matrix: Validate Project / Validate yaml
Matrix: Install Project / Install dependencies
Matrix: Project Analysis / Check Coding Standards with PHP-CS-Fixer
Matrix: Project Analysis / Check Coding Standards with PHPCS
Matrix: Project Analysis / Check Rules with PHPMD
Matrix: Project Analysis / Checks with Rector
Matrix: Project Analysis / Static Code Analysis with PHPStan
Matrix: Code Coverage with PHPUnit
Matrix: UnitTests with PHPUnit
Matrix: Check composer dependencies
Unit & Integration Tests Status
0s
Annotations
10 warnings
Code Coverage with PHPUnit (ubuntu-20.04, 8.1, lowest):
src/ContainerTrait.php#L82
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
*/
public function __call(string $method, array $arguments) : mixed
{
- ErrorHandler::start(E_WARNING);
+
$result = preg_match('/(?P<function>find(?:One|All)By)(?P<property>.+)/', $method, $match);
$error = ErrorHandler::stop();
if (!$result) {
|
Code Coverage with PHPUnit (ubuntu-20.04, 8.1, lowest):
src/ContainerTrait.php#L126
Escaped Mutant for Mutator "Throw_":
--- Original
+++ New
@@ @@
public final function addPage(PageInterface $page) : void
{
if ($page === $this) {
- throw new InvalidArgumentException('A page cannot have itself as a parent');
+ new InvalidArgumentException('A page cannot have itself as a parent');
}
$hash = $page->hashCode();
if (array_key_exists($hash, $this->index)) {
|
Code Coverage with PHPUnit (ubuntu-20.04, 8.1, lowest):
src/ContainerTrait.php#L200
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
*
* @throws void
*/
- public final function removePage(int|PageInterface $page, bool $recursive = false) : bool
+ public final function removePage(int|PageInterface $page, bool $recursive = true) : bool
{
if ($page instanceof PageInterface) {
$hash = $page->hashCode();
|
Code Coverage with PHPUnit (ubuntu-20.04, 8.1, lowest):
src/ContainerTrait.php#L219
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
}
if (isset($this->pages[$hash])) {
unset($this->pages[$hash], $this->index[$hash]);
- $this->dirtyIndex = true;
+ $this->dirtyIndex = false;
return true;
}
if ($recursive) {
|
Code Coverage with PHPUnit (ubuntu-20.04, 8.1, lowest):
src/ContainerTrait.php#L260
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
*
* @throws void
*/
- public final function hasPage(int|PageInterface $page, bool $recursive = false) : bool
+ public final function hasPage(int|PageInterface $page, bool $recursive = true) : bool
{
if ($page instanceof PageInterface) {
$hash = $page->hashCode();
|
Code Coverage with PHPUnit (ubuntu-20.04, 8.1, lowest):
src/ContainerTrait.php#L362
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
foreach ($iterator as $page) {
assert($page instanceof PageInterface);
if ($page->get($property) !== $value) {
- continue;
+ break;
}
$found[] = $page;
}
|
Code Coverage with PHPUnit (ubuntu-20.04, 8.1, lowest):
src/ContainerTrait.php#L413
Escaped Mutant for Mutator "LogicalOr":
--- Original
+++ New
@@ @@
}
$this->sort();
$hash = key($this->index);
- if ($hash === null || !isset($this->pages[$hash])) {
+ if ($hash === null && !isset($this->pages[$hash])) {
throw new OutOfBoundsException('Corruption detected in container; invalid key found in internal iterator');
}
return $this->pages[$hash];
|
Code Coverage with PHPUnit (ubuntu-20.04, 8.1, lowest):
src/ContainerTrait.php#L433
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
*/
public final function key() : string
{
- $this->sort();
+
return (string) key($this->index);
}
/**
|
Code Coverage with PHPUnit (ubuntu-20.04, 8.1, lowest):
src/ContainerTrait.php#L447
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
*/
public final function next() : void
{
- $this->sort();
+
next($this->index);
}
/**
|
Code Coverage with PHPUnit (ubuntu-20.04, 8.1, lowest):
src/ContainerTrait.php#L461
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
*/
public final function rewind() : void
{
- $this->sort();
+
reset($this->index);
}
/**
|