Skip to content

Commit 1f90d60

Browse files
committed
minor #2957 Apply fabbot rules (nicolas-grekas)
This PR was merged into the 2.x branch. Discussion ---------- Apply fabbot rules | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Docs? | no | Issues | - | License | MIT - no-void to test cases - typos - tweaks to exception messages Commits ------- 7b135d0 Apply fabbot rules
2 parents 0b2b031 + 7b135d0 commit 1f90d60

File tree

167 files changed

+597
-594
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+597
-594
lines changed

src/Autocomplete/tests/Functional/AutocompleteFormRenderingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function testItUsesPassedExtraOptions()
157157
;
158158
}
159159

160-
public function testItReturnsErrorWhenSendingMalformedExtraOptions(): void
160+
public function testItReturnsErrorWhenSendingMalformedExtraOptions()
161161
{
162162
$extraOptionsWithoutChecksum = $this->encodeData(['foo' => 'bar']);
163163
$extraOptionsWithInvalidChecksum = $this->encodeData(['foo' => 'bar', '@checksum' => 'invalid']);

src/Autocomplete/tests/Functional/CustomAutocompleterTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class CustomAutocompleterTest extends KernelTestCase
2525
use HasBrowser;
2626
use ResetDatabase;
2727

28-
public function testItReturnsBasicResults(): void
28+
public function testItReturnsBasicResults()
2929
{
3030
$product = ProductFactory::createOne(['name' => 'foo']);
3131
ProductFactory::createOne(['name' => 'bar']);
@@ -43,7 +43,7 @@ public function testItReturnsBasicResults(): void
4343
;
4444
}
4545

46-
public function testItUsesTheCustomQuery(): void
46+
public function testItUsesTheCustomQuery()
4747
{
4848
ProductFactory::createOne(['name' => 'foo']);
4949
ProductFactory::new(['name' => 'foo and bar'])
@@ -59,7 +59,7 @@ public function testItUsesTheCustomQuery(): void
5959
;
6060
}
6161

62-
public function testItOnlySearchedOnSearchableFields(): void
62+
public function testItOnlySearchedOnSearchableFields()
6363
{
6464
ProductFactory::createOne(['name' => 'foo', 'price' => 50]);
6565
ProductFactory::createOne(['name' => 'bar', 'description' => 'foo 50', 'price' => 55]);
@@ -77,7 +77,7 @@ public function testItOnlySearchedOnSearchableFields(): void
7777
;
7878
}
7979

80-
public function testItEnforcesSecurity(): void
80+
public function testItEnforcesSecurity()
8181
{
8282
ProductFactory::createMany(3);
8383

@@ -97,15 +97,15 @@ public function testItEnforcesSecurity(): void
9797
;
9898
}
9999

100-
public function testItReturns404OnBadAlias(): void
100+
public function testItReturns404OnBadAlias()
101101
{
102102
$this->browser()
103103
->get('/test/autocomplete/not_real')
104104
->assertStatus(404)
105105
;
106106
}
107107

108-
public function testItWorksWithCustomRoute(): void
108+
public function testItWorksWithCustomRoute()
109109
{
110110
$product = ProductFactory::createOne(['name' => 'foo']);
111111
ProductFactory::createOne(['name' => 'bar']);

src/Autocomplete/tests/Functional/FieldAutocompleterTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class FieldAutocompleterTest extends KernelTestCase
2727
use HasBrowser;
2828
use ResetDatabase;
2929

30-
public function testItReturnsBasicResults(): void
30+
public function testItReturnsBasicResults()
3131
{
3232
$category = CategoryFactory::createOne(['name' => 'foo and baz']);
3333
CategoryFactory::createOne(['name' => 'foo and bar']);
@@ -44,7 +44,7 @@ public function testItReturnsBasicResults(): void
4444
;
4545
}
4646

47-
public function testItUsesTheCustomQuery(): void
47+
public function testItUsesTheCustomQuery()
4848
{
4949
CategoryFactory::createOne(['name' => 'foo and bar']);
5050
CategoryFactory::createOne(['name' => 'baz and bar']);
@@ -59,7 +59,7 @@ public function testItUsesTheCustomQuery(): void
5959
;
6060
}
6161

62-
public function testItEnforcesSecurity(): void
62+
public function testItEnforcesSecurity()
6363
{
6464
CategoryFactory::createMany(3, [
6565
'name' => 'foo so that it matches custom query',
@@ -81,7 +81,7 @@ public function testItEnforcesSecurity(): void
8181
;
8282
}
8383

84-
public function testItCheckMaxResultsOption(): void
84+
public function testItCheckMaxResultsOption()
8585
{
8686
CategoryFactory::createMany(30, ['name' => 'foo']);
8787

@@ -93,7 +93,7 @@ public function testItCheckMaxResultsOption(): void
9393
;
9494
}
9595

96-
public function testItWorksWithoutAChoiceLabel(): void
96+
public function testItWorksWithoutAChoiceLabel()
9797
{
9898
CategoryFactory::createMany(5, ['name' => 'foo']);
9999

@@ -105,7 +105,7 @@ public function testItWorksWithoutAChoiceLabel(): void
105105
;
106106
}
107107

108-
public function testItUsesTheCustomStringValue(): void
108+
public function testItUsesTheCustomStringValue()
109109
{
110110
$category = CategoryFactory::createOne(['code' => 'foo']);
111111

@@ -118,7 +118,7 @@ public function testItUsesTheCustomStringValue(): void
118118
;
119119
}
120120

121-
public function testItUsesTheCustomCallbackValue(): void
121+
public function testItUsesTheCustomCallbackValue()
122122
{
123123
$category = CategoryFactory::createOne(['code' => 'foo']);
124124

@@ -131,7 +131,7 @@ public function testItUsesTheCustomCallbackValue(): void
131131
;
132132
}
133133

134-
public function testItSearchesByTags(): void
134+
public function testItSearchesByTags()
135135
{
136136
$productTag = ProductTagFactory::createOne(['name' => 'technology']);
137137
$categoryTag = CategoryTagFactory::createOne(['name' => 'home appliances']);

src/Autocomplete/tests/Integration/AutocompleteResultsExecutorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AutocompleteResultsExecutorTest extends KernelTestCase
2626
use Factories;
2727
use ResetDatabase;
2828

29-
public function testItReturnsExtraAttributes(): void
29+
public function testItReturnsExtraAttributes()
3030
{
3131
$kernel = new Kernel('test', true);
3232
$kernel->disableForms();

src/Autocomplete/tests/Integration/Doctrine/EntityMetadataFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
class EntityMetadataFactoryTest extends KernelTestCase
2020
{
21-
public function testItSuccessfullyCreatesMetadata(): void
21+
public function testItSuccessfullyCreatesMetadata()
2222
{
2323
/** @var EntityMetadataFactory $factory */
2424
$factory = self::getContainer()->get('ux.autocomplete.entity_metadata_factory');

src/Autocomplete/tests/Integration/Doctrine/EntityMetadataTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,28 @@ class EntityMetadataTest extends KernelTestCase
2525
use Factories;
2626
use ResetDatabase;
2727

28-
public function testGetAllPropertyNames(): void
28+
public function testGetAllPropertyNames()
2929
{
3030
$this->assertSame(
3131
['id', 'name', 'description', 'price', 'isEnabled'],
3232
$this->getMetadata()->getAllPropertyNames()
3333
);
3434
}
3535

36-
public function testIsAssociation(): void
36+
public function testIsAssociation()
3737
{
3838
$metadata = $this->getMetadata();
3939
$this->assertFalse($metadata->isAssociation('name'));
4040
$this->assertTrue($metadata->isAssociation('category'));
4141
}
4242

43-
public function testGetIdValue(): void
43+
public function testGetIdValue()
4444
{
4545
$product = ProductFactory::createOne();
4646
$this->assertEquals($product->getId(), $this->getMetadata()->getIdValue($product));
4747
}
4848

49-
public function testGetPropertyDataType(): void
49+
public function testGetPropertyDataType()
5050
{
5151
$metadata = $this->getMetadata();
5252
$this->assertSame(Types::STRING, $metadata->getPropertyDataType('name'));
@@ -55,7 +55,7 @@ public function testGetPropertyDataType(): void
5555
$this->assertEquals(2, $metadata->getPropertyDataType('category'));
5656
}
5757

58-
public function testGetFieldMetadata(): void
58+
public function testGetFieldMetadata()
5959
{
6060
$metadata = $this->getMetadata();
6161
$nameMetadata = $metadata->getFieldMetadata('name');
@@ -75,7 +75,7 @@ public function testGetFieldMetadata(): void
7575
}
7676
}
7777

78-
public function testGetAssociationMetadata(): void
78+
public function testGetAssociationMetadata()
7979
{
8080
$metadata = $this->getMetadata();
8181
$expected = [
@@ -132,7 +132,7 @@ public function testGetAssociationMetadata(): void
132132
}
133133
}
134134

135-
public function testIsEmbeddedClassProperty(): void
135+
public function testIsEmbeddedClassProperty()
136136
{
137137
// TODO
138138
$this->markTestIncomplete();

src/Autocomplete/tests/Integration/Doctrine/EntitySearchUtilTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class EntitySearchUtilTest extends KernelTestCase
2626
use Factories;
2727
use ResetDatabase;
2828

29-
public function testItCreatesBasicStringSearchQuery(): void
29+
public function testItCreatesBasicStringSearchQuery()
3030
{
3131
$prod1 = ProductFactory::createOne(['name' => 'bar prod1']);
3232
$prod2 = ProductFactory::createOne(['name' => 'foo prod2']);
@@ -37,7 +37,7 @@ public function testItCreatesBasicStringSearchQuery(): void
3737
$this->assertSame([$prod1, $prod2, $prod4], $results);
3838
}
3939

40-
public function testItSearchesOnCorrectFields(): void
40+
public function testItSearchesOnCorrectFields()
4141
{
4242
$prod1 = ProductFactory::createOne(['name' => 'bar prod1']);
4343
ProductFactory::createOne(['description' => 'foo prod2']);
@@ -46,7 +46,7 @@ public function testItSearchesOnCorrectFields(): void
4646
$this->assertSame([$prod1], $results);
4747
}
4848

49-
public function testItCanSearchOnRelationFields(): void
49+
public function testItCanSearchOnRelationFields()
5050
{
5151
$category1 = CategoryFactory::createOne(['name' => 'foods']);
5252
$category2 = CategoryFactory::createOne(['name' => 'toys']);

src/Autocomplete/tests/Integration/WiringTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected static function createKernel(array $options = []): KernelInterface
3535
return $kernel;
3636
}
3737

38-
public function testWiringWithoutForm(): void
38+
public function testWiringWithoutForm()
3939
{
4040
$kernel = new Kernel('test', true);
4141
$kernel->disableForms();
@@ -51,7 +51,7 @@ public function testWiringWithoutForm(): void
5151
$this->assertFalse($data->hasNextPage);
5252
}
5353

54-
public function testWiringWithManyResults(): void
54+
public function testWiringWithManyResults()
5555
{
5656
$kernel = new Kernel('test', true);
5757
$kernel->disableForms();
@@ -76,7 +76,7 @@ public function testWiringWithManyResults(): void
7676
$this->assertFalse($data->hasNextPage);
7777
}
7878

79-
public function testWiringWithoutFormAndGroupByOption(): void
79+
public function testWiringWithoutFormAndGroupByOption()
8080
{
8181
$kernel = new Kernel('test', true);
8282
$kernel->disableForms();

src/Autocomplete/tests/Unit/Calculator/ChecksumCalculatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616

1717
final class ChecksumCalculatorTest extends TestCase
1818
{
19-
public function testCalculateChecksumForArray(): void
19+
public function testCalculateChecksumForArray()
2020
{
2121
$this->assertSame(
2222
'tZ34YQKgpttqybzPws0YJCOHV1QtMjQeuyy+rszdhXU=',
2323
$this->createTestSubject()->calculateForArray(['test' => 'test']),
2424
);
2525
}
2626

27-
public function testCalculateTheSameChecksumForTheSameArrayButInDifferentOrder(): void
27+
public function testCalculateTheSameChecksumForTheSameArrayButInDifferentOrder()
2828
{
2929
$this->assertSame(
3030
$this->createTestSubject()->calculateForArray(['test' => 'test', 'test2' => 'test2']),

src/Autocomplete/tests/Unit/Form/AsEntityAutocompleteFieldTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class AsEntityAutocompleteFieldTest extends TestCase
2020
/**
2121
* @dataProvider provideClassNames
2222
*/
23-
public function testShortName(string $shortName, string $className): void
23+
public function testShortName(string $shortName, string $className)
2424
{
2525
$this->assertEquals($shortName, AsEntityAutocompleteField::shortName($className));
2626
}

0 commit comments

Comments
 (0)