Coding standard issues

Created on 4 March 2024, 9 months ago
Updated 24 July 2024, 4 months ago

Problem/Motivation

Found Drupal coding standard issues on the theme using following command
vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions='php,module,inc,yml,install,test,profile,theme,info,txt,md,twig' ./

Issues are

FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/yg_photography.info.yml
---------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------
 17 | ERROR | [x] Expected 1 newline at end of file; 3 found
---------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/config/install/yg_photography.settings.yml
----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
 10 | ERROR | [x] Expected 1 newline at end of file; 5 found
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/css/font-awesome/HELP-US-OUT.txt
------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------
 1 | WARNING | Line exceeds 80 characters; contains 110 characters
 2 | WARNING | Line exceeds 80 characters; contains 123 characters
------------------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/yg_photography.theme
-----------------------------------------------------------------------------------------------------------
FOUND 111 ERRORS AND 7 WARNINGS AFFECTING 81 LINES
-----------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] The PHP open tag must be followed by exactly one blank line
   1 | ERROR   | [x] Missing file doc comment
   2 | WARNING | [x] Unused use statement
   3 | WARNING | [x] Unused use statement
   4 | WARNING | [x] Unused use statement
   4 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is
     |         |     Drupal\Component\Utility\SafeMarkup.
   5 | WARNING | [x] Unused use statement
   6 | WARNING | [x] Unused use statement
   7 | WARNING | [x] Unused use statement
  13 | ERROR   | [x] Expected 1 space before "="; 0 found
  13 | ERROR   | [x] Expected 1 space after "="; 0 found
  14 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
  14 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
  15 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 5
  17 | ERROR   | [x] Closing brace indented incorrectly; expected 5 spaces, found 4
  17 | ERROR   | [x] Whitespace found at end of line
  20 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 5
  21 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
  21 | ERROR   | [x] Closing brace indented incorrectly; expected 2 spaces, found 3
  22 | ERROR   | [x] Whitespace found at end of line
  29 | ERROR   | [x] Inline comments must start with a capital letter
  29 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or
     |         |     closing parentheses
  35 | ERROR   | [x] Whitespace found at end of line
  36 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or
     |         |     closing parentheses
  37 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
  38 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
  38 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
  38 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
  40 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 6
  40 | ERROR   | [x] Expected 1 space between comma and "'uri'"; 0 found
  40 | ERROR   | [x] Expected one space after the comma, 0 found
  41 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 6
  41 | ERROR   | [x] Expected one space after the comma, 0 found
  42 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 6
  43 | ERROR   | [x] Expected 1 space after FOREACH keyword; 0 found
  43 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
  44 | ERROR   | [x] Expected 1 space before "="; 0 found
  44 | ERROR   | [x] Expected 1 space after "="; 0 found
  46 | ERROR   | [x] Expected 1 space before "="; 0 found
  46 | ERROR   | [x] Expected 1 space after "="; 0 found
  47 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
  48 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
  48 | ERROR   | [x] Expected 1 space after ELSE keyword; 0 found
  49 | ERROR   | [x] Expected 1 space before "="; 0 found
  49 | ERROR   | [x] Expected 1 space after "="; 0 found
  49 | ERROR   | [x] Concat operator must be surrounded by a single space
  50 | ERROR   | [x] Expected 1 space before "="; 0 found
  50 | ERROR   | [x] Expected 1 space after "="; 0 found
  51 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
  52 | ERROR   | [x] Whitespace found at end of line
  53 | ERROR   | [x] Expected 1 blank line after function; 2 found
  60 | ERROR   | [x] There should be no white space after an opening "{"
  60 | ERROR   | [x] Comments may not appear after statements
  82 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
  82 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
  87 | ERROR   | [x] Expected 1 space after ELSE keyword; 0 found
  96 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced with use statements
  98 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or
     |         |     closing parentheses
  99 | ERROR   | [x] Short array syntax must be used to define arrays
 106 | ERROR   | [x] Short array syntax must be used to define arrays
 111 | WARNING | [x] A comma should follow the last multiline array item. Found: 'public://'
 113 | ERROR   | [x] Whitespace found at end of line
 114 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or
     |         |     closing parentheses
 115 | ERROR   | [x] Short array syntax must be used to define arrays
 122 | ERROR   | [x] Space found before square bracket; expected "$form[" but found "$form ["
 122 | ERROR   | [x] Short array syntax must be used to define arrays
 127 | ERROR   | [x] Whitespace found at end of line
 128 | ERROR   | [x] Whitespace found at end of line
 129 | ERROR   | [x] Space found before square bracket; expected "$form[" but found "$form ["
 129 | ERROR   | [x] Short array syntax must be used to define arrays
 136 | ERROR   | [x] Space found before square bracket; expected "$form[" but found "$form ["
 136 | ERROR   | [x] Short array syntax must be used to define arrays
 143 | ERROR   | [x] Space found before square bracket; expected "$form[" but found "$form ["
 143 | ERROR   | [x] Short array syntax must be used to define arrays
 150 | ERROR   | [x] Space found before square bracket; expected "$form[" but found "$form ["
 150 | ERROR   | [x] Short array syntax must be used to define arrays
 156 | ERROR   | [x] Whitespace found at end of line
 162 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced with use statements
 164 | ERROR   | [x] Expected 1 space before "=="; 0 found
 164 | ERROR   | [x] Expected 1 space after "=="; 0 found
 165 | ERROR   | [x] Whitespace found at end of line
 166 | ERROR   | [x] Expected 1 space before "="; 0 found
 166 | ERROR   | [x] Expected 1 space after "="; 0 found
 167 | ERROR   | [x] Expected 1 space before "="; 0 found
 167 | ERROR   | [x] Expected 1 space after "="; 0 found
 170 | ERROR   | [x] Expected 1 space before "=="; 0 found
 170 | ERROR   | [x] Expected 1 space after "=="; 0 found
 170 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
 171 | ERROR   | [x] Expected 1 space before "="; 0 found
 171 | ERROR   | [x] Expected 1 space after "="; 0 found
 172 | ERROR   | [x] Expected 1 space before "="; 0 found
 172 | ERROR   | [x] Expected 1 space after "="; 0 found
 184 | ERROR   | [x] Expected 1 space before "="; 0 found
 184 | ERROR   | [x] Expected 1 space after "="; 0 found
 185 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 185 | ERROR   | [x] Inline control structures are not allowed
 186 | ERROR   | [x] Expected 1 space before "=="; 0 found
 187 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 8
 189 | ERROR   | [x] Whitespace found at end of line
 190 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
 191 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
 192 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
 193 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
 194 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
 194 | ERROR   | [x] Short array syntax must be used to define arrays
 195 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 6
 196 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
 197 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
 198 | ERROR   | [x] Whitespace found at end of line
 199 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
 200 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 4
 201 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
 208 | ERROR   | [x] Short array syntax must be used to define arrays
 209 | ERROR   | [x] Short array syntax must be used to define arrays
 210 | ERROR   | [x] Array indentation error, expected 4 spaces but found 6
 211 | ERROR   | [x] Array indentation error, expected 4 spaces but found 6
 216 | ERROR   | [x] Expected 1 newline at end of file; 0 found
 216 | ERROR   | [x] A closing tag is not permitted at the end of a PHP file
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 118 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...-9-contrib/web/themes/yg_photography/templates/views/views-view-unformatted--portfolio_tags.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 6 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...-9-contrib/web/themes/yg_photography/templates/views/views-view-fields--client_testimonials.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 11 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...ntrib/web/themes/yg_photography/templates/views/views-view-unformatted--client_testimonials.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 7 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: .../html/D-9-contrib/web/themes/yg_photography/templates/views/views-view-unformatted--sliders.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 20 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...tml/D-9-contrib/web/themes/yg_photography/templates/views/views-view-fields--portfolio_tags.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...r/www/html/D-9-contrib/web/themes/yg_photography/templates/views/views-view-fields--sliders.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 13 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...www/html/D-9-contrib/web/themes/yg_photography/templates/views/views-view-fields--portfolio.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 20 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: .../www/html/D-9-contrib/web/themes/yg_photography/templates/block/instagram-without-api-image.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 30 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...www/html/D-9-contrib/web/themes/yg_photography/templates/block/block--system-branding-block.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 25 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: .../www/html/D-9-contrib/web/themes/yg_photography/templates/field--entity-reference-revisions.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 61 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/templates/paragraph/paragraph--about_me.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 25 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/templates/paragraph/paragraph--contact.html.twig
----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------
 91 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------


