loadSampleData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 10
rs 10
c 1
b 0
f 0
1
<?php
2
/**
3
 *
4
 * You may not change or alter any portion of this comment or credits
5
 * of supporting developers from this source code or any supporting source code
6
 * which is considered copyrighted (c) material of the original comment or credit authors.
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
 * @copyright       XOOPS Project (https://xoops.org)
12
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
13
 * @package
14
 * @since           2.5.9
15
 * @author          Michael Beck (aka Mamba)
16
 */
17
18
require  dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
19
20
21
$op = \Xmf\Request::getCmd('op', '');
0 ignored issues
show
Bug introduced by
The type Xmf\Request 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...
22
23
switch ($op) {
24
    case 'load':
25
        loadSampleData();
26
        break;
27
}
28
29
// XMF TableLoad for SAMPLE data
30
31
function loadSampleData()
32
{
33
    //    $moduleDirName = basename(dirname(__DIR__));
34
    xoops_loadLanguage('comment');
0 ignored issues
show
Bug introduced by
The function xoops_loadLanguage was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

34
    /** @scrutinizer ignore-call */ 
35
    xoops_loadLanguage('comment');
Loading history...
35
    $items = \Xmf\Yaml::readWrapped('quotes_data.yml');
0 ignored issues
show
Bug introduced by
The type Xmf\Yaml 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...
36
37
    \Xmf\Database\TableLoad::truncateTable('randomquote_quotes');
0 ignored issues
show
Bug introduced by
The type Xmf\Database\TableLoad 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...
38
    \Xmf\Database\TableLoad::loadTableFromArray('randomquote_quotes', $items);
39
40
    redirect_header('../admin/index.php', 1, _CM_ACTIVE);
0 ignored issues
show
Bug introduced by
The function redirect_header was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

40
    /** @scrutinizer ignore-call */ 
41
    redirect_header('../admin/index.php', 1, _CM_ACTIVE);
Loading history...
Bug introduced by
The constant _CM_ACTIVE was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
41
}
42