Test Failed
Push — 6-0 ( cfb4d5 )
by Tomas Norre
03:23
created

tx_crawler_cli   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 16 1
1
<?php
2
3
/***************************************************************
4
 *  Copyright notice
5
 *
6
 *  (c) 2005 Kasper Skaarhoj ([email protected])
7
 *  All rights reserved
8
 *
9
 *  This script is part of the TYPO3 project. The TYPO3 project is
10
 *  free software; you can redistribute it and/or modify
11
 *  it under the terms of the GNU General Public License as published by
12
 *  the Free Software Foundation; either version 2 of the License, or
13
 *  (at your option) any later version.
14
 *
15
 *  The GNU General Public License can be found at
16
 *  http://www.gnu.org/copyleft/gpl.html.
17
 *
18
 *  This script is distributed in the hope that it will be useful,
19
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 *  GNU General Public License for more details.
22
 *
23
 *  This copyright notice MUST APPEAR in all copies of the script!
24
 ***************************************************************/
25
26
/**
27
 * Class tx_crawler_cli
28
 */
29
class tx_crawler_cli extends \TYPO3\CMS\Core\Controller\CommandLineController
0 ignored issues
show
Bug introduced by
The type TYPO3\CMS\Core\Controller\CommandLineController 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...
30
{
31
32
    /**
33
     * Constructor
34
     *
35
     * @return	void
36
     */
37
    public function __construct()
38
    {
39
        parent::__construct();
40
41
        $this->cli_options[] = ['-h', 'Show the help', ''];
0 ignored issues
show
Bug Best Practice introduced by
The property cli_options does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
42
        $this->cli_options[] = ['--help', 'Same as -h', ''];
43
        $this->cli_options[] = ['--countInARun count', 'Amount of pages', 'How many pages should be crawled during that run.'];
44
        $this->cli_options[] = ['--sleepTime milliseconds', 'Millisecounds to relax system during crawls', 'Amount of millisecounds which the system should use to relax between crawls.'];
45
        $this->cli_options[] = ['--sleepAfterFinish seconds', 'Secounds to relax system after all crawls.', 'Amount of secounds which the system should use to relax after all crawls are done.'];
46
47
        // Setting help texts:
48
        $this->cli_help['name'] = 'crawler CLI interface -- Crawling the URLs from the queue';
0 ignored issues
show
Bug Best Practice introduced by
The property cli_help does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
49
        $this->cli_help['synopsis'] = '###OPTIONS###';
50
        $this->cli_help['description'] = "";
51
        $this->cli_help['examples'] = "/.../cli_dispatch.phpsh crawler\nWill trigger the crawler which starts to process the queue entires\n";
52
        $this->cli_help['author'] = 'Kasper Skaarhoj, Daniel Poetzinger, Fabrizio Branca, Tolleiv Nietsch, Timo Schmidt - AOE media 2010';
53
    }
54
}
55
56
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/crawler/cli/class.tx_crawler_cli.php']) {
0 ignored issues
show
Bug introduced by
The constant TYPO3_MODE was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
57
    include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/crawler/cli/class.tx_crawler_cli.php']);
58
}
59