Conditions | 4 |
Paths | 8 |
Total Lines | 37 |
Code Lines | 25 |
Lines | 37 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
14 | function b_waiting_xyp4all() |
||
15 | { |
||
16 | /** @var \XoopsMySQLDatabase $xoopsDB */ |
||
17 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
||
18 | $ret = []; |
||
19 | |||
20 | // xyp4all links |
||
21 | $block = []; |
||
22 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('xyp_links') . ' WHERE status=0'); |
||
|
|||
23 | if ($result) { |
||
24 | $block['adminlink'] = XOOPS_URL . '/modules/xyp4all/admin/index.php?op=listNewLinks'; |
||
25 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
26 | $block['lang_linkname'] = _PI_WAITING_LINKS; |
||
27 | } |
||
28 | $ret[] = $block; |
||
29 | |||
30 | // xyp4all broken |
||
31 | $block = []; |
||
32 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('xyp_broken')); |
||
33 | if ($result) { |
||
34 | $block['adminlink'] = XOOPS_URL . '/modules/xyp4all/admin/index.php?op=listBrokenLinks'; |
||
35 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
36 | $block['lang_linkname'] = _PI_WAITING_BROKENS; |
||
37 | } |
||
38 | $ret[] = $block; |
||
39 | |||
40 | // xyp4all modreq |
||
41 | $block = []; |
||
42 | $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('xyp_mod')); |
||
43 | if ($result) { |
||
44 | $block['adminlink'] = XOOPS_URL . '/modules/xyp4all/admin/index.php?op=listModReq'; |
||
45 | list($block['pendingnum']) = $xoopsDB->fetchRow($result); |
||
46 | $block['lang_linkname'] = _PI_WAITING_MODREQS; |
||
47 | } |
||
48 | $ret[] = $block; |
||
49 | |||
50 | return $ret; |
||
51 | } |
||
52 |
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.