FILE: ...www/html/D-9-contrib/web/themes/yg_photography/templates/paragraph/paragraph--about_me_page.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 15 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/templates/paragraph/paragraph--banner.html.twig
---------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
 7 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------


FILE: ...w/html/D-9-contrib/web/themes/yg_photography/templates/paragraph/paragraph--contact_details.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 16 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...r/www/html/D-9-contrib/web/themes/yg_photography/templates/paragraph/paragraph--team_member.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 31 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/templates/paragraph/paragraph--about_us.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 25 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...var/www/html/D-9-contrib/web/themes/yg_photography/templates/paragraph/paragraph--portfolio.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 9 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/templates/paragraph/paragraph--our_team.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 10 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/templates/paragraph/paragraph--counter.html.twig
----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------
 14 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------


FILE: ...ml/D-9-contrib/web/themes/yg_photography/templates/paragraph/paragraph--client_testimonials.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 8 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/templates/paragraph/paragraph--counters.html.twig
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 9 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/templates/layout/page--403.html.twig
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
 141 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/templates/layout/page.html.twig
-----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
 66 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/templates/layout/page--404.html.twig
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
 144 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/templates/layout/page--401.html.twig
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
 81 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/templates/layout/html.html.twig
-----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
 51 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------


FILE: /var/www/html/D-9-contrib/web/themes/yg_photography/templates/user-login-form.html.twig
---------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------
 27 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

