Author::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 9
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace Rarst\Hugo\wprss2hugo\Handler;
5
6
/**
7
 * Handle author entries and store as taxonomy terms.
8
 */
9
class Author extends Node
10
{
11
    /**
12
     * Handle `author` XML node.
13
     */
14
    public function handle(\SimpleXMLElement $node): void
15
    {
16
        $this->store->content("content/authors/{$node->author_login}/_index", [
17
            'title'     => (string)$node->author_display_name,
18
            'name'      => (string)$node->author_display_name,
19
            'firstName' => (string)$node->author_first_name,
20
            'lastName'  => (string)$node->author_last_name,
21
            'email'     => (string)$node->author_email,
22
            'slug'      => (string)$node->author_login,
23
        ]);
24
    }
25
}
26