Test Failed
Push — v5 ( faead4...ba4c33 )
by Andrew
44:12 queued 19:45
created

SitemapController::actionGenerate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 1
c 2
b 1
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * SEOmatic plugin for Craft CMS
4
 *
5
 * @link      https://nystudio107.com/
6
 * @copyright Copyright (c) 2017 nystudio107
7
 * @license   https://nystudio107.com/license
8
 */
9
10
namespace nystudio107\seomatic\console\controllers;
11
12
use yii\console\Controller;
13
14
/**
15
 * SEOmatic Sitemap command
16
 *
17
 * @deprecated This CLI command is no longer needed because of the paginated sitemap generation
18
 * @author    nystudio107
19
 * @package   Seomatic
20
 * @since     3.0.0
21
 */
22
class SitemapController extends Controller
23
{
24
    // Public Properties
25
    // =========================================================================
26
27
    /**
28
     * @var null|string The handle of the section to generate a sitemap for
29
     */
30
    public $handle;
31
32
    /**
33
     * @var null|int The siteId to generate a sitemap for
34
     */
35
    public $siteId;
36
37
    // Protected Properties
38
    // =========================================================================
39
40
    /**
41
     * @var    bool|array
42
     */
43
    protected array|bool|int $allowAnonymous = [
44
    ];
45
46
    // Public Methods
47
    // =========================================================================
48
49
    /**
50
     * @param string $actionID
51
     *
52
     * @return array|string[]
53
     */
54
    public function options($actionID): array
55
    {
56
        return [
57
            'handle',
58
            'siteId',
59
        ];
60
    }
61
62
    /**
63
     * Generate a sitemap. You can pass in a --handle and/or a --siteId
64
     */
65
    public function actionGenerate()
66
    {
67
        echo 'This CLI command is no longer needed because of the paginated sitemap generation' . PHP_EOL;
68
    }
69
70
    // Protected Methods
71
    // =========================================================================
72
}
73