| Conditions | 4 |
| Paths | 8 |
| Total Lines | 37 |
| Lines | 37 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | function b_waiting_mylinks() |
||
| 6 | { |
||
| 7 | /** @var \XoopsMySQLDatabase $xoopsDB */ |
||
| 8 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
||
| 9 | $ret = []; |
||
| 10 | |||
| 11 | // mylinks links |
||
| 12 | $block = []; |
||
| 13 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('mylinks_links') . ' WHERE status=0'); |
||
|
|
|||
| 14 | if ($result) { |
||
| 15 | $block['adminlink'] = XOOPS_URL . '/modules/mylinks/admin/index.php?op=listNewLinks'; |
||
| 16 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
| 17 | $block['lang_linkname'] = _PI_WAITING_WAITINGS; |
||
| 18 | } |
||
| 19 | $ret[] = $block; |
||
| 20 | |||
| 21 | // mylinks broken |
||
| 22 | $block = []; |
||
| 23 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('mylinks_broken')); |
||
| 24 | if ($result) { |
||
| 25 | $block['adminlink'] = XOOPS_URL . '/modules/mylinks/admin/index.php?op=listBrokenLinks'; |
||
| 26 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
| 27 | $block['lang_linkname'] = _PI_WAITING_BROKENS; |
||
| 28 | } |
||
| 29 | $ret[] = $block; |
||
| 30 | |||
| 31 | // mylinks modreq |
||
| 32 | $block = []; |
||
| 33 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('mylinks_mod')); |
||
| 34 | if ($result) { |
||
| 35 | $block['adminlink'] = XOOPS_URL . '/modules/mylinks/admin/index.php?op=listModReq'; |
||
| 36 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
| 37 | $block['lang_linkname'] = _PI_WAITING_MODREQS; |
||
| 38 | } |
||
| 39 | $ret[] = $block; |
||
| 40 | |||
| 41 | return $ret; |
||
| 42 | } |
||
| 43 |
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.