Skip to content

Apply fabbot rules #2957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function testItUsesPassedExtraOptions()
;
}

public function testItReturnsErrorWhenSendingMalformedExtraOptions(): void
public function testItReturnsErrorWhenSendingMalformedExtraOptions()
{
$extraOptionsWithoutChecksum = $this->encodeData(['foo' => 'bar']);
$extraOptionsWithInvalidChecksum = $this->encodeData(['foo' => 'bar', '@checksum' => 'invalid']);
Expand Down
12 changes: 6 additions & 6 deletions src/Autocomplete/tests/Functional/CustomAutocompleterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CustomAutocompleterTest extends KernelTestCase
use HasBrowser;
use ResetDatabase;

public function testItReturnsBasicResults(): void
public function testItReturnsBasicResults()
{
$product = ProductFactory::createOne(['name' => 'foo']);
ProductFactory::createOne(['name' => 'bar']);
Expand All @@ -43,7 +43,7 @@ public function testItReturnsBasicResults(): void
;
}

public function testItUsesTheCustomQuery(): void
public function testItUsesTheCustomQuery()
{
ProductFactory::createOne(['name' => 'foo']);
ProductFactory::new(['name' => 'foo and bar'])
Expand All @@ -59,7 +59,7 @@ public function testItUsesTheCustomQuery(): void
;
}

public function testItOnlySearchedOnSearchableFields(): void
public function testItOnlySearchedOnSearchableFields()
{
ProductFactory::createOne(['name' => 'foo', 'price' => 50]);
ProductFactory::createOne(['name' => 'bar', 'description' => 'foo 50', 'price' => 55]);
Expand All @@ -77,7 +77,7 @@ public function testItOnlySearchedOnSearchableFields(): void
;
}

public function testItEnforcesSecurity(): void
public function testItEnforcesSecurity()
{
ProductFactory::createMany(3);

Expand All @@ -97,15 +97,15 @@ public function testItEnforcesSecurity(): void
;
}

public function testItReturns404OnBadAlias(): void
public function testItReturns404OnBadAlias()
{
$this->browser()
->get('/test/autocomplete/not_real')
->assertStatus(404)
;
}

public function testItWorksWithCustomRoute(): void
public function testItWorksWithCustomRoute()
{
$product = ProductFactory::createOne(['name' => 'foo']);
ProductFactory::createOne(['name' => 'bar']);
Expand Down
16 changes: 8 additions & 8 deletions src/Autocomplete/tests/Functional/FieldAutocompleterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class FieldAutocompleterTest extends KernelTestCase
use HasBrowser;
use ResetDatabase;

public function testItReturnsBasicResults(): void
public function testItReturnsBasicResults()
{
$category = CategoryFactory::createOne(['name' => 'foo and baz']);
CategoryFactory::createOne(['name' => 'foo and bar']);
Expand All @@ -44,7 +44,7 @@ public function testItReturnsBasicResults(): void
;
}

public function testItUsesTheCustomQuery(): void
public function testItUsesTheCustomQuery()
{
CategoryFactory::createOne(['name' => 'foo and bar']);
CategoryFactory::createOne(['name' => 'baz and bar']);
Expand All @@ -59,7 +59,7 @@ public function testItUsesTheCustomQuery(): void
;
}

public function testItEnforcesSecurity(): void
public function testItEnforcesSecurity()
{
CategoryFactory::createMany(3, [
'name' => 'foo so that it matches custom query',
Expand All @@ -81,7 +81,7 @@ public function testItEnforcesSecurity(): void
;
}

public function testItCheckMaxResultsOption(): void
public function testItCheckMaxResultsOption()
{
CategoryFactory::createMany(30, ['name' => 'foo']);

Expand All @@ -93,7 +93,7 @@ public function testItCheckMaxResultsOption(): void
;
}

public function testItWorksWithoutAChoiceLabel(): void
public function testItWorksWithoutAChoiceLabel()
{
CategoryFactory::createMany(5, ['name' => 'foo']);

Expand All @@ -105,7 +105,7 @@ public function testItWorksWithoutAChoiceLabel(): void
;
}

public function testItUsesTheCustomStringValue(): void
public function testItUsesTheCustomStringValue()
{
$category = CategoryFactory::createOne(['code' => 'foo']);

Expand All @@ -118,7 +118,7 @@ public function testItUsesTheCustomStringValue(): void
;
}

public function testItUsesTheCustomCallbackValue(): void
public function testItUsesTheCustomCallbackValue()
{
$category = CategoryFactory::createOne(['code' => 'foo']);

Expand All @@ -131,7 +131,7 @@ public function testItUsesTheCustomCallbackValue(): void
;
}

public function testItSearchesByTags(): void
public function testItSearchesByTags()
{
$productTag = ProductTagFactory::createOne(['name' => 'technology']);
$categoryTag = CategoryTagFactory::createOne(['name' => 'home appliances']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AutocompleteResultsExecutorTest extends KernelTestCase
use Factories;
use ResetDatabase;

public function testItReturnsExtraAttributes(): void
public function testItReturnsExtraAttributes()
{
$kernel = new Kernel('test', true);
$kernel->disableForms();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class EntityMetadataFactoryTest extends KernelTestCase
{
public function testItSuccessfullyCreatesMetadata(): void
public function testItSuccessfullyCreatesMetadata()
{
/** @var EntityMetadataFactory $factory */
$factory = self::getContainer()->get('ux.autocomplete.entity_metadata_factory');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@ class EntityMetadataTest extends KernelTestCase
use Factories;
use ResetDatabase;

public function testGetAllPropertyNames(): void
public function testGetAllPropertyNames()
{
$this->assertSame(
['id', 'name', 'description', 'price', 'isEnabled'],
$this->getMetadata()->getAllPropertyNames()
);
}

public function testIsAssociation(): void
public function testIsAssociation()
{
$metadata = $this->getMetadata();
$this->assertFalse($metadata->isAssociation('name'));
$this->assertTrue($metadata->isAssociation('category'));
}

public function testGetIdValue(): void
public function testGetIdValue()
{
$product = ProductFactory::createOne();
$this->assertEquals($product->getId(), $this->getMetadata()->getIdValue($product));
}

public function testGetPropertyDataType(): void
public function testGetPropertyDataType()
{
$metadata = $this->getMetadata();
$this->assertSame(Types::STRING, $metadata->getPropertyDataType('name'));
Expand All @@ -55,7 +55,7 @@ public function testGetPropertyDataType(): void
$this->assertEquals(2, $metadata->getPropertyDataType('category'));
}

public function testGetFieldMetadata(): void
public function testGetFieldMetadata()
{
$metadata = $this->getMetadata();
$nameMetadata = $metadata->getFieldMetadata('name');
Expand All @@ -75,7 +75,7 @@ public function testGetFieldMetadata(): void
}
}

public function testGetAssociationMetadata(): void
public function testGetAssociationMetadata()
{
$metadata = $this->getMetadata();
$expected = [
Expand Down Expand Up @@ -132,7 +132,7 @@ public function testGetAssociationMetadata(): void
}
}

public function testIsEmbeddedClassProperty(): void
public function testIsEmbeddedClassProperty()
{
// TODO
$this->markTestIncomplete();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class EntitySearchUtilTest extends KernelTestCase
use Factories;
use ResetDatabase;

public function testItCreatesBasicStringSearchQuery(): void
public function testItCreatesBasicStringSearchQuery()
{
$prod1 = ProductFactory::createOne(['name' => 'bar prod1']);
$prod2 = ProductFactory::createOne(['name' => 'foo prod2']);
Expand All @@ -37,7 +37,7 @@ public function testItCreatesBasicStringSearchQuery(): void
$this->assertSame([$prod1, $prod2, $prod4], $results);
}

public function testItSearchesOnCorrectFields(): void
public function testItSearchesOnCorrectFields()
{
$prod1 = ProductFactory::createOne(['name' => 'bar prod1']);
ProductFactory::createOne(['description' => 'foo prod2']);
Expand All @@ -46,7 +46,7 @@ public function testItSearchesOnCorrectFields(): void
$this->assertSame([$prod1], $results);
}

public function testItCanSearchOnRelationFields(): void
public function testItCanSearchOnRelationFields()
{
$category1 = CategoryFactory::createOne(['name' => 'foods']);
$category2 = CategoryFactory::createOne(['name' => 'toys']);
Expand Down
6 changes: 3 additions & 3 deletions src/Autocomplete/tests/Integration/WiringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected static function createKernel(array $options = []): KernelInterface
return $kernel;
}

public function testWiringWithoutForm(): void
public function testWiringWithoutForm()
{
$kernel = new Kernel('test', true);
$kernel->disableForms();
Expand All @@ -51,7 +51,7 @@ public function testWiringWithoutForm(): void
$this->assertFalse($data->hasNextPage);
}

public function testWiringWithManyResults(): void
public function testWiringWithManyResults()
{
$kernel = new Kernel('test', true);
$kernel->disableForms();
Expand All @@ -76,7 +76,7 @@ public function testWiringWithManyResults(): void
$this->assertFalse($data->hasNextPage);
}

public function testWiringWithoutFormAndGroupByOption(): void
public function testWiringWithoutFormAndGroupByOption()
{
$kernel = new Kernel('test', true);
$kernel->disableForms();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

final class ChecksumCalculatorTest extends TestCase
{
public function testCalculateChecksumForArray(): void
public function testCalculateChecksumForArray()
{
$this->assertSame(
'tZ34YQKgpttqybzPws0YJCOHV1QtMjQeuyy+rszdhXU=',
$this->createTestSubject()->calculateForArray(['test' => 'test']),
);
}

public function testCalculateTheSameChecksumForTheSameArrayButInDifferentOrder(): void
public function testCalculateTheSameChecksumForTheSameArrayButInDifferentOrder()
{
$this->assertSame(
$this->createTestSubject()->calculateForArray(['test' => 'test', 'test2' => 'test2']),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AsEntityAutocompleteFieldTest extends TestCase
/**
* @dataProvider provideClassNames
*/
public function testShortName(string $shortName, string $className): void
public function testShortName(string $shortName, string $className)
{
$this->assertEquals($shortName, AsEntityAutocompleteField::shortName($className));
}
Expand Down
10 changes: 5 additions & 5 deletions src/Icons/tests/Integration/Command/ImportIconCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static function cleanup(): void
}
}

public function testCanImportIcon(): void
public function testCanImportIcon()
{
$this->assertFileDoesNotExist($expectedFile = self::ICON_DIR.'/uiw/dashboard.svg');

Expand All @@ -52,23 +52,23 @@ public function testCanImportIcon(): void
$this->assertFileExists($expectedFile);
}

public function testImportInvalidIconName(): void
public function testImportInvalidIconName()
{
$this->executeConsoleCommand('ux:icons:import something')
->assertStatusCode(1)
->assertOutputContains('[ERROR] Invalid icon name "something".')
;
}

public function testImportNonExistentIconSet(): void
public function testImportNonExistentIconSet()
{
$this->executeConsoleCommand('ux:icons:import something:invalid')
->assertStatusCode(1)
->assertOutputContains('[ERROR] Icon set "something" not found.')
;
}

public function testImportNonExistentIcon(): void
public function testImportNonExistentIcon()
{
$this->executeConsoleCommand('ux:icons:import lucide:not-existing-icon')
->assertStatusCode(1)
Expand All @@ -79,7 +79,7 @@ public function testImportNonExistentIcon(): void
$this->assertFileDoesNotExist(self::ICON_DIR.'/not-existing-icon.svg');
}

public function testImportNonExistentIconWithExistentOne(): void
public function testImportNonExistentIconWithExistentOne()
{
$this->executeConsoleCommand('ux:icons:import lucide:circle lucide:not-existing-icon')
->assertStatusCode(0)
Expand Down
4 changes: 2 additions & 2 deletions src/Icons/tests/Integration/Command/LockIconsCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static function cleanup(): void
}
}

public function testImportFoundIcons(): void
public function testImportFoundIcons()
{
foreach (self::ICONS as $icon) {
$this->assertFileDoesNotExist($icon);
Expand All @@ -69,7 +69,7 @@ public function testImportFoundIcons(): void
;
}

public function testForceImportFoundIcons(): void
public function testForceImportFoundIcons()
{
$this->executeConsoleCommand('ux:icons:lock')
->assertSuccessful()
Expand Down
6 changes: 3 additions & 3 deletions src/Icons/tests/Integration/Command/SearchIconCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class SearchIconCommandTest extends KernelTestCase
{
use InteractsWithConsole;

public function testSearchWithPrefix(): void
public function testSearchWithPrefix()
{
$this->consoleCommand('ux:icons:search iconoir')
->execute()
Expand All @@ -39,7 +39,7 @@ public function testSearchWithPrefix(): void
->assertStatusCode(0);
}

public function testSearchWithPrefixMatchingMultipleSet(): void
public function testSearchWithPrefixMatchingMultipleSet()
{
$this->consoleCommand('ux:icons:search box')
->execute()
Expand All @@ -53,7 +53,7 @@ public function testSearchWithPrefixMatchingMultipleSet(): void
->assertStatusCode(0);
}

public function testSearchWithPrefixName(): void
public function testSearchWithPrefixName()
{
$this->consoleCommand('ux:icons:search lucide arrow')
->execute()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class WarmCacheCommandTest extends KernelTestCase
{
use InteractsWithConsole;

public function testCanWarmCache(): void
public function testCanWarmCache()
{
$this->executeConsoleCommand('ux:icons:warm-cache -v')
->assertSuccessful()
Expand Down
Loading
Loading