Passed
Pull Request — master (#921)
by
unknown
08:01
created

Header::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 7
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\NFe\Factories;
4
5
/**
6
 * Class responsible for the assembly of SOAPHeader, will no longer exist
7
 * in version 4.0 of the SEFAZ layout.
8
 * This class is valid only until 11/2017 after that date becomes OBSOLETE
9
 * and if it is used it will cause communication failure.
10
 */
11
12
class Header
13
{
14
    /**
15
     * Return header
16
     * @param string $namespace
17
     * @param int $cUF
18
     * @param string $version
19
     * @return string
20
     */
21 5
    public static function get($namespace, $cUF, $version)
22
    {
23
        return "<nfeCabecMsg "
24 5
            . "xmlns=\"$namespace\">"
25 5
            . "<cUF>$cUF</cUF>"
26 5
            . "<versaoDados>$version</versaoDados>"
27 5
            . "</nfeCabecMsg>";
28
    }
29
}
30