Code Duplication    Length = 9-9 lines in 3 locations

core/admin/EE_Admin_Page_CPT.core.php 3 locations

@@ 821-829 (lines=9) @@
818
     * @param int $post_id
819
     * @throws \EE_Error
820
     */
821
    public function before_trash_cpt_item($post_id)
822
    {
823
        $this->_set_model_object($post_id, true, 'trash');
824
        // if our cpt object isn't existent then get out immediately.
825
        if (! $this->_cpt_model_obj instanceof EE_CPT_Base || $this->_cpt_model_obj->ID() !== $post_id) {
826
            return;
827
        }
828
        $this->trash_cpt_item($post_id);
829
    }
830
831
832
    /**
@@ 839-847 (lines=9) @@
836
     * @param $post_id
837
     * @throws \EE_Error
838
     */
839
    public function before_restore_cpt_item($post_id)
840
    {
841
        $this->_set_model_object($post_id, true, 'restore');
842
        // if our cpt object isn't existent then get out immediately.
843
        if (! $this->_cpt_model_obj instanceof EE_CPT_Base || $this->_cpt_model_obj->ID() !== $post_id) {
844
            return;
845
        }
846
        $this->restore_cpt_item($post_id);
847
    }
848
849
850
    /**
@@ 857-865 (lines=9) @@
854
     * @param $post_id
855
     * @throws \EE_Error
856
     */
857
    public function before_delete_cpt_item($post_id)
858
    {
859
        $this->_set_model_object($post_id, true, 'delete');
860
        // if our cpt object isn't existent then get out immediately.
861
        if (! $this->_cpt_model_obj instanceof EE_CPT_Base || $this->_cpt_model_obj->ID() !== $post_id) {
862
            return;
863
        }
864
        $this->delete_cpt_item($post_id);
865
    }
866
867
868
    /**