RawDrushContext::getOneTimeLoginLink()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 8
ccs 0
cts 6
cp 0
rs 9.4285
cc 1
eloc 5
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * @author Sergii Bondarenko, <[email protected]>
4
 */
5
namespace Drupal\TqExtension\Context\Drush;
6
7
// Contexts.
8
use Drupal\TqExtension\Context\RawTqContext;
9
10
class RawDrushContext extends RawTqContext
11
{
12
    /**
13
     * @param string $username
14
     *
15
     * @return string
16
     */
17
    public function getOneTimeLoginLink($username)
18
    {
19
        return trim($this->getDrushDriver()->drush('uli', [
20
            $username,
21
            '--browser=0',
22
            '--uri=' . $this->locatePath(),
23
        ]));
24
    }
25
}
26