From b168d83547666bb1a86a189ce53e405f3fc181fe Mon Sep 17 00:00:00 2001 From: nikita tarasov Date: Wed, 7 Aug 2024 13:21:29 +0300 Subject: [PATCH] shipping generation improvements --- src/Jeeves/Console/Application.php | 2 +- src/Jeeves/Generators/Shipping/Carrier.php | 142 +++++++++--------- src/Jeeves/Generators/Shipping/Model.php | 33 ++++ src/Jeeves/Model/Shipping.php | 54 ++++--- src/Jeeves/Model/Shipping/Configs.php | 2 +- test/Expectations/Shipping/Model/Carrier.php | 70 ++++----- test/Expectations/Shipping/Model/Client.php | 20 +-- test/Expectations/Shipping/Model/Service.php | 45 +++--- .../Shipping/Model/Source/Tax.php | 18 +++ .../Shipping/etc/adminhtml/system.xml | 2 +- test/Shipping/ShippingTest.php | 1 + 11 files changed, 229 insertions(+), 160 deletions(-) create mode 100644 src/Jeeves/Generators/Shipping/Model.php create mode 100644 test/Expectations/Shipping/Model/Source/Tax.php diff --git a/src/Jeeves/Console/Application.php b/src/Jeeves/Console/Application.php index 24b3236..44cd2f9 100644 --- a/src/Jeeves/Console/Application.php +++ b/src/Jeeves/Console/Application.php @@ -15,7 +15,7 @@ class Application extends BaseApplication { public const GEN = 'generate'; public const DS = DIRECTORY_SEPARATOR; - public const VERSION = '1.1.0'; + public const VERSION = '1.1.1'; public const NAME = 'Jeeves'; /** diff --git a/src/Jeeves/Generators/Shipping/Carrier.php b/src/Jeeves/Generators/Shipping/Carrier.php index abcf8bf..9e4ff49 100644 --- a/src/Jeeves/Generators/Shipping/Carrier.php +++ b/src/Jeeves/Generators/Shipping/Carrier.php @@ -10,46 +10,51 @@ class Carrier extends Common public function genCarrier( string $method, string $service, - string $carrier, string $helper, string $rootNamespace, string $phpVersion = PHP_VERSION ): PhpNamespace { - $typehint = version_compare($phpVersion, '7.4.0', '>='); $namespace = new PhpNamespace($rootNamespace . '\Model'); $namespace->addUse('Magento\Quote\Model\Quote\Address\RateRequest'); + $namespace->addUse($helper); + $namespace->addUse('\Mygento\Shipment\Model\Carrier', 'BaseCarrier'); + $namespace->addUse('\Magento\Framework\Profiler'); + $namespace->addUse('\Mygento\Shipment\Model\AbstractCarrier'); + $namespace->addUse('\Magento\Framework\App\Config\ScopeConfigInterface'); + $namespace->addUse('\Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory'); + $namespace->addUse('\Magento\Framework\App\Config\ScopeConfigInterface'); + $namespace->addUse('\Psr\Log\LoggerInterface'); $class = $namespace->addClass('Carrier'); $class->setExtends('\Mygento\Shipment\Model\AbstractCarrier'); $class->addProperty('code', $method) ->setVisibility('protected')->addComment('@var string'); + $class->addProperty('service')->setVisibility('private')->setType($service); + $construct = $class->addMethod('__construct') - ->addComment('@param ' . $service . ' $service') - ->addComment('@param ' . $carrier . ' $carrier') - ->addComment('@param ' . $helper . ' $helper') - ->addComment('@param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig') - ->addComment('@param \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory') - ->addComment('@param \Psr\Log\LoggerInterface $logger') - ->addComment('@param array $data') ->setVisibility('public'); $construct->addParameter('service')->setType($service); - $construct->addParameter('carrier')->setType($carrier); + $construct->addParameter('baseCarrier') + ->setType('\Mygento\Shipment\Model\Carrier'); $construct->addParameter('helper')->setType($helper); - $construct->addParameter('scopeConfig')->setType($service); - $construct->addParameter('rateErrorFactory')->setType($service); - $construct->addParameter('logger')->setType($service); + $construct->addParameter('scopeConfig') + ->setType('\Magento\Framework\App\Config\ScopeConfigInterface'); + $construct->addParameter('rateErrorFactory') + ->setType('\Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory'); + $construct->addParameter('logger')->setType('\Psr\Log\LoggerInterface'); + $construct->addParameter('data')->setType('array')->setDefaultValue([]); $construct->setBody( - '$this->service = $service;' . PHP_EOL + '$this->service = $service;' . PHP_EOL . PHP_EOL . 'parent::__construct(' . PHP_EOL - . ' $helper,' . PHP_EOL - . ' $carrier,' . PHP_EOL - . ' $scopeConfig,' . PHP_EOL - . ' $rateErrorFactory,' . PHP_EOL - . ' $logger,' . PHP_EOL - . ' $data' . PHP_EOL + . self::TAB . '$baseCarrier,' . PHP_EOL + . self::TAB . '$helper,' . PHP_EOL + . self::TAB . '$scopeConfig,' . PHP_EOL + . self::TAB . '$rateErrorFactory,' . PHP_EOL + . self::TAB . '$logger,' . PHP_EOL + . self::TAB . '$data' . PHP_EOL . ');' ); @@ -61,111 +66,112 @@ public function genCarrier( $collect->addParameter('request')->setType('\Magento\Quote\Model\Quote\Address\RateRequest'); $collect->setBody( - '\Magento\Framework\Profiler::start($this->code . \'_collect_rate\');' . PHP_EOL . PHP_EOL - . '//Validation' . PHP_EOL + 'Profiler::start($this->code . \'_collect_rate\');' . PHP_EOL . PHP_EOL + . '// Validation' . PHP_EOL . '$valid = $this->validateRequest($request);' . PHP_EOL . 'if ($valid !== true) {' . PHP_EOL - . ' return $valid;' . PHP_EOL + . self::TAB . 'return $valid;' . PHP_EOL . '}' . PHP_EOL . PHP_EOL - . '$data = [' . PHP_EOL - . ' \'city\' => $this->convertCity($request),' . PHP_EOL - . ' \'weight\' => $this->convertWeight($request),' . PHP_EOL - . ' \'order_sum\' => round($this->getCartTotal(), 0),' . PHP_EOL - . ' \'postcode\' => $this->getPostCode($request),' . PHP_EOL - . '];' . PHP_EOL . PHP_EOL - . '$response = $this->service->calculateDeliveryCost($data);' . PHP_EOL - . '$result = $this->carrier->getResult();' . PHP_EOL - . 'foreach ($response as $delivery) {' . PHP_EOL - . ' $method = [' . PHP_EOL - . ' \'code\' => $this->code,' . PHP_EOL - . ' \'title\' => $this->helper->getConfig(\'title\'),' . PHP_EOL - . ' \'method\' => $this->code,' . PHP_EOL - . ' \'name\' => $this->code,' . PHP_EOL - . ' \'price\' => $request->getFreeShipping() ? 0 : $delivery[\'cost\'],' . PHP_EOL - . ' \'cost\' => $request->getFreeShipping() ? 0 : $delivery[\'cost\'],' . PHP_EOL - . ' \'estimate_dates\' => [],' . PHP_EOL - . ' ];' . PHP_EOL . PHP_EOL - . '$rate = $this->createRateMethod($method);' . PHP_EOL - . '$result->append($rate);' . PHP_EOL + . '$calc = $this->baseCarrier->getCalculateRequest();' . PHP_EOL + . '$calc->setCity($this->convertCity($request));' . PHP_EOL + . '$calc->setIndex($request->getDestPostcode());' . PHP_EOL + . '$calc->setWeight($this->convertWeight($request));' . PHP_EOL + . '$calc->setOrderSum($request->getBaseSubtotalWithDiscountInclTax());' . PHP_EOL + . '$calc->setRawRequest($request);' . PHP_EOL . PHP_EOL + . '$methods = $this->service->calculateDeliveryCost($calc);' . PHP_EOL . PHP_EOL + . '$result = $this->baseCarrier->getResult();' . PHP_EOL + . 'foreach ($methods as $method) {' . PHP_EOL + . self::TAB . '$result->append($this->createRateMethod($method));' . PHP_EOL . '}' . PHP_EOL . PHP_EOL - . '\Magento\Framework\Profiler::stop($this->code . \'_collect_rate\');' . PHP_EOL + . 'Profiler::stop($this->code . \'_collect_rate\');' . PHP_EOL . 'return $result;' . PHP_EOL ); return $namespace; } - public function genService($client, $rootNamespace) + public function genService(string $client, string $helper, string $rootNamespace): PhpNamespace { $namespace = new PhpNamespace($rootNamespace . '\Model'); + $namespace->addUse('\Mygento\Shipment\Model\AbstractService'); + $namespace->addUse('\Magento\Framework\Api\SearchCriteriaBuilder'); + $namespace->addUse('\Magento\Sales\Model\Order'); + $namespace->addUse('\Mygento\Shipment\Api\Data\CalculateRequestInterface'); + $namespace->addUse($helper); + $namespace->addUse('\Mygento\Shipment\Model\Service', 'BaseService'); $class = $namespace->addClass('Service'); $class->setExtends('\Mygento\Shipment\Model\AbstractService'); $construct = $class->addMethod('__construct') - ->addComment('@param ' . $client . ' $client') - ->addComment('@param \Mygento\Shipment\Model\Service $service') ->setVisibility('public'); $construct->addParameter('client')->setType($client); - $construct->addParameter('service')->setType('\Mygento\Shipment\Model\Service'); + $construct->addParameter('helper')->setType($helper); + $construct->addParameter('baseService')->setType('\Mygento\Shipment\Model\Service'); + $construct->addParameter('searchBuilder')->setType('\Magento\Framework\Api\SearchCriteriaBuilder'); $construct->setBody( - '$this->client = $client;' . PHP_EOL - . 'parent::__construct($service);' . PHP_EOL + '$this->client = $client;' . PHP_EOL . PHP_EOL + . 'parent::__construct($baseService, $helper, $searchBuilder);' . PHP_EOL ); - $class->addProperty('client') - ->setVisibility('private')->addComment($client); + $class->addProperty('client')->setType($client) + ->setVisibility('private'); $calculate = $class->addMethod('calculateDeliveryCost') - ->addComment('@param array $params') - ->addComment('@return array') ->setReturnType('array') ->setVisibility('public'); - $calculate->addParameter('params')->setType('array'); + $calculate->addParameter('request')->setType('\Mygento\Shipment\Api\Data\CalculateRequestInterface'); $calculate->setBody('return [];'); - $create = $class->addMethod('orderCreate') - ->addComment('@param \Magento\Sales\Model\Order $order') - ->addComment('@param array $data') + $create = $class->addMethod('createOrder') ->setVisibility('public'); $create->addParameter('order')->setType('\Magento\Sales\Model\Order'); - $create->addParameter('data', [])->setType('array'); + $create->addParameter('data', []); $create->setBody(''); - $cancel = $class->addMethod('orderCancel') + $cancel = $class->addMethod('cancelOrder') ->addComment('@param int|string $orderId') ->setVisibility('public'); $cancel->addParameter('orderId'); $cancel->setBody(''); + $update = $class->addMethod('updateOrderStatus') + ->setVisibility('public'); + + $update->addParameter('order')->setType('\Magento\Sales\Model\Order'); + $update->setBody(''); + return $namespace; } - public function genClient($helper, $rootNamespace) + public function genClient(string $helper, string $rootNamespace): PhpNamespace { $namespace = new PhpNamespace($rootNamespace . '\Model'); + $namespace->addUse('\Mygento\Shipment\Model\AbstractClient'); + $namespace->addUse($helper); + $namespace->addUse('\Mygento\Shipment\Model\Client', 'BaseClient'); $class = $namespace->addClass('Client'); $class->setExtends('\Mygento\Shipment\Model\AbstractClient'); $construct = $class->addMethod('__construct') - ->addComment('@param ' . $helper . ' $helper') - ->addComment('@param \Mygento\Shipment\Model\Client $client') ->setVisibility('public'); $construct->addParameter('helper')->setType($helper); - $construct->addParameter('client')->setType('\Mygento\Shipment\Model\Client'); + $construct->addParameter('baseClient')->setType('\Mygento\Shipment\Model\Client'); $construct->setBody( - '$this->helper = $helper;' . PHP_EOL - . 'parent::__construct($client);' . PHP_EOL + 'parent::__construct($helper, $baseClient);' . PHP_EOL ); - $class->addProperty('helper') - ->setVisibility('private')->addComment($helper); + $send = $class->addMethod('sendApiRequest') + ->setVisibility('public'); + $send->addParameter('method')->setType('string'); + $send->addParameter('data'); + $send->addParameter('scopeCode')->setDefaultValue(null); return $namespace; } diff --git a/src/Jeeves/Generators/Shipping/Model.php b/src/Jeeves/Generators/Shipping/Model.php new file mode 100644 index 0000000..69aed0c --- /dev/null +++ b/src/Jeeves/Generators/Shipping/Model.php @@ -0,0 +1,33 @@ +addUse('\Magento\Framework\Data\OptionSourceInterface'); + + $class = $namespace->addClass('Tax'); + $class->setImplements(['\Magento\Framework\Data\OptionSourceInterface']); + + $options = $class->addMethod('toOptionArray')->setVisibility('public')->setReturnType('array'); + + $options->setBody( + 'return [' . PHP_EOL + . self::TAB . "['value' => 0, 'label' => __('VAT0')]," . PHP_EOL + . self::TAB . "['value' => 10, 'label' => __('VAT10')]," . PHP_EOL + . self::TAB . "['value' => 20, 'label' => __('VAT20')]," . PHP_EOL + . self::TAB . "['value' => null, 'label' => __('VAT Free')]," . PHP_EOL + . '];' . PHP_EOL + ); + + return $namespace; + } +} diff --git a/src/Jeeves/Model/Shipping.php b/src/Jeeves/Model/Shipping.php index 2698541..d81b1c9 100644 --- a/src/Jeeves/Model/Shipping.php +++ b/src/Jeeves/Model/Shipping.php @@ -4,6 +4,7 @@ use Mygento\Jeeves\Generators\Shipping\Carrier; use Mygento\Jeeves\Generators\Shipping\Helper; +use Mygento\Jeeves\Generators\Shipping\Model; use Mygento\Jeeves\IO\IOInterface; use Symfony\Component\Yaml\Yaml; @@ -86,6 +87,7 @@ private function generate(string $carrier, Module $mod): Shipping\Result $this->generateCarrier($carrier); $this->generateClient(); $this->generateService(); + $this->generateTaxModel(); $result->updateCarrierConfigs([ $carrier => [ @@ -126,10 +128,10 @@ private function generateHelper(string $carrier) $this->writeFile( $filePath . $fileName . '.php', 'genHelper( - strtolower($carrier), - $this->mod->getNamespace() - ) + $generator->genHelper( + strtolower($carrier), + $this->mod->getNamespace() + ) ); } @@ -142,13 +144,12 @@ private function generateCarrier(string $carrier) $this->writeFile( $filePath . $fileName . '.php', 'genCarrier( - strtolower($carrier), - $namePath . 'Model\\Service', - $namePath . 'Model\\Carrier', - $namePath . 'Helper\\Data', - $this->mod->getNamespace() - ) + $generator->genCarrier( + strtolower($carrier), + $namePath . 'Model\\Service', + $namePath . 'Helper\\Data', + $this->mod->getNamespace() + ) ); } @@ -161,10 +162,10 @@ private function generateClient() $this->writeFile( $filePath . $fileName . '.php', 'genClient( - $namePath . 'Helper\\Data', - $this->mod->getNamespace() - ) + $generator->genClient( + $namePath . 'Helper\\Data', + $this->mod->getNamespace() + ) ); } @@ -177,10 +178,25 @@ private function generateService() $this->writeFile( $filePath . $fileName . '.php', 'genService( - $namePath . 'Model\\Client', - $this->mod->getNamespace() - ) + $generator->genService( + $namePath . 'Model\\Client', + $namePath . 'Helper\\Data', + $this->mod->getNamespace() + ) + ); + } + + private function generateTaxModel() + { + $generator = new Model(); + $filePath = $this->path . '/Model/Source/'; + $fileName = 'Tax'; + $this->writeFile( + $filePath . $fileName . '.php', + 'genTax( + $this->mod->getNamespace() + ) ); } } diff --git a/src/Jeeves/Model/Shipping/Configs.php b/src/Jeeves/Model/Shipping/Configs.php index 2390f56..495e4ca 100644 --- a/src/Jeeves/Model/Shipping/Configs.php +++ b/src/Jeeves/Model/Shipping/Configs.php @@ -94,7 +94,7 @@ private function generateAdminConfig(array $entity, string $namespace): array $generator = new System(); return [ - 'label' => $entity['title'], + 'label' => $this->getConverter()->getEntityPrintName($entity['title']), $generator->getEnabled(), $generator->getTitle(), $generator->getSort(), diff --git a/test/Expectations/Shipping/Model/Carrier.php b/test/Expectations/Shipping/Model/Carrier.php index a21f07e..5983908 100644 --- a/test/Expectations/Shipping/Model/Carrier.php +++ b/test/Expectations/Shipping/Model/Carrier.php @@ -2,34 +2,36 @@ namespace Mygento\SampleModule\Model; +use Magento\Framework\App\Config\ScopeConfigInterface; +use Magento\Framework\Profiler; use Magento\Quote\Model\Quote\Address\RateRequest; +use Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory; +use Mygento\SampleModule\Helper\Data; +use Mygento\Shipment\Model\AbstractCarrier; +use Mygento\Shipment\Model\Carrier as BaseCarrier; +use Psr\Log\LoggerInterface; -class Carrier extends \Mygento\Shipment\Model\AbstractCarrier +class Carrier extends AbstractCarrier { /** @var string */ protected $code = 'slowcourier'; - /** - * @param \Mygento\SampleModule\Model\Service $service - * @param \Mygento\SampleModule\Model\Carrier $carrier - * @param \Mygento\SampleModule\Helper\Data $helper - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory - * @param \Psr\Log\LoggerInterface $logger - * @param array $data - */ + private Service $service; + public function __construct( Service $service, - Carrier $carrier, - \Mygento\SampleModule\Helper\Data $helper, - Service $scopeConfig, - Service $rateErrorFactory, - Service $logger, + BaseCarrier $baseCarrier, + Data $helper, + ScopeConfigInterface $scopeConfig, + ErrorFactory $rateErrorFactory, + LoggerInterface $logger, + array $data = [], ) { $this->service = $service; + parent::__construct( + $baseCarrier, $helper, - $carrier, $scopeConfig, $rateErrorFactory, $logger, @@ -44,39 +46,29 @@ public function __construct( */ public function collectRates(RateRequest $request) { - \Magento\Framework\Profiler::start($this->code . '_collect_rate'); + Profiler::start($this->code . '_collect_rate'); - //Validation + // Validation $valid = $this->validateRequest($request); if ($valid !== true) { return $valid; } - $data = [ - 'city' => $this->convertCity($request), - 'weight' => $this->convertWeight($request), - 'order_sum' => round($this->getCartTotal(), 0), - 'postcode' => $this->getPostCode($request), - ]; + $calc = $this->baseCarrier->getCalculateRequest(); + $calc->setCity($this->convertCity($request)); + $calc->setIndex($request->getDestPostcode()); + $calc->setWeight($this->convertWeight($request)); + $calc->setOrderSum($request->getBaseSubtotalWithDiscountInclTax()); + $calc->setRawRequest($request); - $response = $this->service->calculateDeliveryCost($data); - $result = $this->carrier->getResult(); - foreach ($response as $delivery) { - $method = [ - 'code' => $this->code, - 'title' => $this->helper->getConfig('title'), - 'method' => $this->code, - 'name' => $this->code, - 'price' => $request->getFreeShipping() ? 0 : $delivery['cost'], - 'cost' => $request->getFreeShipping() ? 0 : $delivery['cost'], - 'estimate_dates' => [], - ]; + $methods = $this->service->calculateDeliveryCost($calc); - $rate = $this->createRateMethod($method); - $result->append($rate); + $result = $this->baseCarrier->getResult(); + foreach ($methods as $method) { + $result->append($this->createRateMethod($method)); } - \Magento\Framework\Profiler::stop($this->code . '_collect_rate'); + Profiler::stop($this->code . '_collect_rate'); return $result; } diff --git a/test/Expectations/Shipping/Model/Client.php b/test/Expectations/Shipping/Model/Client.php index c8a46ed..7cb770d 100644 --- a/test/Expectations/Shipping/Model/Client.php +++ b/test/Expectations/Shipping/Model/Client.php @@ -2,18 +2,18 @@ namespace Mygento\SampleModule\Model; -class Client extends \Mygento\Shipment\Model\AbstractClient +use Mygento\SampleModule\Helper\Data; +use Mygento\Shipment\Model\AbstractClient; +use Mygento\Shipment\Model\Client as BaseClient; + +class Client extends AbstractClient { - /** \Mygento\SampleModule\Helper\Data */ - private $helper; + public function __construct(Data $helper, BaseClient $baseClient) + { + parent::__construct($helper, $baseClient); + } - /** - * @param \Mygento\SampleModule\Helper\Data $helper - * @param \Mygento\Shipment\Model\Client $client - */ - public function __construct(\Mygento\SampleModule\Helper\Data $helper, \Mygento\Shipment\Model\Client $client) + public function sendApiRequest(string $method, $data, $scopeCode = null) { - $this->helper = $helper; - parent::__construct($client); } } diff --git a/test/Expectations/Shipping/Model/Service.php b/test/Expectations/Shipping/Model/Service.php index bf88f9b..ad7f4c0 100644 --- a/test/Expectations/Shipping/Model/Service.php +++ b/test/Expectations/Shipping/Model/Service.php @@ -2,42 +2,45 @@ namespace Mygento\SampleModule\Model; -class Service extends \Mygento\Shipment\Model\AbstractService +use Magento\Framework\Api\SearchCriteriaBuilder; +use Magento\Sales\Model\Order; +use Mygento\SampleModule\Helper\Data; +use Mygento\Shipment\Api\Data\CalculateRequestInterface; +use Mygento\Shipment\Model\AbstractService; +use Mygento\Shipment\Model\Service as BaseService; + +class Service extends AbstractService { - /** \Mygento\SampleModule\Model\Client */ - private $client; + private Client $client; - /** - * @param \Mygento\SampleModule\Model\Client $client - * @param \Mygento\Shipment\Model\Service $service - */ - public function __construct(Client $client, \Mygento\Shipment\Model\Service $service) - { + public function __construct( + Client $client, + Data $helper, + BaseService $baseService, + SearchCriteriaBuilder $searchBuilder, + ) { $this->client = $client; - parent::__construct($service); + + parent::__construct($baseService, $helper, $searchBuilder); } - /** - * @param array $params - * @return array - */ - public function calculateDeliveryCost(array $params): array + public function calculateDeliveryCost(CalculateRequestInterface $request): array { return []; } - /** - * @param \Magento\Sales\Model\Order $order - * @param array $data - */ - public function orderCreate(\Magento\Sales\Model\Order $order, array $data = []) + public function createOrder(Order $order, $data = []) { } /** * @param int|string $orderId */ - public function orderCancel($orderId) + public function cancelOrder($orderId) + { + } + + public function updateOrderStatus(Order $order) { } } diff --git a/test/Expectations/Shipping/Model/Source/Tax.php b/test/Expectations/Shipping/Model/Source/Tax.php new file mode 100644 index 0000000..54d127c --- /dev/null +++ b/test/Expectations/Shipping/Model/Source/Tax.php @@ -0,0 +1,18 @@ + 0, 'label' => __('VAT0')], + ['value' => 10, 'label' => __('VAT10')], + ['value' => 20, 'label' => __('VAT20')], + ['value' => null, 'label' => __('VAT Free')], + ]; + } +} diff --git a/test/Expectations/Shipping/etc/adminhtml/system.xml b/test/Expectations/Shipping/etc/adminhtml/system.xml index 87b65e4..41c831a 100644 --- a/test/Expectations/Shipping/etc/adminhtml/system.xml +++ b/test/Expectations/Shipping/etc/adminhtml/system.xml @@ -3,7 +3,7 @@
- + Magento\Config\Model\Config\Source\Yesno diff --git a/test/Shipping/ShippingTest.php b/test/Shipping/ShippingTest.php index ba19a9d..c6f1141 100644 --- a/test/Shipping/ShippingTest.php +++ b/test/Shipping/ShippingTest.php @@ -42,6 +42,7 @@ private function checkModels() $this->checkFile('Model/Client.php'); $this->checkFile('Model/Carrier.php'); $this->checkFile('Model/Service.php'); + $this->checkFile('Model/Source/Tax.php'); } private function checkFile($file)