Completed
Push — master ( 3182b0...115a8b )
by Arkadiusz
11s
created

CreatePage::getDefinedElements()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 7
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Lakion\SyliusCmsBundle\Tests\Behat\Page\Admin\StringBlock;
4
5
use Sylius\Behat\Page\Admin\Crud\CreatePage as BaseCreatePage;
6
7 View Code Duplication
class CreatePage extends BaseCreatePage implements CreatePageInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12
    public function setName($name)
13
    {
14
        $this->getSession()->getPage()->fillField('Name', $name);
15
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function setBody($body)
21
    {
22
        $this->getSession()->getPage()->fillField('Body', $body);
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    protected function getDefinedElements()
29
    {
30
        return array_merge(parent::getDefinedElements(), [
31
            'body' => '#lakion_sylius_cms_string_block_body',
32
            'name' => '#lakion_sylius_cms_string_block_name',
33
        ]);
34
    }
35
}
36