Completed
Push — master ( 6ffc3f...4609e3 )
by Antonio
51:14 queued 46:44
created

Jpg::getByteStream()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 6
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the 2amigos/yii2-qrcode-component project.
5
 *
6
 * (c) 2amigOS! <http://2amigos.us/>
7
 *
8
 * For the full copyright and license information, please view
9
 * the LICENSE file that was distributed with this source code.
10
 */
11
12
namespace Da\QrCode\Renderer;
13
14
use BaconQrCode\Renderer\Image\Png;
15
16
class Jpg extends Png
17
{
18
    /**
19
     * getByteStream(): defined by RendererInterface.
20
     *
21
     * @see    ImageRendererInterface::getByteStream()
22
     * @return string
23
     */
24
    public function getByteStream()
25
    {
26
        ob_start();
27
        imagejpeg($this->image);
28
29
        return ob_get_clean();
30
    }
31
}
32