scan_state_store; $transitions = new ScanTransitions(); $scan_links = new ScanLinks( $shared->query_runner, $shared->tables ); $checked_posts = new CheckedPosts( $shared->query_runner, $shared->posts_table ); $scan_starter = new ScanStarter( $state_store, $scan_links, $transitions, $shared->clock ); $this->scan_tick = new ScanTick( $state_store, new PostReader( $checked_posts, $shared->post_link_sync, $shared->settings_store, $state_store, $transitions ), new ScanFinisher( $scan_links, $state_store, $transitions, $shared->data_version, $shared->clock ) ); $this->full_scan_task = new FullScanTask( $state_store, $shared->settings_store, new QuietHours(), $scan_starter, $shared->clock ); $status_report = $this->status_report( $shared, new ScanProgress( $checked_posts, $scan_links, $shared->iso_time ) ); $this->feature = new ScanningFeature( $shared->rest_routes, $status_report, new ScanEndpoint( new ScanControl( $state_store, $scan_starter, $transitions ), $status_report ), new PostRefresher( $shared->post_link_sync ) ); } private function status_report( SharedServices $shared, ScanProgress $scan_progress ): StatusReport { return new StatusReport( $shared->scan_state_store, $shared->settings_store, $scan_progress, new LinkCounts( $shared->query_runner, $shared->tables ), new SchedulerHealth( $shared->scheduler_log, $shared->iso_time ), new DatabaseReport( $shared->database_health, $shared->query_runner, $shared->tables ), $shared->data_version, $shared->iso_time, $shared->clock ); } }