| Conditions | 5 |
| Paths | 16 |
| Total Lines | 47 |
| Lines | 47 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | { |
||
| 9 | /** @var \XoopsMySQLDatabase $xoopsDB */ |
||
| 10 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
||
| 11 | $ret = []; |
||
| 12 | |||
| 13 | // smartfaq submitted |
||
| 14 | $block = []; |
||
| 15 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('smartfaq_faq') . ' WHERE status=4'); |
||
|
|
|||
| 16 | if ($result) { |
||
| 17 | $block['adminlink'] = XOOPS_URL . '/modules/smartfaq/admin/index.php?statussel=4'; |
||
| 18 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
| 19 | $block['lang_linkname'] = _PI_WAITING_SUBMITTED; |
||
| 20 | } |
||
| 21 | $ret[] = $block; |
||
| 22 | |||
| 23 | // smartfaq asked |
||
| 24 | $block = []; |
||
| 25 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('smartfaq_faq') . ' WHERE status=1'); |
||
| 26 | if ($result) { |
||
| 27 | $block['adminlink'] = XOOPS_URL . '/modules/smartfaq/admin/index.php?statussel=1'; |
||
| 28 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
| 29 | $block['lang_linkname'] = _PI_WAITING_ASKED; |
||
| 30 | } |
||
| 31 | $ret[] = $block; |
||
| 32 | |||
| 33 | // smartfaq new answer |
||
| 34 | $block = []; |
||
| 35 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('smartfaq_faq') . ' WHERE status=6'); |
||
| 36 | if ($result) { |
||
| 37 | $block['adminlink'] = XOOPS_URL . '/modules/smartfaq/admin/index.php?statussel=6'; |
||
| 38 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
| 39 | $block['lang_linkname'] = _PI_WAITING_NEWANSWERS; |
||
| 40 | } |
||
| 41 | $ret[] = $block; |
||
| 42 | |||
| 43 | // smartfaq answered |
||
| 44 | $block = []; |
||
| 45 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('smartfaq_faq') . ' WHERE status=3'); |
||
| 46 | if ($result) { |
||
| 47 | $block['adminlink'] = XOOPS_URL . '/modules/smartfaq/admin/index.php?statussel=3'; |
||
| 48 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
| 49 | $block['lang_linkname'] = _PI_WAITING_ANSWERED; |
||
| 50 | } |
||
| 51 | $ret[] = $block; |
||
| 52 | |||
| 53 | return $ret; |
||
| 54 | } |
||
| 55 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.