Completed
Push — master ( 0f478c...b73fd3 )
by Kamil
14:27 queued 08:29
created

IndexPage::getUsedThemeName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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
declare(strict_types=1);
13
14
namespace Sylius\Behat\Page\Admin\Channel;
15
16
use Sylius\Behat\Page\Admin\Crud\IndexPage as BaseIndexPage;
17
18
class IndexPage extends BaseIndexPage implements IndexPageInterface
19
{
20
    public function getUsedThemeName(string $channelCode): ?string
21
    {
22
        $table = $this->getDocument()->find('css', 'table');
23
24
        $row = $this->getTableAccessor()->getRowWithFields($table, ['code' => $channelCode]);
25
26
        return trim($this->getTableAccessor()->getFieldFromRow($table, $row, 'themeName')->getText());
27
    }
28
}
29