From dd0ab560a9108d786370856647b4230436f1308e Mon Sep 17 00:00:00 2001 From: Ivan Lutokhin Date: Tue, 18 Aug 2020 17:39:55 +0300 Subject: [PATCH] Apple php code style --- Form/ConfigureEditType.php | 21 +++---- Form/ConnectionType.php | 62 +++++++++---------- Form/ParcelType.php | 12 ++-- Model/Coordinates.php | 2 + Model/DeliveryTime.php | 33 +++++----- Model/IntegrationModule.php | 16 ++++- Model/Package.php | 22 ++++--- Model/PaymentType.php | 4 +- Model/Plate.php | 2 + Model/Request/RequestSave.php | 15 ++++- Model/Request/RequestShipmentDelete.php | 2 + Model/Request/RequestShipmentSave.php | 7 +++ Model/Request/RequestStatusUpdateItem.php | 4 ++ Model/RequestShipmentDelete.php | 2 + Model/RequestShipmentSave.php | 7 +++ Model/RequestStatusUpdateItem.php | 4 ++ .../ResponseAutocompleteSuccessful.php | 2 +- Model/Response/ResponseCalculate.php | 15 ++++- .../Response/ResponseCalculateSuccessful.php | 2 +- Model/Response/ResponseLoadDeliveryData.php | 14 ++++- Model/Response/ResponseSave.php | 11 ++-- Model/Response/ResponseShipmentSave.php | 2 + Model/Response/ResponseSuccessful.php | 2 +- Model/ResponseAutocompleteSuccessful.php | 2 +- Model/ResponseCalculate.php | 15 ++++- Model/ResponseLoadDeliveryData.php | 14 ++++- Model/ResponseShipmentSave.php | 2 + Model/Status.php | 3 + Model/StatusInfo.php | 3 + Service/PinbaService.php | 3 - 30 files changed, 200 insertions(+), 105 deletions(-) diff --git a/Form/ConfigureEditType.php b/Form/ConfigureEditType.php index 7bd146c..a380676 100644 --- a/Form/ConfigureEditType.php +++ b/Form/ConfigureEditType.php @@ -3,34 +3,29 @@ namespace RetailCrm\DeliveryModuleBundle\Form; use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolver; class ConfigureEditType extends AbstractType { /** - * @param FormBuilderInterface $builder - * @param array $options - * * @return void */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('connectionId', null, [ - 'label' => 'label.connectionId', - 'required' => true, + 'label' => 'label.connectionId', + 'required' => true, 'attr' => [ - 'placeholder' => 'label.connectionId' - ] + 'placeholder' => 'label.connectionId', + ], ]) ->add('crmKey', null, [ - 'label' => 'label.crmKey', - 'required' => true, + 'label' => 'label.crmKey', + 'required' => true, 'attr' => [ - 'placeholder' => 'label.crmKey' - ] + 'placeholder' => 'label.crmKey', + ], ]); } } diff --git a/Form/ConnectionType.php b/Form/ConnectionType.php index cb38352..f0ddfee 100644 --- a/Form/ConnectionType.php +++ b/Form/ConnectionType.php @@ -4,69 +4,63 @@ namespace RetailCrm\DeliveryModuleBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; -use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\Form\Extension\Core\Type\UrlType; +use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormEvents; -use Symfony\Component\Form\FormEvent; use Symfony\Component\OptionsResolver\OptionsResolver; class ConnectionType extends AbstractType { /** - * @param FormBuilderInterface $builder - * @param array $options - * * @return void */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('crmUrl', TextType::class, [ - 'label' => 'label.crmUrl', - 'required' => true, - 'attr' => [ - 'placeholder' => 'label.crmUrl', - 'pattern' => '^(https?:\/\/)?([\da-z0-9\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$', + 'label' => 'label.crmUrl', + 'required' => true, + 'attr' => [ + 'placeholder' => 'label.crmUrl', + 'pattern' => '^(https?:\/\/)?([\da-z0-9\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$', ], - 'translation_domain' => 'messages' + 'translation_domain' => 'messages', ]) ->add('crmKey', TextType::class, [ - 'label' => 'label.crmKey', - 'required' => true, - 'attr' => [ - 'placeholder' => 'label.crmKey' + 'label' => 'label.crmKey', + 'required' => true, + 'attr' => [ + 'placeholder' => 'label.crmKey', ], - 'translation_domain' => 'messages' + 'translation_domain' => 'messages', ]) ->add('isActive', CheckboxType::class, [ - 'label' => 'label.isActive', - 'required' => false, - 'translation_domain' => 'messages' + 'label' => 'label.isActive', + 'required' => false, + 'translation_domain' => 'messages', ]) ->add('language', ChoiceType::class, [ - 'label' => 'label.language', - 'choices' => [ - 'RU' => 'ru', - 'EN' => 'en', - 'ES' => 'es' + 'label' => 'label.language', + 'choices' => [ + 'RU' => 'ru', + 'EN' => 'en', + 'ES' => 'es', ], - 'required' => true, - 'translation_domain' => 'messages' + 'required' => true, + 'translation_domain' => 'messages', ]) ->add('isFreeze', CheckboxType::class, [ - 'label' => 'label.isFreeze', - 'required' => false, - 'translation_domain' => 'messages' + 'label' => 'label.isFreeze', + 'required' => false, + 'translation_domain' => 'messages', ]); if ($options['is_admin']) { $builder ->add('debug', CheckboxType::class, [ - 'label' => 'label.debug', - 'required' => false, - 'translation_domain' => 'messages' + 'label' => 'label.debug', + 'required' => false, + 'translation_domain' => 'messages', ]); } } diff --git a/Form/ParcelType.php b/Form/ParcelType.php index 5861f7a..d2f256c 100644 --- a/Form/ParcelType.php +++ b/Form/ParcelType.php @@ -12,7 +12,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; abstract class ParcelType extends AbstractType { /** - * {@inheritDoc} + * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { @@ -23,7 +23,7 @@ abstract class ParcelType extends AbstractType [ 'class' => $options['connection_class'], 'label' => 'label.connection', - 'translation_domain' => 'messages' + 'translation_domain' => 'messages', ] ) ->add( @@ -31,7 +31,7 @@ abstract class ParcelType extends AbstractType TextType::class, [ 'label' => 'label.orderId', - 'translation_domain' => 'messages' + 'translation_domain' => 'messages', ] ) ->add( @@ -39,7 +39,7 @@ abstract class ParcelType extends AbstractType TextType::class, [ 'label' => 'label.trackId', - 'translation_domain' => 'messages' + 'translation_domain' => 'messages', ] ) ->add( @@ -48,13 +48,13 @@ abstract class ParcelType extends AbstractType [ 'required' => false, 'label' => 'label.isClosed', - 'translation_domain' => 'messages' + 'translation_domain' => 'messages', ] ); } /** - * {@inheritDoc} + * {@inheritdoc} */ public function configureOptions(OptionsResolver $resolver) { diff --git a/Model/Coordinates.php b/Model/Coordinates.php index aea4842..8a5a42d 100644 --- a/Model/Coordinates.php +++ b/Model/Coordinates.php @@ -8,6 +8,7 @@ class Coordinates { /** * Широта + * * @var float * * @Serializer\Groups({"get", "response"}) @@ -18,6 +19,7 @@ class Coordinates /** * Долгота + * * @var float * * @Serializer\Groups({"get", "response"}) diff --git a/Model/DeliveryTime.php b/Model/DeliveryTime.php index de483d2..032a342 100644 --- a/Model/DeliveryTime.php +++ b/Model/DeliveryTime.php @@ -42,9 +42,9 @@ class DeliveryTime protected $custom; /** - * @param null|string|\DateTime $from - * @param null|string|\DateTime $to - * @param null|string $custom + * @param string|\DateTime|null $from + * @param string|\DateTime|null $to + * @param string|null $custom * * @return self */ @@ -221,8 +221,8 @@ class DeliveryTime */ public function getString() { - $from = $this->getFrom(); - $to = $this->getTo(); + $from = $this->getFrom(); + $to = $this->getTo(); $custom = $this->getCustom(); if (!($from || $to)) { @@ -230,7 +230,7 @@ class DeliveryTime } $fromPrint = $from ? $from->format('H:i') : null; - $toPrint = $to ? $to->format('H:i') : null; + $toPrint = $to ? $to->format('H:i') : null; if ($fromPrint && $fromPrint === $toPrint) { return 'в ' . $fromPrint; @@ -250,7 +250,6 @@ class DeliveryTime /** * Проверяет, соответствует ли время доставки диапазону из настроек * - * @param array $range * @return bool */ public function equalsRange(array $range) @@ -259,7 +258,7 @@ class DeliveryTime $toEquals = false; $from = $this->getFrom(); - $to = $this->getTo(); + $to = $this->getTo(); if ($from) { if (isset($range['from'])) { @@ -268,8 +267,8 @@ class DeliveryTime } else { if (!isset($range['from']) || !$range['from'] || - $range['from'] === '00:00' || - $range['from'] === '00:00:00' + '00:00' === $range['from'] || + '00:00:00' === $range['from'] ) { $fromEquals = true; } @@ -282,8 +281,8 @@ class DeliveryTime } else { if (!isset($range['to']) || !$range['to'] || - $range['from'] === '23:59' || - $range['from'] === '23:59:59' + '23:59' === $range['from'] || + '23:59:59' === $range['from'] ) { $toEquals = true; } @@ -326,14 +325,14 @@ class DeliveryTime protected function ensureConsistency() { $from = $this->getFrom(); - $to = $this->getTo(); + $to = $this->getTo(); - if ($from === null && $to !== null) { + if (null === $from && null !== $to) { $this->from = new \DateTime('1970-01-01T00:00:00'); - } elseif ($to === null && $from !== null) { + } elseif (null === $to && null !== $from) { $this->to = new \DateTime('1970-01-01T23:59:59'); - } elseif ($to === null && $from === null) { - $this->to = null; + } elseif (null === $to && null === $from) { + $this->to = null; $this->from = null; } } diff --git a/Model/IntegrationModule.php b/Model/IntegrationModule.php index 0b514c5..c85226d 100644 --- a/Model/IntegrationModule.php +++ b/Model/IntegrationModule.php @@ -8,6 +8,7 @@ class IntegrationModule { /** * Код экземпляра модуля + * * @var string * * @Serializer\Groups({"set", "get"}) @@ -18,6 +19,7 @@ class IntegrationModule /** * Общий символьный код модуля + * * @var string * * @Serializer\Groups({"set", "get"}) @@ -28,7 +30,8 @@ class IntegrationModule /** * Ключ активности модуля - * @var boolean + * + * @var bool * * @Serializer\Groups({"set", "get", "activity"}) * @Serializer\SerializedName("active") @@ -38,7 +41,8 @@ class IntegrationModule /** * Работа модуля заморожена - * @var boolean + * + * @var bool * * @Serializer\Groups({"activity"}) * @Serializer\SerializedName("freeze") @@ -48,6 +52,7 @@ class IntegrationModule /** * Наименование модуля + * * @var string * * @Serializer\Groups({"set", "get"}) @@ -58,6 +63,7 @@ class IntegrationModule /** * Ссылка на svg логотип модуля + * * @var string * * @Serializer\Groups({"set", "get"}) @@ -68,6 +74,7 @@ class IntegrationModule /** * ID подключения + * * @var string * * @Serializer\Groups({"set", "get"}) @@ -78,6 +85,7 @@ class IntegrationModule /** * Базовый url, на который делает запросы RetailCRM + * * @var string * * @Serializer\Groups({"set", "get"}) @@ -88,6 +96,7 @@ class IntegrationModule /** * Относительные пути от базового URL до конкретных методов + * * @var array * * @Serializer\Groups({"set", "get"}) @@ -98,6 +107,7 @@ class IntegrationModule /** * Список стран для которых доступен модуль + * * @var array * * @Serializer\Groups({"set", "get"}) @@ -108,6 +118,7 @@ class IntegrationModule /** * URL настроек модуля + * * @var string * * @Serializer\Groups({"set", "get"}) @@ -118,6 +129,7 @@ class IntegrationModule /** * Массив конфигураций интеграций + * * @var array * * @Serializer\Groups({"set", "get"}) diff --git a/Model/Package.php b/Model/Package.php index 2c71742..39e6688 100644 --- a/Model/Package.php +++ b/Model/Package.php @@ -2,14 +2,15 @@ namespace RetailCrm\DeliveryModuleBundle\Model; -use Symfony\Component\Validator\Mapping\ClassMetadata; -use Symfony\Component\Validator\Constraints as Assert; use JMS\Serializer\Annotation as Serializer; +use Symfony\Component\Validator\Constraints as Assert; +use Symfony\Component\Validator\Mapping\ClassMetadata; class Package { /** * Идентификатор упаковки + * * @var string * * @Serializer\Groups({"request"}) @@ -20,6 +21,7 @@ class Package /** * Вес г. + * * @var float * * @Serializer\Groups({"request", "calculate"}) @@ -30,7 +32,8 @@ class Package /** * Ширина мм. - * @var integer + * + * @var int * * @Serializer\Groups({"request", "calculate"}) * @Serializer\SerializedName("width") @@ -40,7 +43,8 @@ class Package /** * Длина мм. - * @var integer + * + * @var int * * @Serializer\Groups({"request", "calculate"}) * @Serializer\SerializedName("length") @@ -50,7 +54,8 @@ class Package /** * Высота мм. - * @var integer + * + * @var int * * @Serializer\Groups({"request", "calculate"}) * @Serializer\SerializedName("height") @@ -60,6 +65,7 @@ class Package /** * Содержимое упаковки + * * @var PackageItem[] * * @Serializer\Groups({"request"}) @@ -78,9 +84,9 @@ class Package public function getVolume() { - if (!is_null($this->length) - && !is_null($this->width) - && !is_null($this->height) + if (null !== $this->length + && null !== $this->width + && null !== $this->height ) { return $this->length * $this->width * $this->height; } else { diff --git a/Model/PaymentType.php b/Model/PaymentType.php index e98ebc6..61be14c 100644 --- a/Model/PaymentType.php +++ b/Model/PaymentType.php @@ -11,12 +11,12 @@ class PaymentType * @Serializer\SerializedName("code") * @Serializer\Type("string") */ - public string $code; + public $code; /** * @Serializer\Groups({"request"}) * @Serializer\SerializedName("name") * @Serializer\Type("string") */ - public string $name; + public $name; } diff --git a/Model/Plate.php b/Model/Plate.php index cb54045..e2d0f46 100644 --- a/Model/Plate.php +++ b/Model/Plate.php @@ -8,6 +8,7 @@ class Plate { /** * Код печатной формы + * * @var string * * @Serializer\Groups({"get", "set"}) @@ -18,6 +19,7 @@ class Plate /** * Наименование печатной формы + * * @var string * * @Serializer\Groups({"get", "set"}) diff --git a/Model/Request/RequestSave.php b/Model/Request/RequestSave.php index 0d5a590..347e0e9 100644 --- a/Model/Request/RequestSave.php +++ b/Model/Request/RequestSave.php @@ -2,14 +2,13 @@ namespace RetailCrm\DeliveryModuleBundle\Model; -use Symfony\Component\Validator\Mapping\ClassMetadata; -use Symfony\Component\Validator\Constraints as Assert; use JMS\Serializer\Annotation as Serializer; class RequestSave { /** * Идентификатор доставки в службе доставки. Передается если требуется отредактировать уже оформленную доставку + * * @var string * * @Serializer\Groups({"request"}) @@ -20,6 +19,7 @@ class RequestSave /** * Id заказа + * * @var string * * @Serializer\Groups({"request"}) @@ -30,6 +30,7 @@ class RequestSave /** * Номер заказа + * * @var string * * @Serializer\Groups({"request"}) @@ -40,6 +41,7 @@ class RequestSave /** * Код магазина + * * @var string * * @Serializer\Groups({"request"}) @@ -50,6 +52,7 @@ class RequestSave /** * Название магазина + * * @var string * * @Serializer\Groups({"request"}) @@ -60,6 +63,7 @@ class RequestSave /** * Наименование юр.лица + * * @var string * * @Serializer\Groups({"request"}) @@ -70,6 +74,7 @@ class RequestSave /** * Покупатель + * * @var Customer * * @Serializer\Groups({"request"}) @@ -80,6 +85,7 @@ class RequestSave /** * Менеджер, работающий с покупателем + * * @var Manager * * @Serializer\Groups({"request"}) @@ -90,6 +96,7 @@ class RequestSave /** * Набор упаковок + * * @var RetailCrm\DeliveryModuleBundle\Model\Package[] * * @Serializer\Groups({"request"}) @@ -100,6 +107,7 @@ class RequestSave /** * Данные доставки + * * @var RetailCrm\DeliveryModuleBundle\Model\SaveDeliveryData * * @Serializer\Groups({"request"}) @@ -110,7 +118,8 @@ class RequestSave /** * Валюта - * @var string $currency + * + * @var string * * @Serializer\Groups({"request", "calculate"}) * @Serializer\SerializedName("currency") diff --git a/Model/Request/RequestShipmentDelete.php b/Model/Request/RequestShipmentDelete.php index 95392bd..2541ea7 100644 --- a/Model/Request/RequestShipmentDelete.php +++ b/Model/Request/RequestShipmentDelete.php @@ -8,6 +8,7 @@ class RequestShipmentDelete { /** * Идентификатор отгрузки в службе доставки + * * @var string * * @Serializer\Groups({"request"}) @@ -18,6 +19,7 @@ class RequestShipmentDelete /** * Дополнительные данные отгрузки + * * @var array * * @Serializer\Groups({"request"}) diff --git a/Model/Request/RequestShipmentSave.php b/Model/Request/RequestShipmentSave.php index bed4c76..537932a 100644 --- a/Model/Request/RequestShipmentSave.php +++ b/Model/Request/RequestShipmentSave.php @@ -10,6 +10,7 @@ class RequestShipmentSave /** * Идентификатор отгрузки в службе доставки. Передается если требуется отредактировать уже оформленную отгрузку + * * @var string * * @Serializer\Groups({"request"}) @@ -20,6 +21,7 @@ class RequestShipmentSave /** * Менеджер, отвечающий за отгрузку + * * @var Manager * * @Serializer\Groups({"request"}) @@ -30,6 +32,7 @@ class RequestShipmentSave /** * Дата отгрузки + * * @var DateTime * * @Serializer\Groups({"get"}) @@ -40,6 +43,7 @@ class RequestShipmentSave /** * Время доставки ("custom" не ипользуется) + * * @var RetailCrm\DeliveryModuleBundle\Model\DeliveryTime * * @Serializer\Groups({"get"}) @@ -50,6 +54,7 @@ class RequestShipmentSave /** * Адрес отгрузки + * * @var string * * @Serializer\Groups({"get"}) @@ -60,6 +65,7 @@ class RequestShipmentSave /** * Массив идентификаторов оформленных доставок в службе доставки + * * @var array * * @Serializer\Groups({"get"}) @@ -79,6 +85,7 @@ class RequestShipmentSave /** * Дополнительные данные отгрузки + * * @var array * * @Serializer\Groups({"get"}) diff --git a/Model/Request/RequestStatusUpdateItem.php b/Model/Request/RequestStatusUpdateItem.php index 350a018..db0dd4f 100644 --- a/Model/Request/RequestStatusUpdateItem.php +++ b/Model/Request/RequestStatusUpdateItem.php @@ -8,6 +8,7 @@ class RequestStatusUpdateItem { /** * Идентификатор доставки с СД + * * @var string * * @Serializer\Groups({"request"}) @@ -18,6 +19,7 @@ class RequestStatusUpdateItem /** * Трек номер + * * @var string * * @Serializer\Groups({"request"}) @@ -28,6 +30,7 @@ class RequestStatusUpdateItem /** * История смены статусов доставки + * * @var StatusInfo[] * * @Serializer\Groups({"request"}) @@ -38,6 +41,7 @@ class RequestStatusUpdateItem /** * Массив дополнительных данных доставки + * * @var array * * @Serializer\Groups({"request"}) diff --git a/Model/RequestShipmentDelete.php b/Model/RequestShipmentDelete.php index 95392bd..2541ea7 100644 --- a/Model/RequestShipmentDelete.php +++ b/Model/RequestShipmentDelete.php @@ -8,6 +8,7 @@ class RequestShipmentDelete { /** * Идентификатор отгрузки в службе доставки + * * @var string * * @Serializer\Groups({"request"}) @@ -18,6 +19,7 @@ class RequestShipmentDelete /** * Дополнительные данные отгрузки + * * @var array * * @Serializer\Groups({"request"}) diff --git a/Model/RequestShipmentSave.php b/Model/RequestShipmentSave.php index bed4c76..537932a 100644 --- a/Model/RequestShipmentSave.php +++ b/Model/RequestShipmentSave.php @@ -10,6 +10,7 @@ class RequestShipmentSave /** * Идентификатор отгрузки в службе доставки. Передается если требуется отредактировать уже оформленную отгрузку + * * @var string * * @Serializer\Groups({"request"}) @@ -20,6 +21,7 @@ class RequestShipmentSave /** * Менеджер, отвечающий за отгрузку + * * @var Manager * * @Serializer\Groups({"request"}) @@ -30,6 +32,7 @@ class RequestShipmentSave /** * Дата отгрузки + * * @var DateTime * * @Serializer\Groups({"get"}) @@ -40,6 +43,7 @@ class RequestShipmentSave /** * Время доставки ("custom" не ипользуется) + * * @var RetailCrm\DeliveryModuleBundle\Model\DeliveryTime * * @Serializer\Groups({"get"}) @@ -50,6 +54,7 @@ class RequestShipmentSave /** * Адрес отгрузки + * * @var string * * @Serializer\Groups({"get"}) @@ -60,6 +65,7 @@ class RequestShipmentSave /** * Массив идентификаторов оформленных доставок в службе доставки + * * @var array * * @Serializer\Groups({"get"}) @@ -79,6 +85,7 @@ class RequestShipmentSave /** * Дополнительные данные отгрузки + * * @var array * * @Serializer\Groups({"get"}) diff --git a/Model/RequestStatusUpdateItem.php b/Model/RequestStatusUpdateItem.php index 350a018..db0dd4f 100644 --- a/Model/RequestStatusUpdateItem.php +++ b/Model/RequestStatusUpdateItem.php @@ -8,6 +8,7 @@ class RequestStatusUpdateItem { /** * Идентификатор доставки с СД + * * @var string * * @Serializer\Groups({"request"}) @@ -18,6 +19,7 @@ class RequestStatusUpdateItem /** * Трек номер + * * @var string * * @Serializer\Groups({"request"}) @@ -28,6 +30,7 @@ class RequestStatusUpdateItem /** * История смены статусов доставки + * * @var StatusInfo[] * * @Serializer\Groups({"request"}) @@ -38,6 +41,7 @@ class RequestStatusUpdateItem /** * Массив дополнительных данных доставки + * * @var array * * @Serializer\Groups({"request"}) diff --git a/Model/Response/ResponseAutocompleteSuccessful.php b/Model/Response/ResponseAutocompleteSuccessful.php index b8c3e17..75b38ae 100644 --- a/Model/Response/ResponseAutocompleteSuccessful.php +++ b/Model/Response/ResponseAutocompleteSuccessful.php @@ -7,7 +7,7 @@ use JMS\Serializer\Annotation as Serializer; class ResponseAutocompleteSuccessful { /** - * @var boolean + * @var bool * * @Serializer\Groups({"get", "response"}) * @Serializer\SerializedName("success") diff --git a/Model/Response/ResponseCalculate.php b/Model/Response/ResponseCalculate.php index c847adc..dffb547 100644 --- a/Model/Response/ResponseCalculate.php +++ b/Model/Response/ResponseCalculate.php @@ -11,6 +11,7 @@ class ResponseCalculate /** * Код тарифа + * * @var string * * @Serializer\Groups({"response"}) @@ -21,6 +22,7 @@ class ResponseCalculate /** * Группа тарифов + * * @var string * * @Serializer\Groups({"response"}) @@ -31,6 +33,7 @@ class ResponseCalculate /** * Наименование тарифа + * * @var string * * @Serializer\Groups({"response"}) @@ -41,6 +44,7 @@ class ResponseCalculate /** * Тип тарифа (курьерская доставка или самовывоз) + * * @var string * * @Serializer\Groups({"response"}) @@ -51,6 +55,7 @@ class ResponseCalculate /** * Описание + * * @var string * * @Serializer\Groups({"response"}) @@ -61,6 +66,7 @@ class ResponseCalculate /** * Стоимость доставки + * * @var string * * @Serializer\Groups({"response"}) @@ -71,7 +77,8 @@ class ResponseCalculate /** * Минимальный срок доставки - * @var integer + * + * @var int * * @Serializer\Groups({"response"}) * @Serializer\SerializedName("minTerm") @@ -81,7 +88,8 @@ class ResponseCalculate /** * Максимальный срок доставки - * @var integer + * + * @var int * * @Serializer\Groups({"response"}) * @Serializer\SerializedName("maxTerm") @@ -91,6 +99,7 @@ class ResponseCalculate /** * Дополнительные данные доставки + * * @var array * * @Serializer\Groups({"response"}) @@ -101,6 +110,7 @@ class ResponseCalculate /** * Возможные дополнительные данные доставки + * * @var array * * @Serializer\Groups({"response"}) @@ -111,6 +121,7 @@ class ResponseCalculate /** * Список доступных терминалов выдачи посылки + * * @var Terminal[] * * @Serializer\Groups({"response"}) diff --git a/Model/Response/ResponseCalculateSuccessful.php b/Model/Response/ResponseCalculateSuccessful.php index d87206b..16b4bd7 100644 --- a/Model/Response/ResponseCalculateSuccessful.php +++ b/Model/Response/ResponseCalculateSuccessful.php @@ -7,7 +7,7 @@ use JMS\Serializer\Annotation as Serializer; class ResponseCalculateSuccessful { /** - * @var boolean + * @var bool * * @Serializer\Groups({"get", "response"}) * @Serializer\SerializedName("success") diff --git a/Model/Response/ResponseLoadDeliveryData.php b/Model/Response/ResponseLoadDeliveryData.php index ccca5f1..e3654a5 100644 --- a/Model/Response/ResponseLoadDeliveryData.php +++ b/Model/Response/ResponseLoadDeliveryData.php @@ -2,14 +2,13 @@ namespace RetailCrm\DeliveryModuleBundle\Model; -use Symfony\Component\Validator\Mapping\ClassMetadata; -use Symfony\Component\Validator\Constraints as Assert; use JMS\Serializer\Annotation as Serializer; class ResponseLoadDeliveryData { /** * Трек номер + * * @var string * * @Serializer\Groups({"response"}) @@ -20,6 +19,7 @@ class ResponseLoadDeliveryData /** * Стоимость доставки + * * @var float * * @Serializer\Groups({"response"}) @@ -30,6 +30,7 @@ class ResponseLoadDeliveryData /** * Дата отгрузки + * * @var \DateTime * * @Serializer\Groups({"response"}) @@ -40,6 +41,7 @@ class ResponseLoadDeliveryData /** * Дата доставки + * * @var string * * @Serializer\Groups({"response"}) @@ -50,6 +52,7 @@ class ResponseLoadDeliveryData /** * Время доставки + * * @var RetailCrm\DeliveryModuleBundle\Model\DeliveryTime * * @Serializer\Groups({"response"}) @@ -60,6 +63,7 @@ class ResponseLoadDeliveryData /** * Код тарифа + * * @var string * * @Serializer\Groups({"response"}) @@ -70,6 +74,7 @@ class ResponseLoadDeliveryData /** * Наименование тарифа + * * @var string * * @Serializer\Groups({"response"}) @@ -80,6 +85,7 @@ class ResponseLoadDeliveryData /** * Плательщик за доставку + * * @var string * * @Serializer\Groups({"response"}) @@ -90,6 +96,7 @@ class ResponseLoadDeliveryData /** * Текущий статус достаквки + * * @var StatusInfo * * @Serializer\Groups({"response"}) @@ -100,6 +107,7 @@ class ResponseLoadDeliveryData /** * Дополнительные данные доставки + * * @var string * * @Serializer\Groups({"response"}) @@ -110,6 +118,7 @@ class ResponseLoadDeliveryData /** * Адрес отгрузки + * * @var DeliveryAddress * * @Serializer\Groups({"response"}) @@ -120,6 +129,7 @@ class ResponseLoadDeliveryData /** * Адрес доставки + * * @var DeliveryAddress * * @Serializer\Groups({"response"}) diff --git a/Model/Response/ResponseSave.php b/Model/Response/ResponseSave.php index c0777b3..1406145 100644 --- a/Model/Response/ResponseSave.php +++ b/Model/Response/ResponseSave.php @@ -2,16 +2,13 @@ namespace RetailCrm\DeliveryModuleBundle\Model; -use Symfony\Component\Validator\Mapping\ClassMetadata; -use Symfony\Component\Validator\Constraints as Assert; use JMS\Serializer\Annotation as Serializer; -use Intaro\CRMDeliveryBundle\Delivery\Generic\Generic; - class ResponseSave { /** * Идентификатор доставки в службе доставки + * * @var string * * @Serializer\Groups({"response"}) @@ -20,8 +17,9 @@ class ResponseSave */ public $deliveryId; - /** + /** * Трек номер + * * @var string * * @Serializer\Groups({"response"}) @@ -32,6 +30,7 @@ class ResponseSave /** * Стоимость доставки + * * @var float * * @Serializer\Groups({"response"}) @@ -42,6 +41,7 @@ class ResponseSave /** * Код статуса доставки + * * @var string * * @Serializer\Groups({"response"}) @@ -52,6 +52,7 @@ class ResponseSave /** * Дополнительные данные доставки + * * @var string * * @Serializer\Groups({"response"}) diff --git a/Model/Response/ResponseShipmentSave.php b/Model/Response/ResponseShipmentSave.php index 337c0c8..0dd8d67 100644 --- a/Model/Response/ResponseShipmentSave.php +++ b/Model/Response/ResponseShipmentSave.php @@ -10,6 +10,7 @@ class ResponseShipmentSave { /** * Идентификатор отгрузки в службе доставки. + * * @var string * * @Serializer\Groups({"response"}) @@ -20,6 +21,7 @@ class ResponseShipmentSave /** * Дополнительные данные доставки + * * @var string * * @Serializer\Groups({"response"}) diff --git a/Model/Response/ResponseSuccessful.php b/Model/Response/ResponseSuccessful.php index 9d86cbf..d45bb2f 100644 --- a/Model/Response/ResponseSuccessful.php +++ b/Model/Response/ResponseSuccessful.php @@ -7,7 +7,7 @@ use JMS\Serializer\Annotation as Serializer; class ResponseSuccessful { /** - * @var boolean + * @var bool * * @Serializer\Groups({"get", "response"}) * @Serializer\SerializedName("success") diff --git a/Model/ResponseAutocompleteSuccessful.php b/Model/ResponseAutocompleteSuccessful.php index b8c3e17..75b38ae 100644 --- a/Model/ResponseAutocompleteSuccessful.php +++ b/Model/ResponseAutocompleteSuccessful.php @@ -7,7 +7,7 @@ use JMS\Serializer\Annotation as Serializer; class ResponseAutocompleteSuccessful { /** - * @var boolean + * @var bool * * @Serializer\Groups({"get", "response"}) * @Serializer\SerializedName("success") diff --git a/Model/ResponseCalculate.php b/Model/ResponseCalculate.php index c847adc..dffb547 100644 --- a/Model/ResponseCalculate.php +++ b/Model/ResponseCalculate.php @@ -11,6 +11,7 @@ class ResponseCalculate /** * Код тарифа + * * @var string * * @Serializer\Groups({"response"}) @@ -21,6 +22,7 @@ class ResponseCalculate /** * Группа тарифов + * * @var string * * @Serializer\Groups({"response"}) @@ -31,6 +33,7 @@ class ResponseCalculate /** * Наименование тарифа + * * @var string * * @Serializer\Groups({"response"}) @@ -41,6 +44,7 @@ class ResponseCalculate /** * Тип тарифа (курьерская доставка или самовывоз) + * * @var string * * @Serializer\Groups({"response"}) @@ -51,6 +55,7 @@ class ResponseCalculate /** * Описание + * * @var string * * @Serializer\Groups({"response"}) @@ -61,6 +66,7 @@ class ResponseCalculate /** * Стоимость доставки + * * @var string * * @Serializer\Groups({"response"}) @@ -71,7 +77,8 @@ class ResponseCalculate /** * Минимальный срок доставки - * @var integer + * + * @var int * * @Serializer\Groups({"response"}) * @Serializer\SerializedName("minTerm") @@ -81,7 +88,8 @@ class ResponseCalculate /** * Максимальный срок доставки - * @var integer + * + * @var int * * @Serializer\Groups({"response"}) * @Serializer\SerializedName("maxTerm") @@ -91,6 +99,7 @@ class ResponseCalculate /** * Дополнительные данные доставки + * * @var array * * @Serializer\Groups({"response"}) @@ -101,6 +110,7 @@ class ResponseCalculate /** * Возможные дополнительные данные доставки + * * @var array * * @Serializer\Groups({"response"}) @@ -111,6 +121,7 @@ class ResponseCalculate /** * Список доступных терминалов выдачи посылки + * * @var Terminal[] * * @Serializer\Groups({"response"}) diff --git a/Model/ResponseLoadDeliveryData.php b/Model/ResponseLoadDeliveryData.php index ccca5f1..e3654a5 100644 --- a/Model/ResponseLoadDeliveryData.php +++ b/Model/ResponseLoadDeliveryData.php @@ -2,14 +2,13 @@ namespace RetailCrm\DeliveryModuleBundle\Model; -use Symfony\Component\Validator\Mapping\ClassMetadata; -use Symfony\Component\Validator\Constraints as Assert; use JMS\Serializer\Annotation as Serializer; class ResponseLoadDeliveryData { /** * Трек номер + * * @var string * * @Serializer\Groups({"response"}) @@ -20,6 +19,7 @@ class ResponseLoadDeliveryData /** * Стоимость доставки + * * @var float * * @Serializer\Groups({"response"}) @@ -30,6 +30,7 @@ class ResponseLoadDeliveryData /** * Дата отгрузки + * * @var \DateTime * * @Serializer\Groups({"response"}) @@ -40,6 +41,7 @@ class ResponseLoadDeliveryData /** * Дата доставки + * * @var string * * @Serializer\Groups({"response"}) @@ -50,6 +52,7 @@ class ResponseLoadDeliveryData /** * Время доставки + * * @var RetailCrm\DeliveryModuleBundle\Model\DeliveryTime * * @Serializer\Groups({"response"}) @@ -60,6 +63,7 @@ class ResponseLoadDeliveryData /** * Код тарифа + * * @var string * * @Serializer\Groups({"response"}) @@ -70,6 +74,7 @@ class ResponseLoadDeliveryData /** * Наименование тарифа + * * @var string * * @Serializer\Groups({"response"}) @@ -80,6 +85,7 @@ class ResponseLoadDeliveryData /** * Плательщик за доставку + * * @var string * * @Serializer\Groups({"response"}) @@ -90,6 +96,7 @@ class ResponseLoadDeliveryData /** * Текущий статус достаквки + * * @var StatusInfo * * @Serializer\Groups({"response"}) @@ -100,6 +107,7 @@ class ResponseLoadDeliveryData /** * Дополнительные данные доставки + * * @var string * * @Serializer\Groups({"response"}) @@ -110,6 +118,7 @@ class ResponseLoadDeliveryData /** * Адрес отгрузки + * * @var DeliveryAddress * * @Serializer\Groups({"response"}) @@ -120,6 +129,7 @@ class ResponseLoadDeliveryData /** * Адрес доставки + * * @var DeliveryAddress * * @Serializer\Groups({"response"}) diff --git a/Model/ResponseShipmentSave.php b/Model/ResponseShipmentSave.php index 337c0c8..0dd8d67 100644 --- a/Model/ResponseShipmentSave.php +++ b/Model/ResponseShipmentSave.php @@ -10,6 +10,7 @@ class ResponseShipmentSave { /** * Идентификатор отгрузки в службе доставки. + * * @var string * * @Serializer\Groups({"response"}) @@ -20,6 +21,7 @@ class ResponseShipmentSave /** * Дополнительные данные доставки + * * @var string * * @Serializer\Groups({"response"}) diff --git a/Model/Status.php b/Model/Status.php index 9da23d9..e3ec892 100644 --- a/Model/Status.php +++ b/Model/Status.php @@ -8,6 +8,7 @@ class Status { /** * Код статуса доставки + * * @var string * * @Serializer\Groups({"get"}) @@ -18,6 +19,7 @@ class Status /** * Наименование статуса + * * @var string * * @Serializer\Groups({"get"}) @@ -28,6 +30,7 @@ class Status /** * Если заказ находится в статусе у которого isEditable:true, это означает можно редактировать данные доставки + * * @var bool * * @Serializer\Groups({"get"}) diff --git a/Model/StatusInfo.php b/Model/StatusInfo.php index da2bc23..9c2b246 100644 --- a/Model/StatusInfo.php +++ b/Model/StatusInfo.php @@ -8,6 +8,7 @@ class StatusInfo { /** * Код статуса доставки + * * @var string * * @Serializer\Groups({"get", "response"}) @@ -18,6 +19,7 @@ class StatusInfo /** * Дата обновления статуса доставки + * * @var \DateTime * * @Serializer\Groups({"get", "response"}) @@ -28,6 +30,7 @@ class StatusInfo /** * Комментарий к статусу + * * @var string * * @Serializer\Groups({"get", "response"}) diff --git a/Service/PinbaService.php b/Service/PinbaService.php index bbe289a..73efebb 100644 --- a/Service/PinbaService.php +++ b/Service/PinbaService.php @@ -5,9 +5,6 @@ namespace RetailCrm\DeliveryModuleBundle\Service; class PinbaService { /** - * @param array $tags - * @param \Closure $handler - * * @return mixed */ public function timerHandler(array $tags, \Closure $handler)