Taxonomy::get_taxonomy()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php declare(strict_types = 1);
0 ignored issues
show
introduced by
Expected 1 line before declare statement, found 0.
Loading history...
2
3
namespace App\Providers\ExampleCategory;
4
5
use App\Entities\Example as EntityExample;
6
use App\Entities\ExampleCategory as Entity;
7
use WPSteak\Providers\AbstractTaxonomy;
8
use WPSteak\Services\Labels;
9
10
class Taxonomy extends AbstractTaxonomy {
11
12
	use Labels\Taxonomy;
13
14
	/**
15
	 * {@inheritDoc}
16
	 */
17
	public function get_args(): array {
18
		return [
19
			'labels' => $this->get_labels(
20
				__( 'Categoria', 'app' ),
21
				__( 'Categorias', 'app' ),
0 ignored issues
show
introduced by
Trailing comma after the last parameter in function call is disallowed.
Loading history...
22
			),
23
			'public' => true,
24
			'show_in_rest' => true,
25
			'hierarchical' => true,
26
		];
27
	}
28
29
	public function get_taxonomy(): string {
30
		return Entity::TAXONOMY;
31
	}
32
33
	/**
34
	 * {@inheritDoc}
35
	 */
36
	public function get_object_type() {
37
		return EntityExample::POST_TYPE;
38
	}
39
40
}
41