Completed
Push — master ( ac1295...0765b1 )
by Seth
01:58
created

WordPressPest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
1
<?php
2
3
namespace smtech\StMarksSearch\WordPress;
4
5
use Battis\Educoder\PestJSON;
6
7
class WordPressPest extends PestJSON
8
{
9
    public function __construct($url)
10
    {
11
        if (!preg_match('%.*/wp-json/wp/v\d+$%', $url)) {
12
            $url = "$url/wp-json/wp/v2";
13
        }
14
        parent::__construct($url);
15
    }
16
}
17