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
Pull Request — master (#217)
by Eric
65:19 queued 62:20
created

SizeRenderer   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 4 1
A getDimension() 0 4 2
1
<?php
2
3
/*
4
 * This file is part of the Ivory Google Map package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ivory\GoogleMap\Helper\Renderer\Image;
13
14
use Ivory\GoogleMap\Map;
15
16
/**
17
 * @author GeLo <[email protected]>
18
 */
19
class SizeRenderer
20
{
21
    /**
22
     * @param Map $map
23
     *
24
     * @return string
25
     */
26
    public function render(Map $map)
27
    {
28
        return $this->getDimension($map, 'width').'x'.$this->getDimension($map, 'height');
29
    }
30
31
    /**
32
     * @param Map    $map
33
     * @param string $side
34
     *
35
     * @return string
36
     */
37
    private function getDimension(Map $map, $side)
38
    {
39
        return $map->hasStaticOption($side) ? $map->getStaticOption($side) : '300';
40
    }
41
}
42