Skip to content

Commit

Permalink
Merge pull request #280 from fezfez/update-laminas-coding-standard
Browse files Browse the repository at this point in the history
laminas/laminas-coding-standard:^3.0 + composer bump --dev-only
  • Loading branch information
Slamdunk authored Nov 13, 2024
2 parents 97e7f1a + a28a5a5 commit 8993187
Show file tree
Hide file tree
Showing 39 changed files with 293 additions and 339 deletions.
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@
},
"require-dev": {
"ext-intl": "*",
"doctrine/annotations": "^1.14.3 || ^2.0.1",
"doctrine/annotations": "^1.14.3 || ^2.0.2",
"laminas/laminas-captcha": "^2.17",
"laminas/laminas-coding-standard": "^2.5",
"laminas/laminas-coding-standard": "^3.0.1",
"laminas/laminas-db": "^2.20",
"laminas/laminas-escaper": "^2.13",
"laminas/laminas-escaper": "^2.14",
"laminas/laminas-eventmanager": "^3.13.1",
"laminas/laminas-filter": "^2.36",
"laminas/laminas-i18n": "^2.28.0",
"laminas/laminas-filter": "^2.39",
"laminas/laminas-i18n": "^2.29.0",
"laminas/laminas-modulemanager": "^2.16.0",
"laminas/laminas-recaptcha": "^3.7",
"laminas/laminas-servicemanager": "^3.22.1",
"laminas/laminas-recaptcha": "^3.8",
"laminas/laminas-servicemanager": "^3.23.0",
"laminas/laminas-session": "^2.21",
"laminas/laminas-text": "^2.11.0",
"laminas/laminas-validator": "^2.64.1",
"laminas/laminas-view": "^2.35",
"phpunit/phpunit": "^10.5.29",
"phpunit/phpunit": "^10.5.38",
"psalm/plugin-phpunit": "^0.19.0",
"vimeo/psalm": "^5.25"
"vimeo/psalm": "^5.26.1"
},
"conflict": {
"doctrine/annotations": "<1.14.0",
Expand Down
488 changes: 276 additions & 212 deletions composer.lock

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.25.0@01a8eb06b9e9cc6cfb6a320bf9fb14331919d505">
<files psalm-version="5.26.1@d747f6500b38ac4f7dfc5edbcae6e4b637d7add0">
<file src="src/Annotation/AbstractBuilder.php">
<InvalidArrayOffset>
<code><![CDATA[$params['elementSpec']['spec']['type']]]></code>
Expand Down Expand Up @@ -1258,6 +1258,11 @@
<code><![CDATA[$options]]></code>
</MissingParamType>
</file>
<file src="test/TestAsset/StringToArrayFilter.php">
<DeprecatedClass>
<code><![CDATA[AbstractFilter]]></code>
</DeprecatedClass>
</file>
<file src="test/TestAsset/ValueStoringFieldset.php">
<PropertyNotSetInConstructor>
<code><![CDATA[$storedValue]]></code>
Expand Down
2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorLevel="2"
errorBaseline="psalm-baseline.xml"
findUnusedBaselineEntry="false"
findUnusedCode="false"
>
<projectFiles>
<directory name="src"/>
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ public function __construct(private array $attributes)

/**
* Retrieve the attributes
*
* @return array
*/
public function getAttributes(): array
{
Expand Down
3 changes: 0 additions & 3 deletions src/Annotation/BuilderAbstractFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ public function canCreate(ContainerInterface $container, $requestedName): bool
* array if not found or not an array.
*
* Otherwise, returns the `form_annotation_builder` array.
*
* @return array
*/
private function marshalConfig(ContainerInterface $container): array
{
Expand All @@ -96,7 +94,6 @@ private function marshalConfig(ContainerInterface $container): array
* - if the fetched instance is not a `ListenerAggregate`, raises an exception
* - otherwise attaches it to the event manager
*
* @param array $config
* @throws ServiceNotCreatedException If any listener is not an event listener aggregate.
*/
private function injectListeners(array $config, EventManagerInterface $events, ContainerInterface $container): void
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/ComposedObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ public function isCollection(): bool

/**
* Retrieve the options for the composed object
*
* @return array
*/
public function getOptions(): array
{
Expand Down
1 change: 0 additions & 1 deletion src/Annotation/ElementAnnotationsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ public function handleValidatorAnnotation(EventInterface $e): void
/**
* @param array|ArrayAccess $elementSpec
* @param ComposedObject|Options $annotation
* @return array
*/
private function mergeOptions($elementSpec, $annotation): array
{
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ public function __construct($name, array $options = [], ?int $priority = null)

/**
* Retrieve the filter specification
*
* @return array
*/
public function getFilterSpecification(): array
{
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Flags.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ public function __construct(private array $flags)

/**
* Retrieve the flags
*
* @return array
*/
public function getFlags(): array
{
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Hydrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ public function __construct($type, array $options = [])

/**
* Retrieve the hydrator specification
*
* @return array
*/
public function getHydratorSpecification(): array
{
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ public function __construct(private array $options)

/**
* Retrieve the options
*
* @return array
*/
public function getOptions(): array
{
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/ValidationGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ public function __construct(private array $validationGroup)

/**
* Retrieve the options
*
* @return array
*/
public function getValidationGroup(): array
{
Expand Down
2 changes: 0 additions & 2 deletions src/Annotation/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ public function __construct($name, array $options = [], ?bool $breakChainOnFailu

/**
* Retrieve the validator specification
*
* @return array
*/
public function getValidatorSpecification(): array
{
Expand Down
5 changes: 0 additions & 5 deletions src/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ public function setOptions(iterable $options)

/**
* Get defined options
*
* @return array
*/
public function getOptions(): array
{
Expand Down Expand Up @@ -324,8 +322,6 @@ public function setLabelOptions(iterable $arrayOrTraversable)

/**
* Get label specific options
*
* @return array
*/
public function getLabelOptions(): array
{
Expand All @@ -346,7 +342,6 @@ public function clearLabelOptions()
/**
* Remove many attributes at once
*
* @param array $keys
* @return $this
*/
public function removeLabelOptions(array $keys)
Expand Down
3 changes: 0 additions & 3 deletions src/Element/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,6 @@ public function allowValueBinding(): bool
/**
* Bind values to the object
*
* @param array $values
* @param array $validationGroup
* @return array|mixed|void
*/
public function bindValues(array $values = [], ?array $validationGroup = null)
Expand Down Expand Up @@ -476,7 +474,6 @@ public function prepareElement(FormInterface $form): void
}

/**
* @return array
* @throws Exception\InvalidArgumentException
* @throws InvalidArgumentException
* @throws Exception\DomainException
Expand Down
3 changes: 0 additions & 3 deletions src/Element/Csrf.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ public function setOptions(iterable $options)
return $this;
}

/**
* @return array
*/
public function getCsrfValidatorOptions(): array
{
return $this->csrfValidatorOptions;
Expand Down
2 changes: 0 additions & 2 deletions src/Element/MultiCheckbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ protected function getValidator(): ?ValidatorInterface

/**
* Get only the values from the options attribute
*
* @return array
*/
protected function getValueOptionsValues(): array
{
Expand Down
5 changes: 0 additions & 5 deletions src/Element/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ class Select extends Element implements InputProviderInterface
/** @var string */
protected $unselectedValue = '';

/**
* @return array
*/
public function getValueOptions(): array
{
return $this->valueOptions;
Expand Down Expand Up @@ -299,8 +296,6 @@ public function getInputSpecification(): array

/**
* Get only the values from the options attribute
*
* @return array
*/
protected function getValueOptionsValues(): array
{
Expand Down
2 changes: 0 additions & 2 deletions src/ElementInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ public function setOption(string $key, mixed $value);

/**
* get the defined options
*
* @return array
*/
public function getOptions(): array;

Expand Down
5 changes: 0 additions & 5 deletions src/Fieldset.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ public function getFormFactory(): Factory
*
* @todo Should we detect if the element/fieldset name conflicts?
* @param array|Traversable|ElementInterface $elementOrFieldset
* @param array $flags
* @return $this
* @throws Exception\InvalidArgumentException
*/
Expand Down Expand Up @@ -347,7 +346,6 @@ public function prepareElement(FormInterface $form): void
/**
* Recursively populate values of attached elements and fieldsets
*
* @param iterable $data
* @throws Exception\InvalidArgumentException
*/
public function populateValues(iterable $data): void
Expand Down Expand Up @@ -535,7 +533,6 @@ public function allowValueBinding(): bool
/**
* Bind values to the bound object
*
* @param array $values
* @param array|null $validationGroup
* @return mixed
*/
Expand Down Expand Up @@ -603,8 +600,6 @@ public function useAsBaseFieldset(): bool

/**
* Extract values from the bound object
*
* @return array
*/
protected function extract(): array
{
Expand Down
1 change: 0 additions & 1 deletion src/FieldsetInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ interface FieldsetInterface extends
* ElementInterface; however, keeping it flexible
* to allow a factory-based form
* implementation as well
* @param array $flags
* @return $this
*/
public function add($elementOrFieldset, array $flags = []);
Expand Down
8 changes: 0 additions & 8 deletions src/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ class Form extends Fieldset implements FormInterface
* Set options for a form. Accepted options are:
* - prefer_form_input_filter: is form input filter is preferred?
*
* @param iterable $options
* @return $this
* @throws Exception\InvalidArgumentException
*/
Expand Down Expand Up @@ -163,7 +162,6 @@ public function setOptions(iterable $options)
* the element or fieldset, order in which to prioritize it, etc.
*
* @param array|Traversable|ElementInterface $elementOrFieldset
* @param array $flags
* @return $this
*/
public function add($elementOrFieldset, array $flags = [])
Expand Down Expand Up @@ -312,8 +310,6 @@ public function setHydrator(HydratorInterface $hydrator)

/**
* Bind values to the bound object
*
* @param array $values
*/
public function bindValues(array $values = [], ?array $validationGroup = null): void
{
Expand Down Expand Up @@ -355,8 +351,6 @@ public function bindValues(array $values = [], ?array $validationGroup = null):

/**
* Parse filtered values and return only posted fields for binding
*
* @return array
*/
protected function prepareBindData(array $values, array $match): array
{
Expand Down Expand Up @@ -883,8 +877,6 @@ public function populateValues(iterable $data, bool $onlyBase = false): void

/**
* Recursively extract values for elements and sub-fieldsets
*
* @return array
*/
protected function extract(): array
{
Expand Down
4 changes: 0 additions & 4 deletions src/FormAbstractServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ public function canCreate(ContainerInterface $container, $requestedName): bool

/**
* Get forms configuration, if any
*
* @return array
*/
protected function getConfig(ContainerInterface $container): array
{
Expand Down Expand Up @@ -119,8 +117,6 @@ protected function getFormFactory(ContainerInterface $container): Factory
* retrieves it and resets the specification to the instance.
* - otherwise, pulls the input filter factory from the form factory, and
* attaches the FilterManager and ValidatorManager to it.
*
* @param array $config
*/
protected function marshalInputFilter(array &$config, ContainerInterface $container, Factory $formFactory): void
{
Expand Down
3 changes: 0 additions & 3 deletions src/LabelAwareInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ public function setLabelOptions(iterable $arrayOrTraversable);

/**
* Get label specific options
*
* @return array
*/
public function getLabelOptions(): array;

Expand Down Expand Up @@ -80,7 +78,6 @@ public function hasLabelOption(string $key): bool;
/**
* Remove many attributes at once
*
* @param array $keys
* @return $this
*/
public function removeLabelOptions(array $keys);
Expand Down
4 changes: 0 additions & 4 deletions src/LabelAwareTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ public function setLabelAttributes(array $labelAttributes)

/**
* Get the attributes to use with the label
*
* @return array
*/
public function getLabelAttributes(): array
{
Expand All @@ -61,8 +59,6 @@ public function setLabelOptions(iterable $arrayOrTraversable)

/**
* Get label specific options
*
* @return array
*/
public function getLabelOptions(): array
{
Expand Down
2 changes: 0 additions & 2 deletions src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ final class Module
{
/**
* Return laminas-form configuration for laminas-mvc application.
*
* @return array
*/
public function getConfig(): array
{
Expand Down
Loading

0 comments on commit 8993187

Please sign in to comment.