Test Setup Failed
Push — develop ( 67f164...d5fe8d )
by Elvis Henrique
03:02
created

PostType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 11
dl 0
loc 29
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get_args() 0 10 1
A get_post_type() 0 2 1
1
<?php
2
/**
3
 * Post Type.
4
 *
5
 * @package App
6
 */
7
8
declare(strict_types=1);
9
10
namespace App\Providers\Example;
11
12
use App\Entities\Example as Entity;
13
use WPSteak\Providers\AbstractPostType;
0 ignored issues
show
Bug introduced by
The type WPSteak\Providers\AbstractPostType was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
14
use WPSteak\Services\Labels;
0 ignored issues
show
Bug introduced by
The type WPSteak\Services\Labels was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
15
16
/**
17
 * Post Type class.
18
 */
19
class PostType extends AbstractPostType {
20
21
	use Labels\PostType;
0 ignored issues
show
Bug introduced by
The type WPSteak\Services\Labels\PostType was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
22
23
	/**
24
	 * Get args.
25
	 *
26
	 * @return array
27
	 */
28
	public function get_args() : array {
29
		return [
30
			'labels'       => $this->get_labels(
31
				__( 'Exemplo', 'app' ),
32
				__( 'Exemplos', 'app' )
33
			),
34
			'public'       => true,
35
			'show_in_rest' => true,
36
			'menu_icon'    => 'dashicons-smiley',
37
			'supports'     => [ 'title', 'custom-fields' ],
38
		];
39
	}
40
41
	/**
42
	 * Get post type.
43
	 *
44
	 * @return string
45
	 */
46
	public function get_post_type() : string {
47
		return Entity::POST_TYPE;
48
	}
49
}
50