Passed
Push — master ( ac9a19...e11ae0 )
by Michael
13:36 queued 09:25
created

Userlog   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
c 0
b 0
f 0
dl 0
loc 25
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A item() 0 11 3
1
<?php declare(strict_types=1);
2
/*
3
 You may not change or alter any portion of this comment or credits
4
 of supporting developers from this source code or any supporting source code
5
 which is considered copyrighted (c) material of the original comment or credit authors.
6
7
 This program is distributed in the hope that it will be useful,
8
 but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
*/
11
12
/**
13
 *  userlog module
14
 *
15
 * @copyright       XOOPS Project (https://xoops.org)
16
 * @license         GNU GPL 2 (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
17
 * @since           4.31
18
 * @author          irmtfan ([email protected])
19
 * @author          XOOPS Project <www.xoops.org> <www.xoops.ir>
20
 */
21
// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
22
23
class Userlog extends \Userlog_Module_Plugin_Abstract implements \UserlogPluginInterface
0 ignored issues
show
Bug introduced by
The type UserlogPluginInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
Bug introduced by
The type Userlog_Module_Plugin_Abstract was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
24
{
25
    /**
26
     * @param string $subscribe_from Name of the script
27
     *
28
     * 'name' => 'thread';
29
     * 'title' => _MI_NEWBB_THREAD_NOTIFY;
30
     * 'description' => _MI_NEWBB_THREAD_NOTIFYDSC;
31
     * 'subscribe_from' => 'viewtopic.php';
32
     * 'item_name' => 'topic_id';
33
     * 'allow_bookmark' => 1;
34
     *
35
     * @return array|bool $item["item_name"] name of the item, $item["item_id"] id of the item
36
     */
37
    public function item(string $subscribe_from)
38
    {
39
        xoops_load('XoopsRequest');
40
        $poll_id = XoopsRequest::getInt('poll_id', 0);
41
        switch ($subscribe_from) {
42
            case 'index.php':
43
            case 'pollresults.php':
44
                return ['item_name' => 'poll_id', 'item_id' => $poll_id];
45
        }
46
47
        return false;
48
    }
49
}
50