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

Alignement Array assignement #13324

Merged
merged 2 commits into from
Jan 24, 2018
Merged

Alignement Array assignement #13324

merged 2 commits into from
Jan 24, 2018

Conversation

Nolwennig
Copy link
Member

@Nolwennig Nolwennig commented Jan 23, 2018

For Your Eyes Only

Description

According to the formatting Array assignement for insertion website_id:1 in store_website table, the values for insertion website_id:0:

/**
 * Insert store groups
 */
$connection->insertForce(
    $installer->getTable('store_group'),
    ['group_id' => 0, 'website_id' => 0, 'name' => 'Default', 'root_category_id' => 0, 'default_store_id' => 0]
);
$connection->insertForce(
    $installer->getTable('store_group'),
    [
        'group_id' => 1,
        'website_id' => 1,
        'name' => 'Main Website Store',
        'root_category_id' => $this->getDefaultCategory()->getId(),
        'default_store_id' => 1
    ]
);

become

/**
 * Insert store groups
 */
$connection->insertForce(
    $installer->getTable('store_group'),
    [
        'group_id' => 0, 
        'website_id' => 0, 
        'name' => 'Default', 
        'root_category_id' => 0, 
        'default_store_id' => 0
    ]
);
$connection->insertForce(
    $installer->getTable('store_group'),
    [
        'group_id' => 1,
        'website_id' => 1,
        'name' => 'Main Website Store',
        'root_category_id' => $this->getDefaultCategory()->getId(),
        'default_store_id' => 1
    ]
);

Fixed Issues

Remove ugly code because ...
All Codes Are Beautiful

Manual testing scenarios

  1. Open file in text editor

  2. Just watch the lines from 268 to 290 and relax

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@orlangur orlangur self-assigned this Jan 23, 2018
Copy link
Contributor

@orlangur orlangur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much better now, thanks @Nolwennig 👍

@orlangur orlangur added this to the January 2018 milestone Jan 23, 2018
@magento-engcom-team
Copy link
Contributor

@Nolwennig thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants