Skip to content

Update rector/rector requirement from ^0.19.0 to ^1.0.0 #367

Update rector/rector requirement from ^0.19.0 to ^1.0.0

Update rector/rector requirement from ^0.19.0 to ^1.0.0 #367

Triggered via pull request February 8, 2024 06:57
Status Success
Total duration 30s
Artifacts

mutation.yml

on: pull_request
Matrix: mutation / roave-infection
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
mutation / PHP 8.1-ubuntu-latest: src/Profiler.php#L62
Escaped Mutant for Mutator "FunctionCallRemoval": --- Original +++ New @@ @@ public function __construct(private LoggerInterface $logger, array $targets = []) { $this->setTargets($targets); - register_shutdown_function([$this, 'flush']); + } /** * Enable or disable profiler.
mutation / PHP 8.1-ubuntu-latest: src/Profiler.php#L72
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function enable(bool $value = true) : self { - $new = clone $this; + $new = $this; $new->enabled = $value; return $new; }
mutation / PHP 8.1-ubuntu-latest: src/Profiler.php#L137
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ return; } $category = $this->getCategoryFromContext($context); - $context = array_merge($context, ['token' => $token, 'category' => $category, 'nestedLevel' => $this->nestedLevel, 'time' => microtime(true), 'beginTime' => microtime(true), 'beginMemory' => memory_get_usage()]); + $context = ['token' => $token, 'category' => $category, 'nestedLevel' => $this->nestedLevel, 'time' => microtime(true), 'beginTime' => microtime(true), 'beginMemory' => memory_get_usage()]; $message = new Message($category, $token, $context); $this->pendingMessages[$category][$token][] = $message; $this->nestedLevel++;
mutation / PHP 8.1-ubuntu-latest: src/Profiler.php#L139
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ return; } $category = $this->getCategoryFromContext($context); - $context = array_merge($context, ['token' => $token, 'category' => $category, 'nestedLevel' => $this->nestedLevel, 'time' => microtime(true), 'beginTime' => microtime(true), 'beginMemory' => memory_get_usage()]); + $context = array_merge($context, ['category' => $category, 'nestedLevel' => $this->nestedLevel, 'time' => microtime(true), 'beginTime' => microtime(true), 'beginMemory' => memory_get_usage()]); $message = new Message($category, $token, $context); $this->pendingMessages[$category][$token][] = $message; $this->nestedLevel++;
mutation / PHP 8.1-ubuntu-latest: src/Profiler.php#L143
Escaped Mutant for Mutator "ArrayItem": --- Original +++ New @@ @@ return; } $category = $this->getCategoryFromContext($context); - $context = array_merge($context, ['token' => $token, 'category' => $category, 'nestedLevel' => $this->nestedLevel, 'time' => microtime(true), 'beginTime' => microtime(true), 'beginMemory' => memory_get_usage()]); + $context = array_merge($context, ['token' => $token, 'category' => $category, 'nestedLevel' => $this->nestedLevel, 'time' > microtime(true), 'beginTime' => microtime(true), 'beginMemory' => memory_get_usage()]); $message = new Message($category, $token, $context); $this->pendingMessages[$category][$token][] = $message; $this->nestedLevel++;
mutation / PHP 8.1-ubuntu-latest: src/Profiler.php#L213
Escaped Mutant for Mutator "Minus": --- Original +++ New @@ @@ * endMemory: int, * } $context */ - $context['duration'] = $context['endTime'] - $context['beginTime']; + $context['duration'] = $context['endTime'] + $context['beginTime']; $context['memoryDiff'] = $context['endMemory'] - $context['beginMemory']; $this->messages[] = new Message($category, $message->token(), $context); $this->nestedLevel--;
mutation / PHP 8.1-ubuntu-latest: src/Profiler.php#L214
Escaped Mutant for Mutator "Minus": --- Original +++ New @@ @@ * } $context */ $context['duration'] = $context['endTime'] - $context['beginTime']; - $context['memoryDiff'] = $context['endMemory'] - $context['beginMemory']; + $context['memoryDiff'] = $context['endMemory'] + $context['beginMemory']; $this->messages[] = new Message($category, $message->token(), $context); $this->nestedLevel--; }
mutation / PHP 8.1-ubuntu-latest: src/Profiler.php#L229
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public function flush() : void { foreach ($this->pendingMessages as $category => $categoryMessages) { - $this->logCategoryMessages($category, $categoryMessages); + } $this->pendingMessages = []; $this->nestedLevel = 0;
mutation / PHP 8.1-ubuntu-latest: src/Profiler.php#L233
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ $this->logCategoryMessages($category, $categoryMessages); } $this->pendingMessages = []; - $this->nestedLevel = 0; + $this->nestedLevel = -1; if (empty($this->messages)) { return; }
mutation / PHP 8.1-ubuntu-latest: src/Profiler.php#L265
Escaped Mutant for Mutator "LogicalNot": --- Original +++ New @@ @@ private function logCategoryMessages(string $category, array $categoryMessages) : void { foreach ($categoryMessages as $token => $messages) { - if (!empty($messages)) { + if (empty($messages)) { $this->logger->log(LogLevel::WARNING, sprintf('Unclosed profiling entry detected: category "%s" token "%s" %s', $category, $token, __METHOD__)); } }