Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Api/Service/BaseInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function getOrderRepository();
*/
public function getTaxInfoForItems(
\Magento\Sales\Api\Data\OrderInterface $order,
\Mygento\Shipment\Helper\Data $helper
\Mygento\Shipment\Helper\Data $helper,
);

/**
Expand All @@ -61,6 +61,6 @@ public function convertEstimateToDate(string $code, int $estimate): string;
public function addOrderComment(
\Magento\Sales\Model\Order $order,
string $status,
string $comment = ''
string $comment = '',
);
}
4 changes: 2 additions & 2 deletions Api/Service/OrderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function setTracking(
\Magento\Sales\Model\Order $order,
string $carrierCode,
string $trackingCode,
bool $notify = false
bool $notify = false,
);

/**
Expand All @@ -65,6 +65,6 @@ public function failOrder($order, array $messages);
public function addOrderComment(
\Magento\Sales\Model\Order $order,
string $status,
string $comment = ''
string $comment = '',
);
}
6 changes: 3 additions & 3 deletions Block/Adminhtml/Config/Carrier/TrackStatuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected function _prepareArrayRow(\Magento\Framework\DataObject $row)

$row->setData(
'option_extra_attrs',
$optionExtraAttr
$optionExtraAttr,
);
}

Expand All @@ -77,7 +77,7 @@ private function getCarrierStatusesRenderer()
$this->carrierStatuses = $this->getLayout()->createBlock(
$this->getCarrierStatusBlock(),
'',
['data' => ['is_render_to_js_template' => true]]
['data' => ['is_render_to_js_template' => true]],
);
}

Expand All @@ -93,7 +93,7 @@ private function getOrderStatusesRenderer()
$this->orderStatuses = $this->getLayout()->createBlock(
OrderStatuses::class,
'',
['data' => ['is_render_to_js_template' => true]]
['data' => ['is_render_to_js_template' => true]],
);
}

Expand Down
2 changes: 1 addition & 1 deletion Block/Adminhtml/Config/Magento/OrderStatuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class OrderStatuses extends \Magento\Framework\View\Element\Html\Select
public function __construct(
\Magento\Framework\View\Element\Context $context,
\Mygento\Base\Model\Source\Status $orderStatuses,
array $data = []
array $data = [],
) {
$this->orderStatuses = $orderStatuses;
parent::__construct($context, $data);
Expand Down
2 changes: 1 addition & 1 deletion Block/Adminhtml/Order/Estimate.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(
\Magento\Sales\Model\AdminOrder\Create $orderCreate,
\Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency,
\Magento\Tax\Helper\Data $taxData,
array $data = []
array $data = [],
) {
parent::__construct($context, $sessionQuote, $orderCreate, $priceCurrency, $taxData, $data);
$this->serializer = $serializer;
Expand Down
6 changes: 3 additions & 3 deletions Block/Adminhtml/Order/Tab/Delivery.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(
\Mygento\Shipment\Helper\Data $helper,
\Magento\Framework\Registry $coreRegistry,
\Magento\Backend\Block\Template\Context $context,
array $data = []
array $data = [],
) {
$this->helper = $helper;
$this->coreRegistry = $coreRegistry;
Expand Down Expand Up @@ -106,7 +106,7 @@ public function getTabUrl()
{
return $this->getUrl(
'mygento_' . $this->helper->getCode() . '/*/deliverytab',
['_current' => true]
['_current' => true],
);
}

