| @@ -15,9 +15,8 @@ | ||
| 15 | 15 | use WP_Defender\Traits\Formats; |
| 16 | 16 | use Calotes\Component\Behavior; |
| 17 | 17 | use WP_Defender\Model\Scan_Item; |
| 18 | 18 | use WP_Defender\Traits\File_Operations; |
| 19 | -use WP_Defender\Component\Quarantine as Quarantine_Component; | |
| 20 | 19 | use WP_Filesystem_Base; |
| 21 | 20 | |
| 22 | 21 | /** |
| 23 | 22 | * Class Plugin_Integrity |
| @@ -37,15 +36,13 @@ | ||
| 37 | 36 | */ |
| 38 | 37 | public function to_array(): array { |
| 39 | 38 | $data = $this->owner->raw_data; |
| 40 | 39 | $file = $data['file']; |
| 41 | - list ( $file_created_at, $file_size, $deleted ) = $this->get_file_meta( $file ); | |
| 40 | + list( $file_created_at, $file_size, $deleted ) = $this->get_file_meta( $file ); | |
| 42 | 41 | |
| 43 | - $is_quarantinable = $this->is_quarantinable( $this->owner->raw_data['file'] ); | |
| 44 | - | |
| 45 | - $quarantine_data = class_exists( 'WP_Defender\Component\Quarantine' ) ? | |
| 46 | - wd_di()->get( Quarantine_Component::class )->scan_item_data( $this->owner ) : | |
| 47 | - array( 'is_quarantinable' => $is_quarantinable ); | |
| 42 | + if ( class_exists( 'WP_Defender\Component\Quarantine' ) ) { | |
| 43 | + $quarantine_data = wd_di()->get( \WP_Defender\Component\Quarantine::class )->scan_item_data( $this->owner ); | |
| 44 | + } | |
| 48 | 45 | |
| 49 | 46 | return array_merge( |
| 50 | 47 | array( |
| 51 | 48 | 'id' => $this->owner->id, |