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.
Completed
Push — master ( eb4109...fdccdc )
by Shcherbak
15:08
created

RelativeToAbsoluteLinkConverter::convert()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 2
1
<?php
2
3
  declare(strict_types=1);
4
5
  namespace Xparse\Parser\Helper;
6
7
  use Xparse\ElementFinder\ElementFinder;
8
  use Xparse\ElementFinder\ElementFinderInterface;
9
10
  /**
11
   * @author Ivan Shcherbak <[email protected]> 12/28/14
12
   */
13
  class RelativeToAbsoluteLinkConverter implements LinkConverterInterface {
14
15
    /**
16
     * @inheritdoc
17
     */
18
    public function convert(ElementFinder $finder, string $affectedUrl = ''): ElementFinderInterface {
19
      $modifier = new ConvertUrlElementFinderModifier(
20
        $affectedUrl,
21
        $finder->value('//base/@href')->first() ?? ''
22
      );
23
      return $finder->modify('//*[@src] | //*[@href] | //form[@action]', $modifier);
24
    }
25
26
  }