Completed
Push — master ( 3d4ee7...df55da )
by Andreas
14:46
created

midgard_admin_asgard_handler::get_response()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2.032

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 7
ccs 4
cts 5
cp 0.8
crap 2.032
rs 10
1
<?php
2
/**
3
 * @package midgard.admin.asgard
4
 * @author CONTENT CONTROL http://www.contentcontrol-berlin.de/
5
 * @copyright CONTENT CONTROL http://www.contentcontrol-berlin.de/
6
 * @license http://www.gnu.org/licenses/gpl.html GNU General Public License
7
 */
8
9
/**
10
 * Style helper
11
 *
12
 * @package midgard.admin.asgard
13
 */
14
trait midgard_admin_asgard_handler
15
{
16
    /**
17
     * @return midcom_response_styled
18
     */
19 40
    public function get_response()
20
    {
21 40
        if (isset($_GET['ajax'])) {
22
            midcom::get()->skip_page_style = true;
23
        }
24 40
        $this->populate_breadcrumb_line();
0 ignored issues
show
Bug introduced by
It seems like populate_breadcrumb_line() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

24
        $this->/** @scrutinizer ignore-call */ 
25
               populate_breadcrumb_line();
Loading history...
25 40
        return new midcom_response_styled(midcom_core_context::get(), 'ASGARD_ROOT');
26
    }
27
}
28