Skip to content

Commit

Permalink
php74: Fix a couple of remaining curly-bracket uses
Browse files Browse the repository at this point in the history
These escaped #65 and just noticed them today when executing
the bundled pear/PHP/scripts/phpcs binary (not reproducible
from web or tests).

Also fix an unrelated typo in CHANGES.md
  • Loading branch information
stronk7 committed May 23, 2020
1 parent 25bb98e commit 51388e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Changes in version 2.9.5 (20200401) - Poisson d'avril
-----------------------------------------------------
- CONTRIB-8024: Process all files as UTF-8 encoded (defined @ standard level).
- CONTRIB-6175: Only process PHP file (defined @ standard level).
- CONTRIB-6175: Only process PHP files (defined @ standard level).
- [PR#69](https://github.com/moodlehq/moodle-local_codechecker/pull/69): Upgrade PHPCompatibility to 9.3.5+ (9fb3244).
- CONTRIB-8031: Detect wrong uses of $PAGE and $OUTPUT in renderers and blocks (Tim Hunt).
- MDLSITE-6093: Don't require MOODLE_INTERNAL check for pure 1-artifact (class, interface, trait) files.
Expand Down
4 changes: 2 additions & 2 deletions pear/PHP/CodeSniffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2025,12 +2025,12 @@ public static function isCamelCaps(
$lastCharWasCaps = $classFormat;

for ($i = 1; $i < $length; $i++) {
$ascii = ord($string{$i});
$ascii = ord($string[$i]);
if ($ascii >= 48 && $ascii <= 57) {
// The character is a number, so it cant be a capital.
$isCaps = false;
} else {
if (strtoupper($string{$i}) === $string{$i}) {
if (strtoupper($string[$i]) === $string[$i]) {
$isCaps = true;
} else {
$isCaps = false;
Expand Down

0 comments on commit 51388e0

Please sign in to comment.