Skip to content

Commit

Permalink
phpcs: Enable and fix Squiz.Operators.ValidLogicalOperators.NotAllowed
Browse files Browse the repository at this point in the history
Change-Id: Ic0e5909c76e0d58f33c4e29b227cad9eb35f3f25
  • Loading branch information
jdforrester committed Aug 1, 2023
1 parent 1294631 commit acc7b03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion .phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
<exclude name="PSR2.Classes.PropertyDeclaration.VarUsed" />
<exclude name="PSR2.Methods.MethodDeclaration.Underscore" />
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
<exclude name="Squiz.Operators.ValidLogicalOperators.NotAllowed" />
<exclude name="Squiz.Scope.MemberVarScope.Missing" />
<exclude name="Squiz.Scope.MethodScope.Missing" />
</rule>
Expand Down
8 changes: 4 additions & 4 deletions lessc.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ public function cachedCompile( $in, $force = false ) {

if ( is_string( $in ) ) {
$root = $in;
} elseif ( is_array( $in ) and isset( $in['root'] ) ) {
if ( $force or !isset( $in['files'] ) ) {
} elseif ( is_array( $in ) && isset( $in['root'] ) ) {
if ( $force || !isset( $in['files'] ) ) {
// If we are forcing a recompile or if for some reason the
// structure does not contain any file information we should
// specify the root to trigger a rebuild.
$root = $in['root'];
} elseif ( isset( $in['files'] ) and is_array( $in['files'] ) ) {
} elseif ( isset( $in['files'] ) && is_array( $in['files'] ) ) {
foreach ( $in['files'] as $fname => $ftime ) {
if ( !file_exists( $fname ) or filemtime( $fname ) > $ftime ) {
if ( !file_exists( $fname ) || filemtime( $fname ) > $ftime ) {
// One of the files we knew about previously has changed
// so we should look at our incoming root again.
$root = $in['root'];
Expand Down

0 comments on commit acc7b03

Please sign in to comment.