Automated testing on GitLab CI: Fix 'phpcs' errors

Created on 15 March 2024, 8 months ago
Updated 14 May 2024, 6 months ago

Fix all errors reported by the PHPCS job on GitlabCI:
https://git.drupalcode.org/project/collapse_text/-/jobs/1446121

--------------------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 6 LINES
--------------------------------------------------------------------------------
  74 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
     |         |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
  81 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
     |         |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
 124 | ERROR   | [x] list(...) is forbidden, use [...] instead.
     |         |     (SlevomatCodingStandard.PHP.ShortList.LongListUsed)
 412 | ERROR   | [x] Array indentation error, expected 8 spaces but found 6
     |         |     (Drupal.Arrays.Array.ArrayIndentation)
 445 | ERROR   | [x] Array indentation error, expected 10 spaces but found 8
     |         |     (Drupal.Arrays.Array.ArrayIndentation)
 595 | WARNING | [x] '@todo -- rewrite to use str_replace' should match the
     |         |     format '@todo Fix problem X here.'
     |         |     (Drupal.Commenting.TodoComment.TodoFormat)
📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇳India chaitanyadessai Goa

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @chaitanyadessai
  • Merge request !4Fixed t() calls. → (Merged) created by chaitanyadessai
  • Issue was unassigned.
  • Status changed to Needs review 8 months ago
  • 🇮🇳India chaitanyadessai Goa

    Please review.

  • First commit to issue fork.
  • Status changed to Fixed 7 months ago
  • 🇫🇷France dydave

    Thanks a lot @chaitanyadessai for raising this issue and your great help fixing the remaining errors reported by the job PHPCS:
    https://git.drupalcode.org/project/collapse_text/-/jobs/1446121

    It's greatly appreciated !

    After rebasing the MR and running a build, the jobs all came back green, so I went ahead and merged the changes into 2.0.x.

    The basic jobs for quality control are now in place (linting, coding standards, etc..) and can be used straight away with all the pending merge requests.

    The module could certainly use some PHPUnit Tests as well.

    See current build pipelines passing all tests:
    https://git.drupalcode.org/project/collapse_text/-/pipelines

    We would greatly appreciate if you could please try testing the module and give us your feedback !

    Feel free to let us know if you have any questions or concerns on any of the merged changes or the project in general, we would be glad to help!
    Thanks again for your help and contributions !

  • 🇮🇳India chaitanyadessai Goa

    @DYdave installed and enabled collapse_text version ^2.0, configured for Basic & Full HTML Text editors. Created some dummy content seems to be working as expected. In the toolbar section of text editors collapsible button is missing.

  • 🇫🇷France dydave

    Thanks for your feedback @chaitanyadessai !

    Sorry, I'm not so clear :

    Created some dummy content seems to be working as expected. In the toolbar section of text editors collapsible button is missing.

    Screenshot from #7 :

    Is there anything wrong with the module right now?

    Did we break anything in any of the three latest commits?
    https://git.drupalcode.org/project/collapse_text/-/commits/2.0.x/?ref_ty...
    See: Apr 27, 2024

    Could you please be a bit more specific on which toolbar buttons could be missing?

    Screenshots are certainly greatly appreciated !
    Feel free to give us more feedback, we would be glad to look into fixing any issues that could have been introduced in the latest commits.
    Thanks again for your reactivity and help !

  • 🇮🇳India chaitanyadessai Goa

    @DYdave Functionality is working as expected. Please find screenshot for reference.

  • 🇫🇷France dydave

    Thanks a lot @chaitanyadessai, once again for your clear and prompt reply !

    It's great to hear everything is working as expected ! 🎉

    I made sure you would be credited on this issue and the corresponding commit 👌
    Which should pretty much wrap up all the work in this ticket.

    Once again, thanks a lot Chaitanya for your great feedback and reactivity, it's greatly appreciated !
    Cheers !

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

Production build 0.71.5 2024