Completed
Push — development ( eb9524...db4517 )
by Andrij
28:49 queued 02:09
created

ProductCategories   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getGroupName() 0 3 1
A formUrl() 0 3 1
1
<?php
2
3
namespace xbanners\src\UrlFinder\Finders;
4
5
final class ProductCategories extends BaseFinder
6
{
0 ignored issues
show
introduced by
Opening brace of a class must be on the same line as the definition
Loading history...
7
8
    protected $table = 'shop_category';
9
10
    protected $translations = 'shop_category_i18n';
11
12
    protected $nameColumn = 'shop_category_i18n.name';
13
14
    protected $urlColumn = 'shop_category.url';
15
16
    protected $langColumn = 'shop_category_i18n.locale';
17
18
    /**
19
     * @return string
20
     */
21
    public function getGroupName() {
22
        return lang('Product Categories', 'xbanners');
23
    }
24
25
    /**
26
     * @param string $url
27
     * @return string
28
     */
29
    public function formUrl($url) {
30
        return '/shop/category/' . $url;
31
    }
32
33
}