Applied rector suggestions

This commit is contained in:
Jan Böhmer 2024-06-22 00:31:43 +02:00
parent 4106bcef5f
commit 20f32c7f12
170 changed files with 808 additions and 761 deletions

View file

@ -84,7 +84,7 @@ class BOMImporterTest extends WebTestCase
$this->assertCount(4, $bom);
$this->assertSame('R19,R17', $bom[0]->getMountnames());
$this->assertSame(2.0, $bom[0]->getQuantity());
$this->assertEqualsWithDelta(2.0, $bom[0]->getQuantity(), PHP_FLOAT_EPSILON);
$this->assertSame('4.7k (R_0805_2012Metric_Pad1.20x1.40mm_HandSolder)', $bom[0]->getName());
$this->assertSame('Test', $bom[0]->getComment());
@ -103,7 +103,7 @@ class BOMImporterTest extends WebTestCase
$this->assertCount(4, $bom);
$this->assertSame('R19,R17', $bom[0]->getMountnames());
$this->assertSame(2.0, $bom[0]->getQuantity());
$this->assertEqualsWithDelta(2.0, $bom[0]->getQuantity(), PHP_FLOAT_EPSILON);
$this->assertSame('4.7k (R_0805_2012Metric_Pad1.20x1.40mm_HandSolder)', $bom[0]->getName());
$this->assertSame('Test', $bom[0]->getComment());
}

View file

@ -172,16 +172,14 @@ EOT;
$this->assertSame($longName, $errors[0]['entity']->getName());
}
public function formatDataProvider(): array
public function formatDataProvider(): \Iterator
{
return [
['csv', 'csv'],
['csv', 'CSV'],
['xml', 'Xml'],
['json', 'json'],
['yaml', 'yml'],
['yaml', 'YAML'],
];
yield ['csv', 'csv'];
yield ['csv', 'CSV'];
yield ['xml', 'Xml'];
yield ['json', 'json'];
yield ['yaml', 'yml'];
yield ['yaml', 'YAML'];
}
/**