Page   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 4
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 2
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A find_one_by_post() 0 2 1
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\Repositories;
4
5
use App\Entities\Page as Entity;
6
use WPSteak\Repositories\AbstractPost;
7
8
class Page extends AbstractPost {
9
10 1
	public function find_one_by_post( \WP_Post $post ): ?Entity {
11 1
		return ( new Entity() )->set_post( $post );
12
	}
13
14
}
15