Completed
Push — master ( 80fad8...df9faa )
by Paweł
42:14 queued 30:21
created

UpdatePage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 3
dl 0
loc 31
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A nameIt() 0 4 1
A getCodeElement() 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\ProductAssociationType;
13
14
use Sylius\Behat\Behaviour\ChecksCodeImmutability;
15
use Sylius\Behat\Page\Admin\Crud\UpdatePage as BaseUpdatePage;
16
17
/**
18
 * @author Grzegorz Sadowski <[email protected]>
19
 */
20
class UpdatePage extends BaseUpdatePage implements UpdatePageInterface
21
{
22
    use ChecksCodeImmutability;
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function nameIt($name)
28
    {
29
        $this->getElement('name')->setValue($name);
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    protected function getCodeElement()
36
    {
37
        return $this->getElement('code');
38
    }
39
40
    /**
41
     * {@inheritdoc}
42
     */
43
    protected function getDefinedElements()
44
    {
45
        return array_merge(parent::getDefinedElements(), [
46
            'code' => '#sylius_product_association_type_code',
47
            'name' => '#sylius_product_association_type_name',
48
        ]);
49
    }
50
}
51