Passed
Pull Request — master (#128)
by
unknown
02:06
created

Header::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
namespace NFePHP\MDFe\Factories;
4
5
/**
6
 * @author     Cleiton Perin <cperin20 at gmail dot com>
7
 * @package    NFePHP\MDFe\Factories
8
 * @copyright  Copyright (c) 2008-2019
9
 * @license    http://www.gnu.org/licenses/lesser.html LGPL v3
10
 * @category   NFePHP
11
 * @link       http://github.com/nfephp-org/nfephp for the canonical source repository
12
 */
13
class Header
14
{
15
    /**
16
     * Return header
17
     * @param string $namespace
18
     * @param string $cUF
19
     * @param string $version
20
     * @return string
21
     */
22 1
    public static function get($namespace, $cUF, $version)
23
    {
24
        return "<mdfeCabecMsg "
25 1
            . "xmlns=\"$namespace\">"
26 1
            . "<cUF>$cUF</cUF>"
27 1
            . "<versaoDados>$version</versaoDados>"
28 1
            . "</mdfeCabecMsg>";
29
    }
30
}
31