Issues (446)

src/models/Settings.php (18 issues)

1
<?php
2
/**
3
 * Recipe plugin for Craft CMS 3.x
4
 *
5
 * A comprehensive recipe FieldType for Craft CMS that includes metric/imperial
6
 * conversion, portion calculation, and JSON-LD microdata support
7
 *
8
 * @link      https://nystudio107.com
0 ignored issues
show
The tag in position 1 should be the @copyright tag
Loading history...
9
 * @copyright Copyright (c) 2017 nystudio107
0 ignored issues
show
@copyright tag must contain a year and the name of the copyright holder
Loading history...
10
 */
0 ignored issues
show
PHP version not specified
Loading history...
Missing @category tag in file comment
Loading history...
Missing @package tag in file comment
Loading history...
Missing @author tag in file comment
Loading history...
Missing @license tag in file comment
Loading history...
11
12
namespace nystudio107\recipe\models;
13
14
use craft\base\Model;
15
16
/**
0 ignored issues
show
Missing short description in doc comment
Loading history...
17
 * @author    nystudio107
0 ignored issues
show
The tag in position 1 should be the @package tag
Loading history...
Content of the @author tag must be in the form "Display Name <[email protected]>"
Loading history...
Tag value for @author tag indented incorrectly; expected 2 spaces but found 4
Loading history...
18
 * @package   Recipe
0 ignored issues
show
Tag value for @package tag indented incorrectly; expected 1 spaces but found 3
Loading history...
19
 * @since     1.3.0
0 ignored issues
show
The tag in position 3 should be the @author tag
Loading history...
Tag value for @since tag indented incorrectly; expected 3 spaces but found 5
Loading history...
20
 */
0 ignored issues
show
Missing @link tag in class comment
Loading history...
Missing @license tag in class comment
Loading history...
Missing @category tag in class comment
Loading history...
21
class Settings extends Model
22
{
23
    /**
24
     * An application ID for the Edamam Nutrition Analysis API.
25
     * https://developer.edamam.com/edamam-nutrition-api
26
     *
27
     * @var ?string
28
     */
29
    public ?string $apiApplicationId = null;
30
31
    /**
32
     * An application key for the Edamam Nutrition Analysis API.
33
     * https://developer.edamam.com/edamam-nutrition-api
34
     *
35
     * @var ?string
36
     */
37
    public ?string $apiApplicationKey = null;
38
39
    /**
40
     * Returns whether the settings have API credentials.
41
     */
0 ignored issues
show
Missing @return tag in function comment
Loading history...
42
    public function hasApiCredentials(): bool
43
    {
44
        return ($this->apiApplicationId && $this->apiApplicationKey);
45
    }
46
}
47