GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

supportsDefinitionAndArgument()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 3
1
<?php
2
3
namespace Ciandt\Behat\PlaceholdersExtension\Transformer;
4
5
use Behat\Behat\Definition\Call\DefinitionCall;
6
use Behat\Behat\Transformation\Transformer\ArgumentTransformer;
7
use Ciandt\Behat\PlaceholdersExtension\Config\PlaceholdersRepository;
8
use Ciandt\Behat\PlaceholdersExtension\Subscriber\BeforeScenarioSubscriber;
9
use Ciandt\Behat\PlaceholdersExtension\Transformation\RuntimePlaceholdersTransformation;
10
11
/**
12
 * Transforms a single argument value.
13
14
 */
15
class PlaceholdersTransformer implements ArgumentTransformer
16
{
17
   
18
    private $repository;
19
    
20
    public function __construct(PlaceholdersRepository $repository) {
21
        $this->repository = $repository;
22
    }
23
24
    
25
    public function supportsDefinitionAndArgument(DefinitionCall $definitionCall, $argumentIndex, $argumentValue) {
26
        return RuntimePlaceholdersTransformation::supportsArgument($argumentValue);        
27
    }
28
29
    public function transformArgument(DefinitionCall $definitionCall, $argumentIndex, $argumentValue) {
30
        if (RuntimePlaceholdersTransformation::supportsArgument($argumentValue)){
31
            return RuntimePlaceholdersTransformation::transformArgument($argumentValue,$this->repository);
32
        }
33
        return $argumentValue;
34
    }
35
36
}
37