Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated bundle to use strict standard to ~2.1. #37

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ before_script:
- composer update --prefer-source
script:
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
- vendor/bin/phpcs -p --standard=$TRAVIS_BUILD_DIR/vendor/ongr/ongr-strict-standard/ONGR --ignore=vendor/,Tests/app/,Resources/public/ ./
- vendor/bin/phpcs -p --standard=$TRAVIS_BUILD_DIR/vendor/ongr/ongr-strict-standard/Ongr --ignore=vendor/,Tests/app/,Resources/public/ ./
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
Expand Down
13 changes: 8 additions & 5 deletions DependencyInjection/ONGROXIDConnectorExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ public function load(array $configs, ContainerBuilder $container)
*/
protected function loadModifiers($config, LoaderInterface $loader)
{
$toLoadModifiers = [
'product', 'category', 'content',
];
$toLoadModifiers = ['product', 'category', 'content'];

foreach ($toLoadModifiers as $modifier) {
if ($config['modifiers'] === [] || in_array($modifier, $config['modifiers'])) {
Expand All @@ -97,8 +95,13 @@ protected function loadModifiers($config, LoaderInterface $loader)
}

$toLoadRelations = [
'product', 'category', 'content',
'oxaccessoire2article', 'oxactions2article', 'oxobject2action', 'oxfield2shop',
'product',
'category',
'content',
'oxaccessoire2article',
'oxactions2article',
'oxobject2action',
'oxfield2shop',
];

foreach ($toLoadRelations as $relation) {
Expand Down
20 changes: 8 additions & 12 deletions Tests/Functional/Overall/DataSyncTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public function testDataSync()
);

// The part of "sync execute".

$esManager = $this->getServiceContainer()->get('es.manager');
$esManager->getConnection()->dropAndCreateIndex();

Expand Down Expand Up @@ -137,10 +136,9 @@ public function testDataSync()
'stock' => 2,
'vendor' => 'Vendor Title for PRODUCT TWO',
'manufacturer' => 'Naish',
'categories' =>
[
0 => 'fada9485f003c731b7fad08b873214e0',
],
'categories' => [
0 => 'fada9485f003c731b7fad08b873214e0',
],
],
],
'TestBundle:CategoryDocument' => [
Expand All @@ -152,14 +150,12 @@ public function testDataSync()
'left' => 4,
'right' => 5,
'root_id' => '30e44ab83fdee7564.23264141',
'attributes' =>
[
0 =>
[
'title' => 'testAttribute',
'pos' => 9999,
],
'attributes' => [
0 => [
'title' => 'testAttribute',
'pos' => 9999,
],
],
],
],
'TestBundle:ContentDocument' => [
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/Modifier/ProductModifierTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function testModifySkip()
/**
* @param Article $parent
*
* @return Article[] ;
* @return Article[]
*/
private function getVariants($parent)
{
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
},
"require-dev": {
"phpunit/phpunit": "~4.2",
"ongr/ongr-strict-standard": "~1.0.0-beta",
"squizlabs/php_codesniffer": "~1.5"
"ongr/ongr-strict-standard": "~2.1",
"squizlabs/php_codesniffer": "~2.0"
},
"autoload": {
"psr-4": {
Expand Down