Fix the issues reported by phpcs

Created on 24 February 2023, over 1 year ago
Updated 21 March 2024, 3 months ago

GitLab CI shows the following PHP_CodeSniffer warnings/errors, which should be fixed.

FILE: ...44157/web/modules/custom/globallink-3344157/src/GlobalLinkTranslatorUi.php
--------------------------------------------------------------------------------
FOUND 75 ERRORS AND 2 WARNINGS AFFECTING 59 LINES
--------------------------------------------------------------------------------
   3 | ERROR   | [x] Namespaced classes, interfaces and traits should not begin
     |         |     with a file doc comment
     |         |     (Drupal.Commenting.FileComment.NamespaceNoFileDoc)
  14 | ERROR   | [x] Use statements should be sorted alphabetically. The first
     |         |     wrong one is Drupal\Core\Form\FormStateInterface.
     |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
 115 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: ) (Drupal.Arrays.Array.CommaLastItem)
 117 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 6
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 121 | ERROR   | [x] Array indentation error, expected 12 spaces but found 14
     |         |     (Drupal.Arrays.Array.ArrayIndentation)
 122 | ERROR   | [x] Array indentation error, expected 12 spaces but found 14
     |         |     (Drupal.Arrays.Array.ArrayIndentation)
 123 | ERROR   | [x] Array indentation error, expected 12 spaces but found 14
     |         |     (Drupal.Arrays.Array.ArrayIndentation)
 124 | ERROR   | [x] Array indentation error, expected 12 spaces but found 14
     |         |     (Drupal.Arrays.Array.ArrayIndentation)
 127 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: ) (Drupal.Arrays.Array.CommaLastItem)
 156 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 8
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 156 | ERROR   | [x] Short array syntax must be used to define arrays
     |         |     (Drupal.Arrays.DisallowLongArraySyntax.Found)
 157 | ERROR   | [x] No space found before comment text; expected "// Test
     |         |     duplicate project ids" but found "//Test duplicate project
     |         |     ids" (Drupal.Commenting.InlineComment.NoSpaceBefore)
 157 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks,
     |         |     question marks, colons, or closing parentheses
     |         |     (Drupal.Commenting.InlineComment.InvalidEndChar)
 160 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE"
     |         |     but found "false" (Generic.PHP.UpperCaseConstant.Found)
 161 | ERROR   | [x] Expected 1 space after FOR keyword; 0 found
     |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterKeyword)
 161 | ERROR   | [x] Expected 1 space before "="; 0 found
     |         |     (Squiz.WhiteSpace.OperatorSpacing.NoSpaceBefore)
 161 | ERROR   | [x] Expected 1 space after "="; 0 found
     |         |     (Squiz.WhiteSpace.OperatorSpacing.NoSpaceAfter)
 161 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
     |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis)
 162 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 163 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 164 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 164 | ERROR   | [x] Expected 1 space after FOREACH keyword; 0 found
     |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterKeyword)
 164 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
     |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis)
 165 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 14
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 166 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 167 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 168 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 168 | ERROR   | [x] Expected 1 space after FOR keyword; 0 found
     |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterKeyword)
 168 | ERROR   | [x] Expected 1 space before "="; 0 found
     |         |     (Squiz.WhiteSpace.OperatorSpacing.NoSpaceBefore)
 168 | ERROR   | [x] Expected 1 space after "="; 0 found
     |         |     (Squiz.WhiteSpace.OperatorSpacing.NoSpaceAfter)
 168 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
     |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis)
 169 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 14
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 170 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 14
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 170 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
     |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterKeyword)
 170 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
     |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis)
 171 | ERROR   | [x] Line indented incorrectly; expected 12 spaces, found 18
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 171 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE"
     |         |     but found "true" (Generic.PHP.UpperCaseConstant.Found)
 172 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 14
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 173 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 175 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
     |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterKeyword)
 175 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
     |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis)
 176 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 176 | ERROR   | [x] There should be no white space after an opening "("
     |         |     (Drupal.WhiteSpace.OpenBracketSpacing.OpeningWhitespace)
 178 | ERROR   | [x] Expected 1 space after ELSEIF keyword; 0 found
     |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterKeyword)
 178 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
     |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis)
 179 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 179 | ERROR   | [x] There should be no white space after an opening "("
     |         |     (Drupal.WhiteSpace.OpenBracketSpacing.OpeningWhitespace)
 182 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 183 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 184 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 185 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 186 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 187 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 14
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 188 | ERROR   | [x] Line indented incorrectly; expected 12 spaces, found 18
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 189 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 14
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 190 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 192 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 193 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 194 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 195 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 14
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 196 | ERROR   | [x] Line indented incorrectly; expected 12 spaces, found 18
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 197 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 14
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 198 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 200 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 201 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 14
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 202 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 14
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 203 | ERROR   | [x] Line indented incorrectly; expected 12 spaces, found 18
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 204 | ERROR   | [x] Line indented incorrectly; expected 14 spaces, found 22
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 205 | ERROR   | [x] Line indented incorrectly; expected 12 spaces, found 18
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 206 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 14
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 207 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 337 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
     |         |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
 380 | ERROR   | [x] Data types in @param tags need to be fully namespaced
     |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
 395 | ERROR   | [x] Data types in @param tags need to be fully namespaced
     |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
 403 | ERROR   | [x] Expected 1 blank line after function; 2 found
     |         |     (Squiz.WhiteSpace.FunctionSpacing.After)
 457 | ERROR   | [x] Expected 1 blank line after function; 0 found
     |         |     (Squiz.WhiteSpace.FunctionSpacing.AfterLast)
 458 | ERROR   | [x] The closing brace for the class must have an empty line
     |         |     before it
     |         |     (Drupal.Classes.ClassDeclaration.CloseBraceAfterBody)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 77 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...nk-3344157/web/modules/custom/globallink-3344157/src/GlExchangeAdapter.php
