Use triple-equals in a few more places

This commit is contained in:
2022-12-25 13:44:54 +01:00
parent 2174e1d08b
commit 49390c372d
8 changed files with 17 additions and 17 deletions

View File

@@ -39,7 +39,7 @@ class Tag
if (empty($row))
throw new NotFoundException();
return $return_format == 'object' ? new Tag($row) : $row;
return $return_format === 'object' ? new Tag($row) : $row;
}
public static function fromSlug($slug, $return_format = 'object')
@@ -58,7 +58,7 @@ class Tag
if (empty($row))
throw new NotFoundException();
return $return_format == 'object' ? new Tag($row) : $row;
return $return_format === 'object' ? new Tag($row) : $row;
}
public static function getAll($limit = 0, $return_format = 'array')
@@ -84,7 +84,7 @@ class Tag
});
}
if ($return_format == 'object')
if ($return_format === 'object')
{
$return = [];
foreach ($rows as $row)
@@ -110,7 +110,7 @@ class Tag
'limit' => $limit,
]);
if ($return_format == 'object')
if ($return_format === 'object')
{
$return = [];
foreach ($rows as $row)
@@ -136,7 +136,7 @@ class Tag
'limit' => $limit,
]);
if ($return_format == 'object')
if ($return_format === 'object')
{
$return = [];
foreach ($rows as $row)
@@ -166,7 +166,7 @@ class Tag
if (empty($rows))
return [];
if ($return_format == 'object')
if ($return_format === 'object')
{
$return = [];
foreach ($rows as $row)
@@ -196,7 +196,7 @@ class Tag
if (empty($rows))
return [];
if ($return_format == 'object')
if ($return_format === 'object')
{
$return = [];
foreach ($rows as $row)
@@ -244,7 +244,7 @@ class Tag
trigger_error('Could not create the requested tag.', E_USER_ERROR);
$data['id_tag'] = $db->insert_id();
return $return_format == 'object' ? new Tag($data) : $data;
return $return_format === 'object' ? new Tag($data) : $data;
}
public function getUrl()