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 ( b10e46...20af00 )
by Christian
263:11
created

AbstractSitemapService   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 2
dl 0
loc 47
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A configureSettings() 0 3 1
A generate() 0 4 1
A createEntry() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * (c) Christian Gripp <[email protected]>
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 Core23\SitemapBundle\Sitemap;
13
14
use Core23\SitemapBundle\Model\Url;
15
use Core23\SitemapBundle\Model\UrlInterface;
16
use Symfony\Component\OptionsResolver\OptionsResolver;
17
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
18
use Symfony\Component\Routing\RouterInterface;
19
20
abstract class AbstractSitemapService implements SitemapServiceInterface
21
{
22
    /**
23
     * @var RouterInterface
24
     */
25
    private $router;
26
27
    /**
28
     * @param RouterInterface $router
29
     */
30
    public function __construct(RouterInterface $router)
31
    {
32
        $this->router = $router;
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    public function configureSettings(OptionsResolver $resolver): void
39
    {
40
    }
41
42
    /**
43
     * @param string $name
44
     * @param array  $parameters
45
     * @param int    $absolute
46
     *
47
     * @return string
48
     */
49
    final protected function generate($name, array $parameters = [], $absolute = UrlGeneratorInterface::ABSOLUTE_URL): string
50
    {
51
        return $this->router->generate($name, $parameters, $absolute);
52
    }
53
54
    /**
55
     * @param string         $location
56
     * @param int|null       $priority
57
     * @param string|null    $changeFreq
58
     * @param \DateTime|null $lastMod
59
     *
60
     * @return UrlInterface
61
     */
62
    final protected function createEntry(string $location, ?int $priority, ?string $changeFreq = null, ?\DateTime $lastMod = null): UrlInterface
63
    {
64
        return new Url($location, $priority, $changeFreq, $lastMod);
65
    }
66
}
67