GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 9c3470...c852c0 )
by
unknown
02:52
created

Page::setSubHeader()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the O2System PHP Framework package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @author         Steeve Andrian Salim
9
 * @copyright      Copyright (c) Steeve Andrian Salim
10
 */
11
// ------------------------------------------------------------------------
12
13
namespace O2System\Framework\Http\Presenter;
14
15
// ------------------------------------------------------------------------
16
17
use O2System\Kernel\Http\Message\Uri;
18
use O2System\Framework\Libraries\Ui\Components\Breadcrumb;
19
use O2System\Framework\Libraries\Ui\Contents\Link;
20
use O2System\Psr\Patterns\Structural\Repository\AbstractRepository;
21
22
/**
23
 * Class Page
24
 *
25
 * @package App\Datastructures
26
 */
27
class Page extends AbstractRepository
28
{
29
    /**
30
     * Page::__construct
31
     */
32
    public function __construct()
33
    {
34
        // Create Page breadcrumbs
35
        $breadcrumb = new Breadcrumb();
36
        $breadcrumb->createList( new Link( language()->getLine( 'HOME' ), base_url() ) );
37
        $this->store( 'breadcrumb', $breadcrumb );
38
39
        // Store Page Uri
40
        $uri = new Uri();
41
        $this->store( 'uri', $uri );
42
    }
43
44
    // ------------------------------------------------------------------------
45
46
    /**
47
     * Page::setHeader
48
     *
49
     * @param string $header
50
     *
51
     * @return static
52
     */
53
    public function setHeader( $header )
54
    {
55
        $header = trim( $header );
56
        $this->store( 'header', $header );
57
        presenter()->meta->offsetSet( 'subtitle', $header );
0 ignored issues
show
Bug Best Practice introduced by
The property meta does not exist on O2System\Framework\Http\Presenter. Since you implemented __get, consider adding a @property annotation.
Loading history...
Bug introduced by
The method offsetSet() does not exist on null. ( Ignorable by Annotation )

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

57
        presenter()->meta->/** @scrutinizer ignore-call */ 
58
                           offsetSet( 'subtitle', $header );

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
58
        presenter()->meta->title->append( $header );
59
60
        return $this;
61
    }
62
63
    // ------------------------------------------------------------------------
64
65
    /**
66
     * Page::setSubHeader
67
     *
68
     * @param string $subHeader
69
     *
70
     * @return static
71
     */
72
    public function setSubHeader( $subHeader )
73
    {
74
        $this->store( 'subHeader', trim( $subHeader ) );
75
76
        return $this;
77
    }
78
79
    // ------------------------------------------------------------------------
80
81
    /**
82
     * Page::setDescription
83
     *
84
     * @param string $description
85
     *
86
     * @return static
87
     */
88
    public function setDescription( $description )
89
    {
90
        $description = trim( $description );
91
        $this->store( 'description', $description );
92
93
        return $this;
94
    }
95
96
    // ------------------------------------------------------------------------
97
}