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

Header   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 16
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 7 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