Completed
Push — master ( f906b5...0ffad1 )
by Kamil
17s
created

CreatePage   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A specifyExchangeRate() 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\Currency;
13
14
use Sylius\Behat\Behaviour\ChoosesName;
15
use Sylius\Behat\Page\Admin\Crud\CreatePage as BaseCreatePage;
16
17
/**
18
 * @author Anna Walasek <[email protected]>
19
 */
20
class CreatePage extends BaseCreatePage implements CreatePageInterface
21
{
22
    use ChoosesName;
23
24
    /**
25
     * @param float $exchangeRate
26
     */
27
    public function specifyExchangeRate($exchangeRate)
28
    {
29
        $this->getDocument()->fillField('Exchange rate', $exchangeRate);
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    protected function getDefinedElements()
36
    {
37
        return array_merge(parent::getDefinedElements(), [
38
            'code' => '#sylius_currency_code',
39
            'exchangeRate' => '#sylius_currency_exchangeRate',
40
        ]);
41
    }
42
}
43