Skip to content

Commit

Permalink
Fix CS Fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhelias committed Jul 6, 2023
1 parent 78098a1 commit 1564f19
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ class FormTwigTemplateCompilerPass implements CompilerPassInterface
private $phoneNumberBootstrap4Layout = '@MisdPhoneNumber/Form/phone_number_bootstrap_4.html.twig';
private $phoneNumberBootstrap5Layout = '@MisdPhoneNumber/Form/phone_number_bootstrap_5.html.twig';

/**
* {@inheritdoc}
*/
public function process(ContainerBuilder $container): void
{
if (false === $container->hasParameter('twig.form.resources')) {
Expand Down
3 changes: 0 additions & 3 deletions src/DependencyInjection/MisdPhoneNumberExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
*/
class MisdPhoneNumberExtension extends Extension
{
/**
* {@inheritdoc}
*/
public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
Expand Down
15 changes: 0 additions & 15 deletions src/Doctrine/DBAL/Types/PhoneNumberType.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,16 @@ class PhoneNumberType extends Type
*/
public const NAME = 'phone_number';

/**
* {@inheritdoc}
*/
public function getName(): string
{
return self::NAME;
}

/**
* {@inheritdoc}
*/
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform): string
{
return $platform->getVarcharTypeDeclarationSQL(['length' => 35]);
}

/**
* {@inheritdoc}
*/
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if (null === $value) {
Expand All @@ -63,9 +54,6 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): ?str
return $util->format($value, PhoneNumberFormat::E164);
}

/**
* {@inheritdoc}
*/
public function convertToPHPValue($value, AbstractPlatform $platform): ?PhoneNumber
{
if (null === $value || $value instanceof PhoneNumber) {
Expand All @@ -81,9 +69,6 @@ public function convertToPHPValue($value, AbstractPlatform $platform): ?PhoneNum
}
}

/**
* {@inheritdoc}
*/
public function requiresSQLCommentHint(AbstractPlatform $platform): bool
{
return true;
Expand Down
6 changes: 0 additions & 6 deletions src/Form/DataTransformer/PhoneNumberToArrayTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ public function __construct(array $countryChoices)
$this->countryChoices = $countryChoices;
}

/**
* {@inheritdoc}
*/
public function transform($phoneNumber): array
{
if (null === $phoneNumber) {
Expand All @@ -59,9 +56,6 @@ public function transform($phoneNumber): array
];
}

/**
* {@inheritdoc}
*/
public function reverseTransform($value): ?PhoneNumber
{
if (!$value) {
Expand Down
6 changes: 0 additions & 6 deletions src/Form/DataTransformer/PhoneNumberToStringTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ public function __construct(
$this->format = $format;
}

/**
* {@inheritdoc}
*/
public function transform($phoneNumber): string
{
if (null === $phoneNumber) {
Expand All @@ -71,9 +68,6 @@ public function transform($phoneNumber): string
return $util->format($phoneNumber, $this->format);
}

/**
* {@inheritdoc}
*/
public function reverseTransform($string): ?PhoneNumber
{
if (!$string && '0' !== $string) {
Expand Down
15 changes: 0 additions & 15 deletions src/Form/Type/PhoneNumberType.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ class PhoneNumberType extends AbstractType
public const DISPLAY_COUNTRY_FULL = 'display_country_full';
public const DISPLAY_COUNTRY_SHORT = 'display_country_short';

/**
* {@inheritdoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options): void
{
if (self::WIDGET_COUNTRY_CHOICE === $options['widget']) {
Expand Down Expand Up @@ -108,18 +105,12 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
}
}

/**
* {@inheritdoc}
*/
public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['type'] = 'tel';
$view->vars['widget'] = $options['widget'];
}

/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
Expand Down Expand Up @@ -154,17 +145,11 @@ public function configureOptions(OptionsResolver $resolver): void
$resolver->setAllowedTypes('number_options', 'array');
}

/**
* {@inheritdoc}
*/
public function getName(): string
{
return $this->getBlockPrefix();
}

/**
* {@inheritdoc}
*/
public function getBlockPrefix(): string
{
return 'phone_number';
Expand Down
3 changes: 0 additions & 3 deletions src/MisdPhoneNumberBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
*/
class MisdPhoneNumberBundle extends Bundle
{
/**
* {@inheritdoc}
*/
public function build(ContainerBuilder $container): void
{
parent::build($container);
Expand Down
10 changes: 0 additions & 10 deletions src/Serializer/Normalizer/PhoneNumberNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,26 +61,19 @@ public function __construct(PhoneNumberUtil $phoneNumberUtil, $region = PhoneNum
}

/**
* {@inheritdoc}
*
* @throws InvalidArgumentException
*/
public function normalize($object, $format = null, array $context = []): string
{
return $this->phoneNumberUtil->format($object, $this->format);
}

/**
* {@inheritdoc}
*/
public function supportsNormalization($data, $format = null, array $context = []): bool
{
return $data instanceof PhoneNumber;
}

/**
* {@inheritdoc}
*
* @throws UnexpectedValueException
*/
public function denormalize($data, $class, $format = null, array $context = []): ?PhoneNumber
Expand All @@ -96,9 +89,6 @@ public function denormalize($data, $class, $format = null, array $context = []):
}
}

/**
* {@inheritdoc}
*/
public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
{
return PhoneNumber::class === $type && \is_string($data);
Expand Down
11 changes: 0 additions & 11 deletions src/Twig/Extension/PhoneNumberHelperExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ public function __construct(PhoneNumberHelper $helper)
$this->helper = $helper;
}

/**
* {@inheritdoc}
*/
public function getFunctions(): array
{
return [
Expand All @@ -51,9 +48,6 @@ public function getFunctions(): array
];
}

/**
* {@inheritdoc}
*/
public function getFilters(): array
{
return [
Expand All @@ -62,9 +56,6 @@ public function getFilters(): array
];
}

/**
* {@inheritdoc}
*/
public function getTests(): array
{
return [
Expand All @@ -73,8 +64,6 @@ public function getTests(): array
}

/**
* {@inheritdoc}
*
* @return string
*/
public function getName()
Expand Down
10 changes: 4 additions & 6 deletions src/Validator/Constraints/PhoneNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,13 @@ class PhoneNumber extends Constraint
*/
protected static $errorNames = self::ERROR_NAMES;

public $message = null;
public $message;
public $type = self::ANY;
public $defaultRegion = null;
public $regionPath = null;
public $format = null;
public $defaultRegion;
public $regionPath;
public $format;

/**
* {@inheritdoc}
*
* @param int|array|null $format Specify the format (\libphonenumber\PhoneNumberFormat::*)
* or options (an associative array)
* @param string|array|null $type
Expand Down
3 changes: 0 additions & 3 deletions src/Validator/Constraints/PhoneNumberValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ public function __construct(PhoneNumberUtil $phoneUtil = null, string $defaultRe
$this->format = $format;
}

/**
* {@inheritdoc}
*/
public function validate($value, Constraint $constraint): void
{
if (null === $value || '' === $value) {
Expand Down

0 comments on commit 1564f19

Please sign in to comment.