--------------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 10 LINES
--------------------------------------------------------------------------------
   3 | ERROR | [x] There must be one blank line after the namespace declaration
     |       |     (PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter)
  24 | ERROR | [ ] Missing short description in doc comment
     |       |     (Drupal.Commenting.DocComment.MissingShort)
  29 | ERROR | [ ] Missing short description in doc comment
     |       |     (Drupal.Commenting.DocComment.MissingShort)
  82 | ERROR | [ ] Public method name "GlExchangeAdapter::getPDConfig" is not
     |       |     in lowerCamel format
     |       |     (Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps)
 119 | ERROR | [x] Parameter comment must end with a full stop
     |       |     (Drupal.Commenting.FunctionComment.ParamCommentFullStop)
 147 | ERROR | [x] Parameter comment must end with a full stop
     |       |     (Drupal.Commenting.FunctionComment.ParamCommentFullStop)
 149 | ERROR | [ ] Description for the @return value is missing
     |       |     (Drupal.Commenting.FunctionComment.MissingReturnComment)
 162 | ERROR | [x] Expected 1 blank line after function; 0 found
     |       |     (Squiz.WhiteSpace.FunctionSpacing.After)
 163 | ERROR | [ ] Inline doc block comments are not allowed; use "/* Comment
     |       |     */" or "// Comment" instead
     |       |     (Drupal.Commenting.InlineComment.DocBlock)
 164 | ERROR | [x] Doc comment short description must end with a full stop
     |       |     (Drupal.Commenting.DocComment.ShortFullStop)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...om/globallink-3344157/src/Plugin/tmgmt/Translator/GlobalLinkTranslator.php
