Completed
Pull Request — master (#33)
by
unknown
01:38
created

Taxonomies   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
1
<?php
2
3
namespace App;
4
5
use LIN3S\WPFoundation\Configuration\Translations\Translations;
6
use LIN3S\WPFoundation\PostTypes\Taxonomy;
7
8
class Taxonomies
9
{
10
    const EXAMPLE_POST_CATEGORY = 'example_post_category';
11
12
    public function __construct()
13
    {
14
        new Taxonomy(self::EXAMPLE_POST_CATEGORY, PostTypes::EXAMPLE_POST_TYPE,  [
15
            'labels'       => [
16
                'name'          => Translations::trans('Categories'),
17
                'singular_name' => Translations::trans('Category'),
18
            ],
19
            'sort'         => true,
20
            'hierarchical' => true,
21
        ]);
22
    }
23
}
24