The use of the boolean values "TRUE" and "FALSE" is inconsitant in the core. There are several calls to "true" and "false" in several files. Need to make them in caps to keep the consistency throughout.

CommentFileSizeAuthor
#2 2609298-1.patch12.31 KBimalabya
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

malavya created an issue. See original summary.

imalabya’s picture

Status: Active » Needs work
FileSize
12.31 KB

Added patch

imalabya’s picture

Status: Needs work » Needs review
jhodgdon’s picture

Title: Inconsistent use of true and false in code statements. » Use of true and false in code statements instead of TRUE and FALSE
Component: documentation » other
Status: Needs review » Reviewed & tested by the community
Issue tags: +Coding standards

Thanks for the patch! Sorry for delay in review -- I've been on vacation.

In any case... This is not a documentation issue. But the patch looks fine to me, and our coding standards definitely say we should use TRUE and FALSE not true/false in PHP code.

I'm not sure whether we're leaving the poor terrible ArchiverTar code alone at this point or cleaning it up (it has a LOT of coding standards issues), but all the fixes in here look fine to me. Thanks!

jibran’s picture

Status: Reviewed & tested by the community » Needs work
  1. --- a/core/lib/Drupal/Core/Archiver/ArchiveTar.php
    +++ b/core/lib/Drupal/Core/Archiver/ArchiveTar.php
    

    Please revert all the changes in this file see for #2610984: Add Archive Tar via Composer, with BC shim more detail.

  2. +++ b/core/lib/Drupal/Core/Archiver/ArchiveTar.php
    --- a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
    +++ b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
    

    This is a vendor file which we forked so please revert all these changes as well.

  3. +++ b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
    --- a/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php
    +++ b/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php
    

    This is auto generated class so revert all the changes here as well.

catch’s picture

I think this is a duplicate of another issue, which I unfortunately can't find at the moment.

jhodgdon’s picture

Status: Needs work » Postponed
Parent issue: » #2571965: [meta] Fix PHP coding standards in core

Also for coding standards, aren't we requiring sniffer updates?

andriyun’s picture

Status: Postponed » Closed (duplicate)