Completed
Push — master ( 9bb285...104bd6 )
by Alexander
03:14
created

Page   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A filter() 0 15 1
1
<?php
2
3
namespace Api\Filter;
4
5
/**
6
 * Class Page.
7
 * Class is responsible to filter required data for Page entity.
8
 * 
9
 * @package Api\Formatter
10
 */
11
final class Page implements \Phalcon\Filter\UserFilterInterface
12
{
13
    public function filter($page)
14
    {
15
        /* @var \Page\Model\Page $page */
16
        return array(
17
            'title' => $page->getTitle(),
18
            'slug' => $page->getSlug(),
19
            'source' => $page->getSource(),
20
            'metaTitle' => $page->getMetaTitle(),
21
            'metaDescription' => $page->getMetaDescription(),
22
            'metaKeywords' => $page->getMetaKeywords(),
23
            'content' => $page->getText(),
24
            'createdAt' => $page->getCreatedAt(),
25
            'updatedAt' => $page->getUpdatedAt(),
26
        );
27
    }
28
}
29