--------------------------------------------------------------------------------
FOUND 21 ERRORS AND 2 WARNINGS AFFECTING 18 LINES
--------------------------------------------------------------------------------
   6 | ERROR   | [x] Use statements should be sorted alphabetically. The first
     |         |     wrong one is Drupal\Core\Datetime\DrupalDateTime.
     |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
  11 | WARNING | [x] Unused use statement
     |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
  14 | WARNING | [x] Unused use statement
     |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
  22 | ERROR   | [x] There must be one blank line after the last USE statement;
     |         |     2 found;
     |         |     (PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse)
  41 | ERROR   | [x] Data types in @var tags need to be fully namespaced
     |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
  59 | ERROR   | [ ] Missing short description in doc comment
     |         |     (Drupal.Commenting.DocComment.MissingShort)
  64 | ERROR   | [ ] Missing short description in doc comment
     |         |     (Drupal.Commenting.DocComment.MissingShort)
 551 | ERROR   | [x] Data types in @param tags need to be fully namespaced
     |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
 552 | ERROR   | [x] Parameter comment must end with a full stop
     |         |     (Drupal.Commenting.FunctionComment.ParamCommentFullStop)
 595 | ERROR   | [x] Data types in @var tags need to be fully namespaced
     |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
 595 | ERROR   | [x] Data types in @var tags need to be fully namespaced
     |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
 597 | ERROR   | [x] Data types in @var tags need to be fully namespaced
     |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
 597 | ERROR   | [x] Data types in @var tags need to be fully namespaced
     |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
 702 | ERROR   | [x] Data types in @param tags need to be fully namespaced
     |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
 705 | ERROR   | [ ] @return doc comment specified, but function has no return
     |         |     statement
     |         |     (Drupal.Commenting.FunctionComment.InvalidNoReturn)
 745 | ERROR   | [ ] Description for the @return value is missing
     |         |     (Drupal.Commenting.FunctionComment.MissingReturnComment)
 809 | ERROR   | [x] Data types in @var tags need to be fully namespaced
     |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
 816 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
     |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterKeyword)
 816 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
     |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis)
 817 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 10
     |         |     (Drupal.WhiteSpace.ScopeIndent.IncorrectExact)
 857 | ERROR   | [x] Data types in @var tags need to be fully namespaced
     |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
 857 | ERROR   | [x] Data types in @var tags need to be fully namespaced
     |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
 857 | ERROR   | [x] Data types in @var tags need to be fully namespaced
     |         |     (Drupal.Commenting.DataTypeNamespace.DataTypeNamespace)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 19 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...stom/globallink-3344157/src/EventSubscriber/GloballinkContinuousEvents.php
--------------------------------------------------------------------------------
FOUND 6 ERRORS AND 1 WARNING AFFECTING 7 LINES
--------------------------------------------------------------------------------
   5 | WARNING | [x] Unused use statement
     |         |     (Drupal.Classes.UnusedUseStatement.UnusedUse)
   9 | ERROR   | [x] Use statements should be sorted alphabetically. The first
     |         |     wrong one is Drupal\tmgmt\Events\ContinuousEvents.
     |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
  17 | ERROR   | [ ] Missing short description in doc comment
     |         |     (Drupal.Commenting.DocComment.MissingShort)
  22 | ERROR   | [ ] Missing short description in doc comment
     |         |     (Drupal.Commenting.DocComment.MissingShort)
  81 | ERROR   | [x] Case breaking statements must be followed by a single
     |         |     blank line
     |         |     (Squiz.ControlStructures.SwitchDeclaration.SpacingAfterBreak)
 104 | ERROR   | [x] Expected 1 blank line after function; 0 found
     |         |     (Squiz.WhiteSpace.FunctionSpacing.AfterLast)
 105 | ERROR   | [x] The closing brace for the class must have an empty line
     |         |     before it
     |         |     (Drupal.Classes.ClassDeclaration.CloseBraceAfterBody)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...globallink-3344157/web/modules/custom/globallink-3344157/globallink.module
--------------------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 4 LINES
--------------------------------------------------------------------------------
  1 | ERROR   | [x] Missing file doc comment
    |         |     (Drupal.Commenting.FileComment.Missing)
  4 | ERROR   | [x] Use statements should be sorted alphabetically. The first
    |         |     wrong one is Drupal\tmgmt\Entity\Job.
    |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
 28 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
    |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterKeyword)
 28 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
    |         |     (Drupal.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis)
 58 | WARNING | [ ] Translatable strings must not begin or end with white
    |         |     spaces, use placeholders with t() for variables
    |         |     (Drupal.Semantics.FunctionT.WhiteSpace)
 58 | ERROR   | [ ] Concatenating translatable strings is not allowed, use
    |         |     placeholders instead and only one string literal
    |         |     (Drupal.Semantics.FunctionT.Concat)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...loballink-3344157/web/modules/custom/globallink-3344157/globallink.install
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
   |       |     (Drupal.WhiteSpace.OpenTagNewline.BlankLine)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 251ms; Memory: 8MB
