Passed
Pull Request — master (#19)
by mahdi
03:07
created

Receipt   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 2
eloc 4
dl 0
loc 23
rs 10
c 2
b 0
f 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __set() 0 3 1
A __get() 0 3 1
1
<?php
2
3
namespace Shetabit\Payment;
4
5
use Shetabit\Payment\Abstracts\Receipt as ReceiptAbstract;
6
use Shetabit\Payment\Traits\HasDetail;
7
8
class Receipt extends ReceiptAbstract
9
{
10
    use HasDetail;
11
12
    /**
13
     * Add given value into details
14
     *
15
     * @param $name
16
     * @param $value
17
     */
18
    public function __set($name, $value)
19
    {
20
        $this->detail($name, $value);
21
    }
22
23
    /**
24
     * Retrieve given value from details
25
     *
26
     * @param $name
27
     */
28
    public function __get($name)
29
    {
30
        $this->getDetail($name);
31
    }
32
}
33