| Total Complexity | 6 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class EventPassChart extends Component |
||
| 12 | { |
||
| 13 | public $event; |
||
| 14 | public $passes; |
||
| 15 | public $chart = 1; // 1 = Area | 2 = Bar |
||
| 16 | public $per = 1; // 1 = Day | 2 = Month |
||
| 17 | |||
| 18 | protected $listeners = ['initialize_event_pass_chart' => 'initializeEventPassChart']; |
||
| 19 | |||
| 20 | public function mount($event = null) |
||
| 24 | } |
||
| 25 | |||
| 26 | public function initializeEventPassChart() |
||
| 27 | { |
||
| 28 | $passes = $this->passes; |
||
| 29 | $total_pass_limit = ! is_null($this->event) ? $this->event->total_limit : (Cache::get('events', Event::orderBy('position')->get()))->reduce(function (int $total, $event) { |
||
| 30 | return $total + $event->total_limit; |
||
| 31 | }, 0); |
||
| 32 | $total_registered_pass = ! is_null($this->event) ? $this->event->passes->count() : Pass::count(); |
||
| 33 | $total_remaining_pass = $total_pass_limit - $total_registered_pass; |
||
| 34 | $this->dispatchBrowserEvent('initializeEventPassChart', [ |
||
| 35 | 'passRegisterPerDay' => (new Statistic)->passRegisterPerDay($passes), |
||
| 36 | 'total_pass' => $total_pass_limit, |
||
| 37 | 'total_registered_pass' => $total_registered_pass, |
||
| 38 | 'total_remaining_pass' => $total_remaining_pass, |
||
| 39 | ]); |
||
| 40 | } |
||
| 41 | |||
| 42 | public function render() |
||
| 45 | } |
||
| 46 | } |
||
| 47 |
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