Completed
Push — master ( 007be0...4b2a2e )
by Ricardo
10s
created

DefaultRenderer::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 3
crap 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Ricardo Fiorani
5
 * Date: 30/08/2015
6
 * Time: 00:55.
7
 */
8
namespace RicardoFiorani\Renderer;
9
10
class DefaultRenderer implements EmbedRendererInterface
11
{
12
    /**
13
     * A friend once told me that html inside strings
14
     * isn't a good thing, but god knows I trying
15
     * to make it not dependant of some html element generator
16
     * and too lazy to make one of these on my own.
17
     *
18
     *
19
     *
20
     * @param string $embedUrl
21
     * @param int    $width
22
     * @param int    $height
23
     *
24
     * @return string
25
     */
26 2
    public function renderVideoEmbedCode($embedUrl, $width, $height)
27
    {
28 2
        return '<iframe width="'.$width.'" height="'.$height.'" src="'.addslashes($embedUrl).'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 180 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
29
    }
30
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
31