Add tuples() to convert stream to [key, value] tuples #363
main.yml
on: pull_request
Static Analysis and Validation
1m 4s
Matrix: tests
Annotations
2 errors and 13 warnings
Test with PHP 8.0
Process completed with exit code 1.
|
Test with PHP 7.4
Process completed with exit code 1.
|
Test with PHP 8.0
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Test with PHP 7.4
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Test with PHP 8.1
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Test with PHP 8.3
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Test with PHP 8.2
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Static Analysis and Validation
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Static Analysis and Validation:
src/Helper/RunningVariance.php#L74
Escaped Mutant for Mutator "LessThan":
--- Original
+++ New
@@ @@
$this->min = $value;
$this->max = $value;
} else {
- if ($value < $this->min) {
+ if ($value <= $this->min) {
$this->min = $value;
}
if ($value > $this->max) {
|
Static Analysis and Validation:
src/Helper/RunningVariance.php#L78
Escaped Mutant for Mutator "GreaterThan":
--- Original
+++ New
@@ @@
if ($value < $this->min) {
$this->min = $value;
}
- if ($value > $this->max) {
+ if ($value >= $this->max) {
$this->max = $value;
}
}
|
Static Analysis and Validation:
src/Helper/RunningVariance.php#L176
Escaped Mutant for Mutator "LessThan":
--- Original
+++ New
@@ @@
$this->mean = $this->count * $this->mean / $count + $other->count * $other->mean / $count;
$this->m2 = $this->m2 + $other->m2 + $delta ** 2 * $this->count * $other->count / $count;
$this->count = $count;
- if ($other->min < $this->min) {
+ if ($other->min <= $this->min) {
$this->min = $other->min;
}
if ($other->max > $this->max) {
|
Static Analysis and Validation:
src/Helper/RunningVariance.php#L180
Escaped Mutant for Mutator "GreaterThan":
--- Original
+++ New
@@ @@
if ($other->min < $this->min) {
$this->min = $other->min;
}
- if ($other->max > $this->max) {
+ if ($other->max >= $this->max) {
$this->max = $other->max;
}
}
}
|
Static Analysis and Validation:
src/Standard.php#L1064
Escaped Mutant for Mutator "This":
--- Original
+++ New
@@ @@
public function tuples()
{
if ($this->empty()) {
- // No-op: null.
- return $this;
+ return null;
}
if (is_array($this->pipeline)) {
$this->pipeline = array_map(fn($key, $value) => [$key, $value], array_keys($this->pipeline), $this->pipeline);
|
Static Analysis and Validation:
src/Standard.php#L1074
Escaped Mutant for Mutator "This":
--- Original
+++ New
@@ @@
}
if (is_array($this->pipeline)) {
$this->pipeline = array_map(fn($key, $value) => [$key, $value], array_keys($this->pipeline), $this->pipeline);
- return $this;
+ return null;
}
$this->pipeline = self::toTuples($this->pipeline);
return $this;
|
Static Analysis and Validation:
src/Standard.php#L1080
Escaped Mutant for Mutator "This":
--- Original
+++ New
@@ @@
return $this;
}
$this->pipeline = self::toTuples($this->pipeline);
- return $this;
+ return null;
}
private static function toTuples(iterable $previous) : iterable
{
|