Skip to content

Commit 0dae0e8

Browse files
committed
refactor: use strict comparisons everywhere
1 parent 0692ba1 commit 0dae0e8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/UrlBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function targetWidths(
124124
$stop=self::MAX_WIDTH,
125125
$tol=self::SRCSET_WIDTH_TOLERANCE) {
126126

127-
if ($start == $stop) {
127+
if ($start === $stop) {
128128
return array((int) $start);
129129
}
130130

src/UrlHelper.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function getURL() {
6868
ksort($this->params);
6969

7070
foreach ($this->params as $key => $val) {
71-
if (substr($key, -2) == '64') {
71+
if (substr($key, -2) === '64') {
7272
$encodedVal = self::base64url_encode($val);
7373
} else {
7474
$encodedVal = is_array($val) ? rawurlencode(implode(',',$val)) : rawurlencode($val);

src/Validator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static function validateWidths($widths) {
4747
throw new \InvalidArgumentException("`widths` array cannot be `null`");
4848
}
4949

50-
if (count($widths) == 0) {
50+
if (count($widths) === 0) {
5151
throw new \InvalidArgumentException("`widths` array cannot be empty");
5252
}
5353
foreach ($widths as &$w) {

0 commit comments

Comments
 (0)