Passed
Branch feature/6.x (4633a7)
by Schlaefer
03:28
created

UserPostingTraitClassMock   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 5
c 1
b 1
f 0
dl 0
loc 24
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A set() 0 8 2
A __construct() 0 2 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * Saito - The Threaded Web Forum
6
 *
7
 * @copyright Copyright (c) the Saito Project Developers
8
 * @link https://github.com/Schlaefer/Saito
9
 * @license http://opensource.org/licenses/MIT
10
 */
11
12
namespace App\Lib\Saito\Test\Posting;
13
14
use Saito\Posting\Posting;
15
16
class UserPostingTraitClassMock extends Posting
17
{
18
    /**
19
     * Constructor
20
     * @return void
21
     */
22
    public function __construct()
23
    {
24
    }
25
26
    /**
27
     * Set
28
     * @param string $key key
29
     * @param mixed|null $val value
30
     * @return void
31
     */
32
    public function set($key, $val = null)
33
    {
34
        if ($val === null) {
35
            $this->_rawData = $key;
36
37
            return;
38
        }
39
        $this->_rawData[$key] = $val;
40
    }
41
}
42