Expand All @@ -118,7 +118,7 @@ public function getLink($action)
{
return $this->_urlBuilder->getUrl(
'mygento_' . $this->helper->getCode() . '/delivery/' . $action,
['_secure' => true, 'order_id' => $this->getOrder()->getId()]
['_secure' => true, 'order_id' => $this->getOrder()->getId()],
);
}
}
2 changes: 1 addition & 1 deletion Controller/Adminhtml/Order/DeliveryDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DeliveryDate extends \Magento\Backend\App\Action
public function __construct(
\Magento\Sales\Api\OrderRepositoryInterface $repo,
\Magento\Framework\Controller\Result\JsonFactory $jsonFactory,
\Magento\Backend\App\Action\Context $context
\Magento\Backend\App\Action\Context $context,
) {
parent::__construct($context);
$this->repo = $repo;
Expand Down
4 changes: 2 additions & 2 deletions Controller/Adminhtml/Order/DeliveryTab.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __construct(
\Magento\Framework\Controller\Result\RawFactory $resultRawFactory,
OrderManagementInterface $orderManagement,
OrderRepositoryInterface $orderRepository,
LoggerInterface $logger
LoggerInterface $logger,
) {
parent::__construct(
$context,
Expand All @@ -75,7 +75,7 @@ public function __construct(
$resultRawFactory,
$orderManagement,
$orderRepository,
$logger
$logger,
);
$this->layoutFactory = $layoutFactory;
}
Expand Down
2 changes: 1 addition & 1 deletion Controller/Adminhtml/Order/DeliveryTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DeliveryTime extends \Magento\Backend\App\Action
public function __construct(
\Magento\Sales\Api\OrderRepositoryInterface $repo,
\Magento\Framework\Controller\Result\JsonFactory $jsonFactory,
\Magento\Backend\App\Action\Context $context
\Magento\Backend\App\Action\Context $context,
) {
parent::__construct($context);
$this->repo = $repo;
Expand Down
10 changes: 5 additions & 5 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ public function __construct(
\Magento\Framework\Api\FilterBuilder $filterBuilder,
\Mygento\Base\Model\LogManager $logManager,
\Magento\Framework\Encryption\Encryptor $encryptor,
\Magento\Framework\App\Helper\Context $context
\Magento\Framework\App\Helper\Context $context,
) {
parent::__construct(
$logManager,
$encryptor,
$context
$context,
);
$this->checkoutSession = $checkoutSession;
$this->filterBuilder = $filterBuilder;
Expand Down Expand Up @@ -184,7 +184,7 @@ public function getAutoShippingStatuses($scopeCode = null): array
{
return array_filter(explode(
',',
$this->getConfig(self::XML_AUTO_SHIPPING_STATUSES, $scopeCode) ?: ''
$this->getConfig(self::XML_AUTO_SHIPPING_STATUSES, $scopeCode) ?: '',
));
}

Expand All @@ -195,7 +195,7 @@ public function getTrackCheckStatuses($scopeCode = null): array
{
return array_filter(explode(
',',
$this->getConfig(self::XML_SHIPMENT_TRACK_STATUSES, $scopeCode) ?: ''
$this->getConfig(self::XML_SHIPMENT_TRACK_STATUSES, $scopeCode) ?: '',
));
}

Expand Down Expand Up @@ -264,7 +264,7 @@ public function getMarkingRefund($scopeCode = null)
public function getCarrierFilters(
string $field = 'shipping_method',
$value = null,
string $condition = 'like'
string $condition = 'like',
): array {
if ($value === null) {
$value = $this->getCarrierCode() . '_%';
Expand Down
10 changes: 5 additions & 5 deletions Helper/Dimensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Dimensions
public function __construct(
\Mygento\Base\Api\ProductAttributeHelperInterface $attrHelper,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Catalog\Model\ResourceModel\Product $productResource
\Magento\Catalog\Model\ResourceModel\Product $productResource,
) {
$this->attrHelper = $attrHelper;
$this->storeManager = $storeManager;
Expand Down Expand Up @@ -76,17 +76,17 @@ public function getItemsSizes($sizeCoefficient, $weightCoefficient, $object, $pr
'length' => $this->getAttrValueByParam(
$prefix . 'length',
$productId,
$sizeCoefficient
$sizeCoefficient,
),
'height' => $this->getAttrValueByParam(
$prefix . 'height',
$productId,
$sizeCoefficient
$sizeCoefficient,
),
'width' => $this->getAttrValueByParam(
$prefix . 'width',
$productId,
$sizeCoefficient
$sizeCoefficient,
),
'weight' => round($item->getWeight() * $weightCoefficient, 2),
];
Expand Down Expand Up @@ -191,7 +191,7 @@ public function formatToNumber($value)
return (float) str_replace(
[' ', ','],
['', '.'],
$value ?? ''
$value ?? '',
);
}

Expand Down
4 changes: 2 additions & 2 deletions Model/AbstractCarrier.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory,
\Psr\Log\LoggerInterface $logger,
array $data = []
array $data = [],
) {
$this->helper = $helper;
$this->baseCarrier = $baseCarrier;
Expand All @@ -41,7 +41,7 @@ public function __construct(
$scopeConfig,
$rateErrorFactory,
$logger,
$data
$data,
);
}

Expand Down
2 changes: 1 addition & 1 deletion Model/AbstractClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ abstract class AbstractClient implements \Mygento\Shipment\Api\Client\AbstractCl
*/
public function __construct(
\Mygento\Shipment\Helper\Data $helper,
\Mygento\Shipment\Model\Client $baseClient
\Mygento\Shipment\Model\Client $baseClient,
) {
$this->baseClient = $baseClient;
$this->helper = $helper;
Expand Down
10 changes: 5 additions & 5 deletions Model/AbstractService.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ abstract class AbstractService implements CalculateInterface, OrderInterface
public function __construct(
\Mygento\Shipment\Model\Service $baseService,
\Mygento\Shipment\Helper\Data $helper,
\Magento\Framework\Api\SearchCriteriaBuilder $searchBuilder
\Magento\Framework\Api\SearchCriteriaBuilder $searchBuilder,
) {
$this->baseService = $baseService;
$this->searchBuilder = $searchBuilder;
Expand Down Expand Up @@ -118,7 +118,7 @@ public function getTaxHelper()
*/
public function getTaxInfoForItems(
\Magento\Sales\Api\Data\OrderInterface $order,
\Mygento\Shipment\Helper\Data $helper
\Mygento\Shipment\Helper\Data $helper,
) {
return $this->baseService->getTaxInfoForItems($order, $helper);
}
Expand Down Expand Up @@ -153,7 +153,7 @@ public function setTracking(
\Magento\Sales\Model\Order $order,
string $carrierCode,
string $trackingCode,
bool $notify = false
bool $notify = false,
) {
return $this->baseService->setTracking($order, $carrierCode, $trackingCode, $notify);
}
Expand Down Expand Up @@ -189,7 +189,7 @@ public function failOrder($order, array $messages)
$fail = $this->helper->getShipmentFailStatus($order->getStoreId()) ?? false;
$order->addCommentToStatusHistory(
__('Order ship fail by %1: %2', $this->helper->getCode(), implode(PHP_EOL, $messages)),
$fail
$fail,
);
$this->getOrderRepository()->save($order);

Expand All @@ -204,7 +204,7 @@ public function failOrder($order, array $messages)
public function addOrderComment(
\Magento\Sales\Model\Order $order,
string $status,
string $comment = ''
string $comment = '',
) {
$this->baseService->addOrderComment($order, $status, $comment);
}
Expand Down
2 changes: 1 addition & 1 deletion Model/Carrier.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function __construct(
\Mygento\Shipment\Api\Data\CalculateRequestInterfaceFactory $calculateFactory,
\Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory,
\Magento\Quote\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory,
\Magento\Shipping\Model\Tracking\Result\StatusFactory $trackingResultFactory
\Magento\Shipping\Model\Tracking\Result\StatusFactory $trackingResultFactory,
) {
$this->helper = $helper;
$this->rateResultFactory = $rateResultFactory;
Expand Down
2 changes: 1 addition & 1 deletion Model/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Client implements \Mygento\Shipment\Api\Client\BaseInterface
*/
public function __construct(
\Magento\Framework\Event\Manager $eventManager,
CurlFactory $curl
CurlFactory $curl,
) {
$this->curl = $curl;
$this->eventManager = $eventManager;
Expand Down
2 changes: 1 addition & 1 deletion Model/Cron/Autoship.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(
\Magento\Sales\Api\OrderRepositoryInterface $repo,
\Magento\Framework\Api\SearchCriteriaBuilder $builder,
\Magento\Framework\Api\FilterBuilder $filterBuilder,
\Magento\Framework\Api\SortOrderBuilder $sortBuilder
\Magento\Framework\Api\SortOrderBuilder $sortBuilder,
) {
$this->repo = $repo;
$this->builder = $builder;
Expand Down
2 changes: 1 addition & 1 deletion Model/PointManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(
\Mygento\Shipment\Model\ResourceModel\Point\CollectionFactory $collectionFactory,
\Mygento\Shipment\Api\Data\PointInterfaceFactory $pointFactory,
\Mygento\Shipment\Model\ResourceModel\Point $point,
array $carrierPool = []
array $carrierPool = [],
) {
$this->helper = $helper;
$this->pointFactory = $pointFactory;
Expand Down
8 changes: 4 additions & 4 deletions Model/PointRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(
ResourceModel\Point\CollectionFactory $collectionFactory,
\Mygento\Shipment\Api\Data\PointInterfaceFactory $entityFactory,
\Mygento\Shipment\Api\Data\PointSearchResultsInterfaceFactory $searchResultsFactory,
\Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface $collectionProcessor = null
\Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface $collectionProcessor = null,
) {
$this->resource = $resource;
$this->collectionFactory = $collectionFactory;
Expand All @@ -63,7 +63,7 @@ public function getById($entityId)
$this->resource->load($entity, $entityId);
if (!$entity->getId()) {
throw new \Magento\Framework\Exception\NoSuchEntityException(
__('Shipment Point with id "%1" does not exist.', $entityId)
__('Shipment Point with id "%1" does not exist.', $entityId),
);
}

Expand All @@ -81,7 +81,7 @@ public function save(\Mygento\Shipment\Api\Data\PointInterface $entity)
$this->resource->save($entity);
} catch (\Exception $exception) {
throw new \Magento\Framework\Exception\CouldNotSaveException(
__($exception->getMessage())
__($exception->getMessage()),
);
}

Expand All @@ -99,7 +99,7 @@ public function delete(\Mygento\Shipment\Api\Data\PointInterface $entity)
$this->resource->delete($entity);
} catch (\Exception $exception) {
throw new \Magento\Framework\Exception\CouldNotDeleteException(
__($exception->getMessage())
__($exception->getMessage()),
);
}

Expand Down
2 changes: 1 addition & 1 deletion Model/ResourceModel/Point/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected function _construct()
{
$this->_init(
Point::class,
PointResource::class
PointResource::class,
);
}
}
2 changes: 1 addition & 1 deletion Model/ResourceModel/Point/Grid/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct(
$fetchStrategy,
$eventManager,
$connection,
$resource
$resource,
);
$this->_eventPrefix = $eventPrefix;
$this->_eventObject = $eventObject;
Expand Down
Loading
Loading