Completed
Push — symfony3-fqcn-sylius-3 ( 1d8d47...2ae323 )
by Kamil
38:58 queued 18:19
created

CreatePage   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A specifyDescription() 0 4 1
A getDefinedElements() 0 7 1
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sylius\Behat\Page\Admin\ShippingCategory;
13
14
use Sylius\Behat\Behaviour\NamesIt;
15
use Sylius\Behat\Behaviour\SpecifiesItsCode;
16
use Sylius\Behat\Page\Admin\Crud\CreatePage as BaseCreatePage;
17
18
/**
19
 * @author Anna Walasek <[email protected]>
20
 */
21
class CreatePage extends BaseCreatePage implements CreatePageInterface
22
{
23
    use NamesIt;
24
    use SpecifiesItsCode;
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function specifyDescription($description)
30
    {
31
        $this->getElement('description')->setValue($description);
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    protected function getDefinedElements()
38
    {
39
        return array_merge(parent::getDefinedElements(), [
40
            'code' => '#sylius_shipping_category_code',
41
            'description' => '#sylius_shipping_category_description',
42
        ]);
43
    }
44
}
45