testAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of PHP Mess Detector.
4
 *
5
 * Copyright (c) Manuel Pichler <[email protected]>.
6
 * All rights reserved.
7
 *
8
 * Licensed under BSD License
9
 * For full copyright and license information, please see the LICENSE file.
10
 * Redistributions of files must retain the above copyright notice.
11
 *
12
 * @author Manuel Pichler <[email protected]>
13
 * @copyright Manuel Pichler. All rights reserved.
14
 * @license https://opensource.org/licenses/bsd-license.php BSD License
15
 * @link http://phpmd.org/
16
 */
17
18
class testRuleDoesNotApplyToFieldWithMethodsThatReturnArray
19
{
20
    /**
21
     * @var mixed
22
     */
23
    private $accountGateway;
24
25
    /**
26
     * @var mixed
27
     */
28
    private $transactionGateway;
29
30
    /**
31
     * @param $slug
32
     * @return string
33
     * @link https://github.com/phpmd/phpmd/issues/324
34
     */
35
    public function testAction($slug)
36
    {
37
        $accountId = $this->accountGateway
38
            ->findBySlug($slug)['id'];
39
40
        $this->transactionGateway
41
            ->addTransaction($accountId, 'foo', 1234, '2015-11-07');
42
43
        return 'Fine.';
44
    }
45
}
46