Author   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 14
rs 10
wmc 1

1 Method

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