Completed
Push — master ( d21dd2...a23d9a )
by Beñat
8s
created

ExampleWidgetArea   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A widgetArea() 0 11 1
1
<?php
2
3
/*
4
 * This file is part of the WordPress Standard project.
5
 *
6
 * Copyright (c) 2015-2016 LIN3S <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace AppTheme\Widgets\Areas;
13
14
use LIN3S\WPFoundation\Configuration\Translations\Translations;
15
use LIN3S\WPFoundation\Widgets\Areas\WidgetArea;
16
17
/**
18
 * Very basic example of widget area class. Initializes
19
 * the widget area defined into widget area method.
20
 *
21
 * @author Gorka Laucirica <[email protected]>
22
 * @author Beñat Espiña <[email protected]>
23
 */
24
final class ExampleWidgetArea extends WidgetArea
25
{
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function widgetArea()
30
    {
31
        register_sidebar([
32
            'name'          => Translations::trans('Example widgets'),
33
            'id'            => 'example-widgets',
34
            'before_widget' => '<section class="">',
35
            'after_widget'  => '</section>',
36
            'before_title'  => '<h5>',
37
            'after_title'   => '</h5>',
38
        ]);
39
    }
40
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
41