Found some coding standard issues. I will post a patch below that should fix them.

CommentFileSizeAuthor
#6 interdiff-3117055-2-6.txt8.33 KBpingwin4eg
#6 coding_standards_iss-3117055-6.patch14.49 KBpingwin4eg
#2 3117055-2.patch15.83 KBAnonymous (not verified)

Comments

Anonymous’s picture

DenisCi created an issue. See original summary.

Anonymous’s picture

StatusFileSize
new15.83 KB

And here's a patch that should fix the issues.

Status: Needs review » Needs work

The last submitted patch, 2: 3117055-2.patch, failed testing. View results

pingwin4eg’s picture

Thanks for your work. Some notes:

  1. +++ b/src/Controller/DefaultController.php
    @@ -104,8 +114,8 @@ class DefaultController extends ControllerBase {
    -    if (isset($_COOKIE['styleswitcher'])) {
    -      $cookie = $_COOKIE['styleswitcher'];
    +    if (!empty($this->request->cookies->get('styleswitcher'))) {
    +      $cookie = $this->request->cookies->get('styleswitcher');
    

    I don't think using a $_COOKIE is a CS issue.

    Also changing isset to !empty changes the logic of if-else conditions.

  2. +++ b/src/Form/StyleswitcherConfigTheme.php
    @@ -47,6 +47,10 @@ class StyleswitcherConfigTheme extends FormBase {
        * {@inheritdoc}
        *
    +   * @param array $form
    +   *   Form.
    +   * @param Drupal\Core\Form\FormStateInterface $form_state
    +   *   Form state interface.
    

    There's an {@inheritdoc} tag already.

pingwin4eg’s picture

Assigned: Unassigned » pingwin4eg

I'm going to review this once again before an upcoming release.

pingwin4eg’s picture

Title: Coding standards issue » Fix coding standards
Assigned: pingwin4eg » Unassigned
Category: Bug report » Task
Status: Needs work » Needs review
StatusFileSize
new14.49 KB
new8.33 KB

Oh, it's definitely not a bug.

  • pingwin4eg committed 3481247 on 8.x-2.x
    Issue #3117055 by pingwin4eg, DenisCi: Fix coding standards
    
pingwin4eg’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.