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

TaxonomyMetabox::render()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 7
ccs 0
cts 6
cp 0
rs 10
c 1
b 0
f 0
cc 2
nc 2
nop 1
crap 6
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