wip #16
Annotations
7 warnings
Infection PHP:
src/Auditor/AutoIncrementNearLimitMysqlAuditor.php#L49
Escaped Mutant for Mutator "PublicVisibility":
@@ @@
* AUTO_INCREMENT: int,
* }>
*/
- public function getRecords(): array
+ protected function getRecords(): array
{
$threshold = $this->dbal->escapeInt($this->percentileThreshold);
return $this->dbal->query(
|
Infection PHP:
src/Auditor/InvalidDateMysqlAuditor.php#L22
Escaped Mutant for Mutator "Foreach_":
@@ @@
$this->cleanup();
}
$violations = [];
- foreach ($records as $record) {
+ foreach ([] as $record) {
$source = new ColumnViolationSource($record['TABLE_SCHEMA'], null, $record['TABLE_NAME'], $record['COLUMN_NAME']);
$violations[] = new Violation(self::getKey(), 'Column ' . $source->toString() . ' contains invalid dates.', $source);
}
|
Infection PHP:
src/Auditor/InvalidDateMysqlAuditor.php#L39
Escaped Mutant for Mutator "ArrayOneItem":
@@ @@
$source = new ColumnViolationSource($record['TABLE_SCHEMA'], null, $record['TABLE_NAME'], $record['COLUMN_NAME']);
$violations[] = new Violation(self::getKey(), 'Column ' . $source->toString() . ' contains invalid dates.', $source);
}
- return $violations;
+ return count($violations) > 1 ? array_slice($violations, 0, 1, true) : $violations;
}
private function createProcedure(): void
{
|
|
Infection PHP:
src/Dbal/DibiAdapter.php#L21
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
public function query(string $sql): array
{
$result = $this->connection->nativeQuery($sql);
- $result->setRowClass(null);
+
return $result->fetchAll();
}
public function exec(string $sql): int
|
Infection PHP:
src/Dbal/NextrasAdapter.php#L65
Escaped Mutant for Mutator "GreaterThanOrEqualTo":
@@ @@
}
public function escapeBool(bool $value): string
{
- if ($this->version >= 5) {
+ if ($this->version > 5) {
return $this->connection->getPlatform()->formatBool($value);
}
if ($this->version >= 2) {
|
Infection PHP:
src/Dbal/NextrasAdapter.php#L78
Escaped Mutant for Mutator "GreaterThanOrEqualTo":
@@ @@
}
public function escapeDateTime(DateTimeInterface $value): string
{
- if ($this->version >= 5) {
+ if ($this->version > 5) {
return $this->connection->getPlatform()->formatDateTime($value);
}
if ($this->version >= 2) {
|
Loading