🇮🇳India govind_giri_goswami

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

  • Issue created by @govind_giri_goswami
  • Status changed to Needs review 9 months ago
  • 🇮🇳India govind_giri_goswami

    Resolved the above mentioned coding standard issues

    Please review
    Moving the issue to needs review.

  • Status changed to Needs work 4 months ago
  • 🇮🇳India riddhi.addweb

    I tried the patch but it is failing from my end. Please review it.

    <stdin>:20: trailing whitespace.
    I hope you love Font Awesome. If you've found it useful, 
    <stdin>:22: trailing whitespace.
    Fort Awesome (https://fortawesome.com). 
    <stdin>:23: trailing whitespace.
    It makes it easy to put the perfect icons on your website. 
    <stdin>:82: trailing whitespace.
    <!-- End footer Section -->  
    <stdin>:93: trailing whitespace.
    <!-- End footer Section -->  
    Checking patch config/install/yg_photography.settings.yml...
    error: while searching for:
    
    #banner Section For User pages and Not found pages
    banner_image: 'themes/yg_flexy/top-banner.jpg'
    
    
    
    
    
    error: patch failed: config/install/yg_photography.settings.yml:8
    error: config/install/yg_photography.settings.yml: patch does not apply
    Checking patch css/font-awesome/HELP-US-OUT.txt...
    Checking patch templates/block/block--system-branding-block.html.twig...
    Checking patch templates/block/instagram-without-api-image.html.twig...
    Checking patch templates/field--entity-reference-revisions.html.twig...
    Checking patch templates/layout/html.html.twig...
    Checking patch templates/layout/page--401.html.twig...
    Hunk #1 succeeded at 73 (offset -5 lines).
    Checking patch templates/layout/page--403.html.twig...
    Hunk #1 succeeded at 133 (offset -5 lines).
    Checking patch templates/layout/page--404.html.twig...
    Hunk #1 succeeded at 133 (offset -8 lines).
    Checking patch templates/layout/page.html.twig...
    Hunk #1 succeeded at 56 (offset -7 lines).
    Checking patch templates/paragraph/paragraph--about_me.html.twig...
    Checking patch templates/paragraph/paragraph--about_me_page.html.twig...
    Checking patch templates/paragraph/paragraph--about_us.html.twig...
    Checking patch templates/paragraph/paragraph--banner.html.twig...
    Checking patch templates/paragraph/paragraph--client_testimonials.html.twig...
    Checking patch templates/paragraph/paragraph--contact.html.twig...
    Checking patch templates/paragraph/paragraph--contact_details.html.twig...
    Checking patch templates/paragraph/paragraph--counter.html.twig...
    Checking patch templates/paragraph/paragraph--counters.html.twig...
    Checking patch templates/paragraph/paragraph--our_team.html.twig...
    Checking patch templates/paragraph/paragraph--portfolio.html.twig...
    Checking patch templates/paragraph/paragraph--team_member.html.twig...
    Checking patch templates/user-login-form.html.twig...
    Checking patch templates/views/views-view-fields--client_testimonials.html.twig...
    Checking patch templates/views/views-view-fields--portfolio.html.twig...
    Checking patch templates/views/views-view-fields--portfolio_tags.html.twig...
    Checking patch templates/views/views-view-fields--sliders.html.twig...
    Checking patch templates/views/views-view-unformatted--client_testimonials.html.twig...
    Checking patch templates/views/views-view-unformatted--portfolio_tags.html.twig...
    Checking patch templates/views/views-view-unformatted--sliders.html.twig...
    Checking patch yg_photography.info.yml...
    warning: yg_photography.info.yml has type 100644, expected 100755
    error: while searching for:
    
    libraries:
      - yg_photography/global-styling
    
    
    
    error: patch failed: yg_photography.info.yml:15
    error: yg_photography.info.yml: patch does not apply
    Checking patch yg_photography.theme...
    error: while searching for:
    <?php
    use Drupal\Component\Utility\Xss;
    use Drupal\Core\Template\Attribute;
    use Drupal\Component\Utility\SafeMarkup;
    use Drupal\Core\Database\Database;
    use Drupal\file\Plugin\Core\Entity\FileInterface;
    use Drupal\user\Entity\User;
    
    /**
     * Implements hook_preprocess_html().
     */
    function yg_photography_preprocess_html(&$variables) {
      $node=\Drupal::routeMatch()->getParameter('node');
      if($node){
         if ($node == "slider") {
          $variables['head_title']['title'] = "Page Not Found";
        }   
      }
      foreach ($variables['user']->getRoles() as $role) {
         $variables['attributes']['class'][] = 'role-' . $role;
       }
      
    }
    
    /**
     * Implements hook_preprocess_page().
     */
    function yg_photography_preprocess_page(&$variables) {
      // header Section variables
      $variables['twitter'] = theme_get_setting('twitter');
      $variables['facebook'] = theme_get_setting('facebook');
      $variables['instagram'] = theme_get_setting('instagram');
      $variables['pinterest'] = theme_get_setting('pinterest');
      $variables['vimeo'] = theme_get_setting('vimeo');
     
      // Bannner Image Settings
       $fid = theme_get_setting('banner_image');
       if(is_array($fid)){
        $query = \Drupal::database()->select('file_managed', 'm');
          $query->fields('m', ['filename','uri']);
          $query->condition('fid',$fid[0]);
          $results = $query->execute()->fetchAll();
        foreach($results as $data){
          $uri=$data->uri;
        }
        $variables['banner_image']=file_create_url($uri);
       }
       else{
        $path=base_path().$fid;
        $variables['banner_image']=$path;
       }
       
    }
    
    
    /**
     * Implements hook_preprocess_menu().
     */
    function yg_photography_preprocess_menu(&$variables, $hook) {
      if ($hook == 'menu__main') { // We're doing that for main menu.
        // Get the current path.
        $current_path = \Drupal::request()->getRequestUri();
        $items = $variables['items'];
    
    error: patch failed: yg_photography.theme:1
    error: yg_photography.theme: patch does not apply
Production build 0.71.5 2024