| Total Complexity | 9 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class PayslipProcessor implements CalculateContract |
||
| 9 | { |
||
| 10 | public $payslip; |
||
| 11 | |||
| 12 | public function __construct($identifier = null) |
||
| 13 | { |
||
| 14 | if (! is_null($identifier)) { |
||
| 15 | if (is_string($identifier) || is_int($identifier)) { |
||
| 16 | $this->payslip = Payslip::query() |
||
| 17 | ->with('earnings', 'deductions', 'payroll', 'employee', 'employee.salary') |
||
| 18 | ->whereId($identifier) |
||
| 19 | ->orWhere('hashslug', $identifier) |
||
| 20 | ->firstOrFail(); |
||
| 21 | } |
||
| 22 | |||
| 23 | if (is_object($identifier)) { |
||
| 24 | $this->payslip($identifier); |
||
| 25 | } |
||
| 26 | } |
||
| 27 | } |
||
| 28 | |||
| 29 | public static function make($identifier = null) |
||
| 32 | } |
||
| 33 | |||
| 34 | public function payslip(Payslip $payslip) |
||
| 39 | } |
||
| 40 | |||
| 41 | public function calculate() |
||
| 60 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths