Skip to content

Commit

Permalink
Merge pull request #1542 from scyzoryck/fix-code-style
Browse files Browse the repository at this point in the history
Fix code style
  • Loading branch information
scyzoryck committed Mar 23, 2024
2 parents 678eea6 + 7a2799c commit 4478166
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 27 deletions.
3 changes: 0 additions & 3 deletions src/Context.php
Expand Up @@ -241,9 +241,6 @@ public function getMetadataStack(): \SplStack
return $this->metadataStack;
}

/**
* @return array
*/
public function getCurrentPath(): array
{
if (!$this->metadataStack) {
Expand Down
3 changes: 0 additions & 3 deletions src/EventDispatcher/PreSerializeEvent.php
Expand Up @@ -6,9 +6,6 @@

class PreSerializeEvent extends ObjectEvent
{
/**
* @param array $params
*/
public function setType(string $typeName, array $params = []): void
{
$this->type = ['name' => $typeName, 'params' => $params];
Expand Down
6 changes: 0 additions & 6 deletions src/Handler/DateHandler.php
Expand Up @@ -279,9 +279,6 @@ private function parseDateInterval(string $data): \DateInterval
return $dateInterval;
}

/**
* @param array $type
*/
private function getDeserializationFormats(array $type): array
{
if (isset($type['params'][2])) {
Expand All @@ -291,9 +288,6 @@ private function getDeserializationFormats(array $type): array
return [$this->getFormat($type)];
}

/**
* @param array $type
*/
private function getFormat(array $type): string
{
return $type['params'][0] ?? $this->defaultFormat;
Expand Down
12 changes: 0 additions & 12 deletions src/Handler/FormErrorHandler.php
Expand Up @@ -71,9 +71,6 @@ public function __construct(?object $translator = null, string $translationDomai
$this->translationDomain = $translationDomain;
}

/**
* @param array $type
*/
public function serializeFormToXml(XmlSerializationVisitor $visitor, FormInterface $form, array $type): \DOMElement
{
$formNode = $visitor->getDocument()->createElement('form');
Expand All @@ -98,25 +95,16 @@ public function serializeFormToXml(XmlSerializationVisitor $visitor, FormInterfa
return $formNode;
}

/**
* @param array $type
*/
public function serializeFormToJson(SerializationVisitorInterface $visitor, FormInterface $form, array $type): \ArrayObject
{
return $this->convertFormToArray($visitor, $form);
}

/**
* @param array $type
*/
public function serializeFormErrorToXml(XmlSerializationVisitor $visitor, FormError $formError, array $type): \DOMCdataSection
{
return $visitor->getDocument()->createCDATASection($this->getErrorMessage($formError));
}

/**
* @param array $type
*/
public function serializeFormErrorToJson(SerializationVisitorInterface $visitor, FormError $formError, array $type): string
{
return $this->getErrorMessage($formError);
Expand Down
3 changes: 0 additions & 3 deletions tests/Fixtures/ObjectWithInlineArray.php
Expand Up @@ -16,9 +16,6 @@ final class ObjectWithInlineArray
#[Serializer\Type(name: 'array<string,string>')]
public $array;

/**
* @param array $array
*/
public function __construct(array $array)
{
$this->array = $array;
Expand Down

0 comments on commit 4478166

Please sign in to comment.