Skip to content

Commit b085728

Browse files
committed
Girlscouting: Minor code simplifications
1 parent 43110bb commit b085728

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Ruleset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ private function expandRulesetReference($ref, $rulesetDir, $depth=0)
715715
if (Util\Common::isPharFile($path) === true && strpos($path, 'ruleset.xml') === false) {
716716
// If the ruleset exists inside the phar file, use it.
717717
if (file_exists($path.DIRECTORY_SEPARATOR.'ruleset.xml') === true) {
718-
$path = $path.DIRECTORY_SEPARATOR.'ruleset.xml';
718+
$path .= DIRECTORY_SEPARATOR.'ruleset.xml';
719719
} else {
720720
$path = null;
721721
}

src/Tokenizers/PHP.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -782,8 +782,8 @@ protected function tokenize($string)
782782
&& strtolower($tokens[($stackPtr + 2)][1]) === 'from'
783783
) {
784784
// Could be multi-line, so just the token stack.
785-
$token[0] = T_YIELD_FROM;
786-
$token[1] = $token[1].$tokens[($stackPtr + 1)][1].$tokens[($stackPtr + 2)][1];
785+
$token[0] = T_YIELD_FROM;
786+
$token[1] .= $tokens[($stackPtr + 1)][1].$tokens[($stackPtr + 2)][1];
787787

788788
if (PHP_CODESNIFFER_VERBOSITY > 1) {
789789
for ($i = ($stackPtr + 1); $i <= ($stackPtr + 2); $i++) {
@@ -816,8 +816,8 @@ protected function tokenize($string)
816816
&& strtolower($tokens[($stackPtr + 2)][1]) === 'from'
817817
) {
818818
// Could be multi-line, so just just the token stack.
819-
$token[0] = T_YIELD_FROM;
820-
$token[1] = $token[1].$tokens[($stackPtr + 1)][1].$tokens[($stackPtr + 2)][1];
819+
$token[0] = T_YIELD_FROM;
820+
$token[1] .= $tokens[($stackPtr + 1)][1].$tokens[($stackPtr + 2)][1];
821821

822822
if (PHP_CODESNIFFER_VERBOSITY > 1) {
823823
for ($i = ($stackPtr + 1); $i <= ($stackPtr + 2); $i++) {

0 commit comments

Comments
 (0)