Completed
Push — 1.x ( a98302...e42f79 )
by Alexander
07:32
created

FunctionDemo   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 23
rs 10
1
<?php
2
/*
3
 * Go! AOP framework
4
 *
5
 * @copyright Copyright 2014, Lisachenko Alexander <[email protected]>
6
 *
7
 * This source file is subject to the license that is bundled
8
 * with this source code in the file LICENSE.
9
 */
10
11
namespace Demo\Example;
12
13
/**
14
 * In this class we use system functions that will be intercepted by aspect
15
 */
16
class FunctionDemo
17
{
18
19
    /**
20
     * Some array transformer
21
     *
22
     * @param array $data Incoming array
23
     *
24
     * @return array|mixed Outcoming array
25
     */
26
    public function testArrayFunctions(array $data = [])
27
    {
28
        return array_flip(array_unique(array_values($data)));
29
    }
30
31
    /**
32
     * Outputs a file content
33
     */
34
    public function testFileContent()
35
    {
36
        echo '<pre>', htmlspecialchars(file_get_contents(__FILE__)), '</pre>';
37
    }
38
}
39