Test Failed
Push — master ( c55034...101a53 )
by JAIME ELMER
03:40
created

LogoMgr   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 9
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getLogoString() 0 7 2
1
<?php
2
3
/**
4
 * MÓDULO DE EMISIÓN ELECTRÓNICA F72X
5
 * UBL 2.1
6
 * Version 1.0
7
 * 
8
 * Copyright 2019, Jaime Cruz
9
 */
10
11
namespace F72X\Tools;
12
13
use F72X\F72X;
14
use F72X\Company;
15
16
class LogoMgr {
17
18
    public static function getLogoString() {
19
        $customLogoPath = Company::getPdfTemplatesPath() . '/company-logo.png';
20
        if (file_exists($customLogoPath)) {
21
            return base64_encode(file_get_contents($customLogoPath));
22
        }
23
        $defaultLogoPath = F72X::getDefaultPdfTemplatesPath() . '/company-logo.png';
24
        return base64_encode(file_get_contents($defaultLogoPath));
25
    }
26
27
}
28