Fix the issues reported by phpcs

Created on 6 March 2023, almost 2 years ago
Updated 20 April 2023, over 1 year ago

Problem/Motivation

FILE: /var/www/html/web/modules/custom/ief_popup/ief_popup.module
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 1 WARNING AFFECTING 6 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  43 | ERROR   | [ ] unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes option.
  94 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
  98 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
 119 | ERROR   | [ ] All functions defined in a module file must be prefixed with the module's name, found "_process_ief_form" but expected "ief_popup__process_ief_form"
 119 | ERROR   | [ ] Type hint "array" missing for $ief_form
 119 | ERROR   | [ ] Type hint "array" missing for $parameters
 215 | ERROR   | [x] Short array syntax must be used to define arrays
 229 | ERROR   | [ ] All functions defined in a module file must be prefixed with the module's name, found "_ief_form_after_build" but expected "ief_popup__ief_form_after_build"
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/ief_popup/ief_popup.libraries.yml
------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------
 12 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------

Steps to reproduce

Run the command phpcs --standard="DrupalPractice,Drupal" ief_popup

Proposed resolution

Resolve coding standard issue and create the patch.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇳India arunkumark Coimbatore

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024