Skip to content

Commit

Permalink
Quick test at fixing some PHPCS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chevli committed Jan 14, 2020
1 parent 6050604 commit 927ddfa
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 15 deletions.
3 changes: 0 additions & 3 deletions Component/CatalogPriceRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
use CtiDigital\Configurator\Api\LoggerInterface;
use Magento\CatalogRule\Api\Data\RuleInterfaceFactory;

/**
* Class CatalogPriceRules
*/
class CatalogPriceRules implements ComponentInterface
{
/**
Expand Down
3 changes: 0 additions & 3 deletions Component/CustomerGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,9 @@ private function createCustomerGroup($groupName, $taxClassId)
->setTaxClassId($taxClassId)
->save();


$this->log->logInfo(
sprintf('Customer Group "%s" created', $groupName)
);

return;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Component/Sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use CtiDigital\Configurator\Component\Processor\SqlSplitProcessor;

/**
* Class Sql
* Class Sql - Runs raw SQL queries - generally a fallback for when a configurator component is not available.
*/
class Sql implements ComponentInterface
{
Expand Down
2 changes: 1 addition & 1 deletion Component/Websites.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function execute($data = null)
$indexProcess->load('catalog_product_price');
$indexProcess->reindexAll();
}
} catch (ComponentException $e) {
} catch (\Exception $e) {
$this->log->logError($e->getMessage());
}
}
Expand Down
2 changes: 1 addition & 1 deletion Console/Command/RunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if ($output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL) {
$output->writeln('<comment>Finished Configurator</comment>');
}
} catch (ConfiguratorAdapterException $e) {
} catch (\Exception $e) {
$output->writeln('<error>' . $e->getMessage() . '</error>');
}
}
Expand Down
5 changes: 2 additions & 3 deletions Model/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
use Symfony\Component\Yaml\Yaml;

/**
* Class Processor
* @package CtiDigital\Configurator\Model
* Class Processor - The overarching class that reads and processes the configurator files.
*
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
*/
Expand Down Expand Up @@ -454,7 +453,7 @@ private function getData($source)
{
return ($this->isSourceRemote($source) === true) ?
$this->getRemoteData($source) :
file_get_contents(BP . '/' . $source);
file_get_contents(BP . '/' . $source); // phpcs:ignore Magento2.Functions.DiscouragedFunction
}

/**
Expand Down
5 changes: 2 additions & 3 deletions Test/Integration/ShippingTablesRatesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
use Magento\Framework\DB\Adapter\AdapterInterface;

/**
* Class ShippingTablesRatesTest
* @package CtiDigital\Configurator\Component
* Class ShippingTablesRatesTest - Test to run against Shipping Table Rates
* @SuppressWarnings(PHPMD.LongVariable)
*/
class ShippingTablesRatesTest extends \PHPUnit\Framework\TestCase
Expand All @@ -33,7 +32,7 @@ class ShippingTablesRatesTest extends \PHPUnit\Framework\TestCase
* From directory_country_region table
* @var array
*/
private $regionIdMap = array('BER' => 82);
private $regionIdMap = ['BER' => 82];

/**
* @var ShippingTableRates
Expand Down

0 comments on commit 927ddfa

Please sign in to comment.