Passed
Push — master ( f510e9...9822a2 )
by Paul
10:29
created

TaxonomyMetabox   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 6
dl 0
loc 20
ccs 0
cts 8
cp 0
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 2 1
A render() 0 7 2
1
<?php
2
3
namespace GeminiLabs\SiteReviews\Metaboxes;
4
5
use GeminiLabs\SiteReviews\Contracts\MetaboxContract;
6
use GeminiLabs\SiteReviews\Review;
7
8
class TaxonomyMetabox implements MetaboxContract
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function register($post)
14
    {
15
        // This is done with register_taxonomy
16
    }
17
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function render($post)
22
    {
23
        if (Review::isReview($post)) {
24
            glsr()->render('partials/editor/metabox-categories', [
25
                'post' => $post,
26
                'tax_name' => glsr()->taxonomy,
27
                'taxonomy' => get_taxonomy(glsr()->taxonomy),
28
            ]);
29
        }
30
    }
31
}
32