📌 Task
Status

Needs review

Version

2.0

Component

Code

Created by

🇮🇳India samit.310@gmail.com

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

Merge Requests

Comments & Activities

  • Issue created by @samit.310@gmail.com
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India samit.310@gmail.com

    Above error/warnings need to be fixed.

    Only Following errors are remains.

    FILE: /var/www/html/modules/contrib/globallink/README.txt
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------
    17 | WARNING | Line exceeds 80 characters; contains 83 characters
    ----------------------------------------------------------------------

    For above we already have issue opened. Replace README.txt with README.md 📌 Replace README.txt with README.md RTBC

    FILE: /var/www/html/modules/contrib/globallink/src/GlExchangeAdapter.php
    ----------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------
    87 | ERROR | Public method name "GlExchangeAdapter::getPDConfig" is not in lowerCamel format
    ----------------------------------------------------------------------------------------------

    I am not sure to changes getPDConfig function to lowerCamel format, Maintainers can confirm here.

  • Issue was unassigned.
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Status changed to Needs work 4 months ago
  • 🇮🇳India Ashutosh Ahirwal India

    Hi, Patch provided in #2 is not getting apply throwing error
    Moving to need work
    Result after applying patch

    globallink % git apply -v 3344157-2.patch
    Checking patch config/schema/globallink.schema.yml...
    error: while searching for:
    label: Email notification levels
    pd_user_agent:
    type: select
    label: GlobalLink User Agent Level
    error: patch failed: config/schema/globallink.schema.yml:32
    error: config/schema/globallink.schema.yml: patch does not apply
    Checking patch globallink.install...
    Checking patch globallink.module...
    Checking patch src/EventSubscriber/GloballinkContinuousEvents.php...
    Checking patch src/GlExchangeAdapter.php...
    Checking patch src/GlobalLinkTranslatorUi.php...
    error: while searching for:

    $form['pd_url'] = [
    '#type' => 'url',
    '#title' => t('GlobalLink api url'),
    '#required' => TRUE,
    '#default_value' => $translator->getSetting('pd_url'),
    '#description' => t('Add the api url provided by translations.com'),
    ];
    $form['pd_username'] = [
    '#type' => 'textfield',
    '#title' => t('GlobalLink username'),
    '#required' => TRUE,
    '#default_value' => $translator->getSetting('pd_username'),
    '#description' => t('Add the username provided by translations.com'),
    ];
    $form['pd_password'] = [
    '#type' => 'password',
    '#title' => t('GlobalLink password'),
    '#required' => TRUE,
    '#default_value' => $translator->getSetting('pd_password'),
    '#description' => t('Add the password provided by translations.com'),
    ];
    $form['pd_projectid'] = [
    '#type' => 'textfield',
    '#title' => t('GlobalLink project id'),
    '#required' => TRUE,
    '#default_value' => $translator->getSetting('pd_projectid'),
    '#description' => t('Add the project id provided by translations.com'),
    ];
    $form['pd_submissionprefix'] = [
    '#type' => 'textfield',
    '#title' => t('GlobalLink submission prefix'),
    '#required' => TRUE,
    '#default_value' => $translator->getSetting('pd_submissionprefix'),
    '#description' => t('Choose a prefix'),
    ];
    $form['pd_classifier'] = [
    '#type' => 'textfield',
    '#title' => t('GlobalLink classifier'),
    '#required' => TRUE,
    '#default_value' => $translator->getSetting('pd_classifier'),
    '#description' => t('Add a classifier'),
    ];
    $form['pd_notify_emails'] = [
    '#type' => 'textfield',
    '#title' => t('Emails for notification'),
    '#default_value' => $translator->getSetting('pd_notify_emails'),
    '#description' => t('A space separated list of emails to notify. Leave blank for no notifications'),
    ];
    $form['pd_combine'] = [
    '#type' => 'checkbox',
    '#title' => t('Combine all items into a single document'),
    '#default_value' => $translator->getSetting('pd_combine'),
    '#description' => t('If checked, a single document will be sent for a translation job, otherwise a separate document within a single submission will be created for each job item.'),
    ];
    $form['pd_due_date_offset'] = [
    '#type' => 'textfield',
    '#title' => t('Default due date offset in working days'),
    '#default_value' => $translator->getSetting('pd_due_date_offset') ?: 3,
    '#description' => t('Controls the default due date, which then by default uses the configured amount of working days in the future.'),
    ];
    $form['pd_notify_level'] = [
    '#type' => 'checkboxes',
    '#title' => t('Email notification levels'),
    '#options' => [
    GlobalLinkTranslator::MSG_STATUS => t('Status'),
    GlobalLinkTranslator::MSG_DEBUG => t('Debug'),
    GlobalLinkTranslator::MSG_WARNING => t('Warning'),
    GlobalLinkTranslator::MSG_ERROR => t('Error'),
    ],
    '#default_value' => (array) $translator->getSetting('pd_notify_level'),
    '#description' => t('Select which tmgmt message types to send via email. Selecting all can result in a high volume of emails being sent.')
    ];
    $form['pd_user_agent'] = [
    '#type' => 'select',
    '#title' => t('Select Environment Type'),
    '#options' => [
    'dev' => $this->t('Development Environment'),
    'test' => $this->t('Test Environment'),
    'stage' => $this->t('Staging Environment'),
    'prod' => $this->t('Production Environment'),
    ],
    '#default_value' => (array) $translator->getSetting('pd_user_agent'),
    '#description' => t('Select which type of environment this is installed on. This will provide more information for Project Director.')
    ];

    return $form;
    }

    error: patch failed: src/GlobalLinkTranslatorUi.php:44
    error: src/GlobalLinkTranslatorUi.php: patch does not apply
    Checking patch src/Plugin/tmgmt/Translator/GlobalLinkTranslator.php...
    Hunk #8 succeeded at 572 (offset 5 lines).
    Hunk #9 succeeded at 616 (offset 5 lines).
    Hunk #10 succeeded at 686 (offset 5 lines).
    error: while searching for:
    $this->glExchangeAdapter->getGlExchange($pd_config);
    }
    catch (\Exception $e) {
    return AvailableResult::no(t('@translator is not available. Make sure it is properly configured.', [
    '@translator' => $translator->label(),
    ':configured' => $translator->url(),
    ]));

    error: patch failed: src/Plugin/tmgmt/Translator/GlobalLinkTranslator.php:681
    error: src/Plugin/tmgmt/Translator/GlobalLinkTranslator.php: patch does not apply

  • Assigned to PrabuEla
  • Issue was unassigned.
  • Pipeline finished with Success
    3 months ago
    Total: 143s
    #124883
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Pipeline finished with Success
    3 months ago
    Total: 143s
    #124931
  • Pipeline finished with Success
    3 months ago
    Total: 145s
    #124964
  • Pipeline finished with Success
    3 months ago
    Total: 139s
    #124973
  • Assigned to apaderno
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    I am assigning this issue to me, since I am working on it.

  • Pipeline finished with Success
    3 months ago
    Total: 138s
    #124991
  • Pipeline finished with Success
    3 months ago
    Total: 171s
    #125042
  • Pipeline finished with Success
    3 months ago
    Total: 139s
    #125091
  • Pipeline finished with Success
    3 months ago
    Total: 139s
    #125098
  • Issue was unassigned.
  • Status changed to Needs review 3 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The only shown warning cannot be fixed, since the description for the .install file needs to be Install, update and uninstall functions for the GlobalLink Connect for Drupal module.

Production build 0.69.0 2024