| Total Complexity | 4 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class PayrollProcessor implements CalculateContract |
||
| 8 | { |
||
| 9 | public $payroll; |
||
| 10 | |||
| 11 | public function __construct($identifier = null) |
||
| 12 | { |
||
| 13 | $this->payroll = config('open-payroll.models.payroll')::query() |
||
| 14 | ->with('payslips', 'payslips.earnings', 'payslips.deductions', 'payslips.employee', 'payslips.employee.salary') |
||
| 15 | ->findByHashSlugOrId($identifier); |
||
| 16 | } |
||
| 17 | |||
| 18 | public static function make($identifier = null) |
||
| 19 | { |
||
| 20 | return new self($identifier); |
||
| 21 | } |
||
| 22 | |||
| 23 | public function payroll($payroll) |
||
| 24 | { |
||
| 25 | $this->payroll = $payroll; |
||
| 26 | |||
| 27 | return $this; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function calculate() |
||
| 37 | } |
||
| 38 | } |
||
| 39 |