Skip to content

Commit 99165a8

Browse files
committed
Unnecessary boolean check
1 parent efe0160 commit 99165a8

6 files changed

+8
-6
lines changed

blocks/items_random_item.php

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
* @param $options
3333
*
3434
* @return array
35+
* @throws \Exception
36+
* @throws \Exception
3537
*/
3638
function publisher_items_random_item_show($options)
3739
{

class/BaseObjectHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public function insert(\XoopsObject $obj, $force = false)// insert($obj, $force
181181
$sql = $this->updateQuery($obj);
182182
}
183183
// Update DB
184-
if (false !== $force) {
184+
if ($force) {
185185
$result = $this->db->queryF($sql);
186186
} else {
187187
$result = $this->db->query($sql);
@@ -257,7 +257,7 @@ public function delete(\XoopsObject $obj, $force = false) //delete($obj, $force
257257
return false;
258258
}
259259
$sql = $this->deleteQuery($obj);
260-
if (false !== $force) {
260+
if ($force) {
261261
$result = $this->db->queryF($sql);
262262
} else {
263263
$result = $this->db->query($sql);

class/Common/ModuleFeedback.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static function getInstance()
6565
*/
6666
public function getFormFeedback($action = false)
6767
{
68-
if (false === $action) {
68+
if (!$action) {
6969
$action = $_SERVER['REQUEST_URI'];
7070
}
7171
$moduleDirName = \basename(\dirname(\dirname(__DIR__)));

class/Session.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Session
4242
*/
4343
protected function __construct()
4444
{
45-
if (false === @\session_start()) {
45+
if (!@\session_start()) {
4646
throw new \RuntimeException('Session could not start.');
4747
}
4848
}

class/ThemeTabForm.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function __construct($title, $name, $action, $method = 'post', $addtoken
117117
$this->action = $action;
118118
$this->method = $method;
119119
$this->summary = $summary;
120-
if (false !== $addtoken) {
120+
if ($addtoken) {
121121
$this->addElement(new \XoopsFormHiddenToken());
122122
}
123123
}

include/oninstall.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function xoops_module_pre_install_publisher(\XoopsModule $module)
3636
// check for minimum PHP version
3737
$phpSuccess = $utility::checkVerPhp($module);
3838

39-
if (false !== $xoopsSuccess && false !== $phpSuccess) {
39+
if ($xoopsSuccess && $phpSuccess) {
4040
$moduleTables = &$module->getInfo('tables');
4141
foreach ($moduleTables as $table) {
4242
$GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' . $GLOBALS['xoopsDB']->prefix($table) . ';');

0 commit comments

Comments
 (0)