Mobile::appendAttributeToCollectionXML()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Thepixeldeveloper\Sitemap\Subelements;
4
5
use XMLWriter;
6
use Thepixeldeveloper\Sitemap\OutputInterface;
7
use Thepixeldeveloper\Sitemap\AppendAttributeInterface;
8
9
/**
10
 * Class Mobile
11
 *
12
 * @package Thepixeldeveloper\Sitemap\Subelements
13
 */
14
class Mobile implements OutputInterface, AppendAttributeInterface
15
{
16
    /**
17
     * {@inheritdoc}
18
     */
19
    public function appendAttributeToCollectionXML(XMLWriter $XMLWriter)
20
    {
21
        $XMLWriter->writeAttribute('xmlns:mobile', 'http://www.google.com/schemas/sitemap-mobile/1.0');
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function generateXML(XMLWriter $XMLWriter)
28
    {
29
        $XMLWriter->writeElement('mobile:mobile');
30
    }
31
}
32