Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
sstok committed Mar 19, 2020
1 parent 336018b commit 99957ee
Show file tree
Hide file tree
Showing 44 changed files with 20 additions and 178 deletions.
1 change: 1 addition & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ return PhpCsFixer\Config::create()
'phpdoc_var_without_name' => false,
'semicolon_after_instruction' => true,
'single_import_per_statement' => false,
'single_line_throw' => false,
'strict_comparison' => false, # Breaks lib/Core/Extension/Core/ValueComparator/BirthdayValueComparator.php
'strict_param' => true,
'yoda_style' => false # to broad
Expand Down
1 change: 0 additions & 1 deletion lib/ApiPlatform/Doctrine/Orm/CollectionDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ final class CollectionDataProvider implements CollectionDataProviderInterface
private $collectionExtensions;

/**
* @param ManagerRegistry $managerRegistry
* @param QueryCollectionExtensionInterface[] $collectionExtensions
*/
public function __construct(ManagerRegistry $managerRegistry, iterable $collectionExtensions = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ public function __construct(SerializerInterface $serializer, array $errorFormats

/**
* Returns a list of errors normalized in the Hydra format.
*
* @param GetResponseForExceptionEvent $event
*/
public function onKernelException(GetResponseForExceptionEvent $event)
{
Expand Down
2 changes: 0 additions & 2 deletions lib/ApiPlatform/EventListener/SearchConditionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ public function __construct(SearchFactory $searchFactory, InputProcessorLoader $
*
* This listener is expected to be run after the Api EntryPoint but before ReadListener
* on the kernel.request event.
*
* @param GetResponseEvent $event
*/
public function onKernelRequest(GetResponseEvent $event): void
{
Expand Down
2 changes: 0 additions & 2 deletions lib/Core/ConditionExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ interface ConditionExporter
* to 're-import' the exported search condition with a compatible
* input processor.
*
* @param SearchCondition $condition
*
* @return mixed
*/
public function exportCondition(SearchCondition $condition);
Expand Down
3 changes: 1 addition & 2 deletions lib/Core/Extension/Core/ChoiceList/ArrayChoiceList.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@ private function flatten(array $choices, callable $value, &$choicesByValues, &$k
* Checks whether the given choices can be cast to strings without
* generating duplicates.
*
* @param array $choices
* @param array $cache The cache for previously checked entries. Internal
* @param array $cache The cache for previously checked entries. Internal
*/
private function castableToString(array $choices, array &$cache = []): bool
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,6 @@ public function reverseTransform($value)

/**
* Returns a preconfigured \NumberFormatter instance.
*
* @return \NumberFormatter
*/
protected function getNumberFormatter(): \NumberFormatter
{
Expand Down
5 changes: 2 additions & 3 deletions lib/Core/Extension/Core/Model/MoneyValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ class MoneyValue
public $withCurrency;

/**
* @param Money $value
* @param bool $withCurrency indicate the input was provided with a currency.
* This is only used for exporting
* @param bool $withCurrency indicate the input was provided with a currency.
* This is only used for exporting
*/
public function __construct(Money $value, bool $withCurrency = true)
{
Expand Down
3 changes: 1 addition & 2 deletions lib/Core/Extension/LazyExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ final class LazyExtension implements SearchExtension
private $typeExtensionServices = [];

/**
* @param ContainerInterface $typeContainer
* @param array[] $typeExtensions
* @param array[] $typeExtensions
*/
public function __construct(ContainerInterface $typeContainer, array $typeExtensions)
{
Expand Down
2 changes: 0 additions & 2 deletions lib/Core/Field/FieldConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ public function setAttribute(string $name, $value);

/**
* Sets the attributes.
*
* @param array $attributes
*/
public function setAttributes(array $attributes);

Expand Down
3 changes: 1 addition & 2 deletions lib/Core/Field/GenericTypeRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ final class GenericTypeRegistry implements TypeRegistry
private $resolvedTypeFactory;

/**
* @param SearchExtension[] $extensions
* @param ResolvedFieldTypeFactory $resolvedTypeFactory
* @param SearchExtension[] $extensions
*
* @throws UnexpectedTypeException if an extension does not implement SearchExtension
*/
Expand Down
2 changes: 0 additions & 2 deletions lib/Core/Field/ResolvedFieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public function getParent(): ?self;

/**
* Returns the wrapped field type.
*
* @return FieldType
*/
public function getInnerType(): FieldType;

Expand Down
1 change: 0 additions & 1 deletion lib/Core/Field/ResolvedFieldTypeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ interface ResolvedFieldTypeFactory
/**
* Resolves a field type.
*
* @param FieldType $type
* @param FieldTypeExtension[] $typeExtensions
* @param ResolvedFieldType $parent
*
Expand Down
8 changes: 0 additions & 8 deletions lib/Core/FieldSetRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,12 @@ interface FieldSetRegistry
/**
* Returns a FieldSetConfiguratorInterface by name.
*
* @param string $name
*
* @throws InvalidArgumentException if the configurator can not be retrieved
*
* @return FieldSetConfigurator
*/
public function getConfigurator(string $name): FieldSetConfigurator;

/**
* Returns whether the given FieldSetConfigurator is supported.
*
* @param string $name
*
* @return bool
*/
public function hasConfigurator(string $name): bool;
}
2 changes: 0 additions & 2 deletions lib/Core/FieldSetWithView.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ interface FieldSetWithView extends FieldSet
{
/**
* Create a new FieldSetView instance of the FieldSet.
*
* @return FieldSetView
*/
public function createView(): FieldSetView;
}
2 changes: 0 additions & 2 deletions lib/Core/Input/ProcessorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ public function getMaxNestingLevel(): int

/**
* Set the maximum number of values per group.
*
* @param int $maxValues
*/
public function setMaxValues(int $maxValues)
{
Expand Down
2 changes: 0 additions & 2 deletions lib/Core/Input/StringLexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,6 @@ public function patternMatchValue(): array
* The detection is very loosely and stops after
* the first positive detection. As a result, a value
* may not match unquoted special characters.
*
* @return string
*/
public function detectValueType(string $name): string
{
Expand Down
3 changes: 0 additions & 3 deletions lib/Core/Input/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ interface Validator
* Initialize the validator context for the field.
*
* Whenever calling validate(), this context needs to be used.
*
* @param FieldConfig $field
* @param ErrorList $errorList
*/
public function initializeContext(FieldConfig $field, ErrorList $errorList): void;

Expand Down
2 changes: 0 additions & 2 deletions lib/Core/InputProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ interface InputProcessor
* @throws Exception\InvalidSearchConditionException When there are errors in the input
* this can be a failed transformation
* or processing error
*
* @return SearchCondition
*/
public function process(ProcessorConfig $config, $input): SearchCondition;
}
4 changes: 0 additions & 4 deletions lib/Core/LazyFieldSetRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ public static function create(array $configurators = []): self
* @param string $name The name of the FieldSet configurator
*
* @throws InvalidArgumentException if the configurator can not be retrieved
*
* @return FieldSetConfigurator
*/
public function getConfigurator(string $name): FieldSetConfigurator
{
Expand Down Expand Up @@ -105,8 +103,6 @@ public function getConfigurator(string $name): FieldSetConfigurator
* Returns whether the given FieldSetConfigurator is supported.
*
* @param string $name The name of the FieldSet configurator
*
* @return bool
*/
public function hasConfigurator(string $name): bool
{
Expand Down
4 changes: 0 additions & 4 deletions lib/Core/Searches.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ final class Searches
{
/**
* Creates a SearchFactoryBuilder with the default configuration.
*
* @return SearchFactoryBuilder
*/
public static function createSearchFactoryBuilder(): SearchFactoryBuilder
{
Expand All @@ -127,8 +125,6 @@ public static function createSearchFactoryBuilder(): SearchFactoryBuilder

/**
* Creates a new GenericSearchFactory with the default configuration.
*
* @return SearchFactory
*/
public static function createSearchFactory(): SearchFactory
{
Expand Down
2 changes: 0 additions & 2 deletions lib/Core/Tests/Field/ResolvedFieldTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,6 @@ public function testBuildView()
}

/**
* @param string $typeClass
*
* @return MockObject|FieldType
*/
private function getMockFieldType(string $typeClass = AbstractFieldType::class)
Expand Down
3 changes: 0 additions & 3 deletions lib/Core/Tests/GenericFieldSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ function (FieldSetView $view) {
}

/**
* @param string $name
* @param bool $withView
*
* @return \PHPUnit_Framework_MockObject_MockObject
*/
private function createFieldMock(string $name, bool $withView = false)
Expand Down
23 changes: 6 additions & 17 deletions lib/Core/Tests/Input/InputProcessorTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,7 @@ public function it_processes_groups($input)
abstract public function provideGroupTests();

/**
* @param mixed $input
* @param string $logical
* @param mixed $input
*
* @test
* @dataProvider provideRootLogicalTests
Expand Down Expand Up @@ -428,9 +427,7 @@ public function it_processes_nested_subgroups($input)
abstract public function provideNestedGroupTests();

/**
* @param mixed $input
* @param string $fieldName
* @param string $path
* @param mixed $input
*
* @test
* @dataProvider provideValueOverflowTests
Expand All @@ -452,8 +449,7 @@ public function it_errors_when_maximum_values_count_is_exceeded($input, string $
abstract public function provideValueOverflowTests();

/**
* @param mixed $input
* @param string $path
* @param mixed $input
*
* @test
* @dataProvider provideGroupsOverflowTests
Expand All @@ -477,8 +473,7 @@ abstract public function provideGroupsOverflowTests();
/**
* This tests ensures a private field will throw an UnknownFieldException.
*
* @param mixed $input
* @param string $fieldName
* @param mixed $input
*
* @test
* @dataProvider providePrivateFieldTests
Expand All @@ -499,8 +494,7 @@ public function it_errors_when_private_field_was_used($input, string $fieldName)
abstract public function providePrivateFieldTests();

/**
* @param mixed $input
* @param string $path
* @param mixed $input
*
* @test
* @dataProvider provideNestingLevelExceededTests
Expand Down Expand Up @@ -543,9 +537,7 @@ public function it_errors_when_the_field_does_not_exist_in_fieldset($input)
abstract public function provideUnknownFieldTests();

/**
* @param mixed $input
* @param string $fieldName
* @param string $valueType
* @param mixed $input
*
* @test
* @dataProvider provideUnsupportedValueTypeExceptionTests
Expand All @@ -567,7 +559,6 @@ abstract public function provideUnsupportedValueTypeExceptionTests();

/**
* @param mixed $input
* @param array $path
*
* @test
* @dataProvider provideInvalidRangeTests
Expand Down Expand Up @@ -630,7 +621,6 @@ abstract public function provideNestedErrorsTests();

/**
* @param mixed $input
* @param ProcessorConfig $config
* @param ConditionErrorMessage[] $errors
*/
protected function assertConditionContainsErrorsWithoutCause($input, ProcessorConfig $config, array $errors)
Expand Down Expand Up @@ -663,7 +653,6 @@ protected function assertConditionContainsErrorsWithoutCause($input, ProcessorCo

/**
* @param mixed $input
* @param ProcessorConfig $config
* @param ConditionErrorMessage[] $errors
*/
protected function assertConditionContainsErrors($input, ProcessorConfig $config, array $errors)
Expand Down
2 changes: 0 additions & 2 deletions lib/Core/Tests/Input/NormStringQueryInputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ public function isEqual($value, $nextValue, array $options): bool
}

/**
* @param string $input
*
* @test
* @dataProvider provideMultipleValues
*/
Expand Down
3 changes: 0 additions & 3 deletions lib/Core/Tests/Input/StringQueryInputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@ public function it_processes_with_customer_value_lexer()
}

/**
* @param string $input
* @param StringLexerException $exception
*
* @test
* @dataProvider provideQueryExceptionTests
*/
Expand Down
7 changes: 0 additions & 7 deletions lib/Core/Value/ValuesBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ public function addExcludedSimpleValue($value)
return $this;
}

/**
* @return bool
*/
public function hasExcludedSimpleValues(): bool
{
return \count($this->simpleExcludedValues) > 0;
Expand All @@ -134,8 +131,6 @@ public function hasExcludedSimpleValues(): bool
/**
* Remove a simple excluded value by index.
*
* @param int $index
*
* @return static
*/
public function removeExcludedSimpleValue(int $index)
Expand Down Expand Up @@ -165,8 +160,6 @@ public function get(string $type): array

/**
* Get a single value by type and index.
*
* @return bool
*/
public function has(string $type): bool
{
Expand Down
2 changes: 0 additions & 2 deletions lib/Core/Value/ValuesGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ public function countValues(): int
/**
* This is either one of the following class constants:
* GROUP_LOGICAL_OR or GROUP_LOGICAL_AND.
*
* @return string
*/
public function getGroupLogical(): string
{
Expand Down
2 changes: 0 additions & 2 deletions lib/Doctrine/Dbal/ConditionGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ interface ConditionGenerator
* @param string $prependQuery Prepend before the generated WHERE clause
* Eg. " WHERE " or " AND ", ignored when WHERE
* clause is empty.
*
* @return string
*/
public function getWhereClause(string $prependQuery = ''): string;

Expand Down

0 comments on commit 99957ee

Please sign in to comment.