Code Duplication    Length = 13-13 lines in 3 locations

includes/abstracts/abstract-wc-stripe-connect-rest-controller.php 3 locations

@@ 41-53 (lines=13) @@
38
	 */
39
	public function register_routes() {
40
41
		if ( method_exists( $this, 'get' ) ) {
42
			register_rest_route(
43
				$this->namespace,
44
				'/' . $this->rest_base,
45
				array(
46
					array(
47
						'methods'             => 'GET',
48
						'callback'            => array( $this, 'get_internal' ),
49
						'permission_callback' => array( $this, 'check_permission' ),
50
					),
51
				)
52
			);
53
		}
54
55
		if ( method_exists( $this, 'post' ) ) {
56
			register_rest_route(
@@ 55-67 (lines=13) @@
52
			);
53
		}
54
55
		if ( method_exists( $this, 'post' ) ) {
56
			register_rest_route(
57
				$this->namespace,
58
				'/' . $this->rest_base,
59
				array(
60
					array(
61
						'methods'             => 'POST',
62
						'callback'            => array( $this, 'post_internal' ),
63
						'permission_callback' => array( $this, 'check_permission' ),
64
					),
65
				)
66
			);
67
		}
68
69
		if ( method_exists( $this, 'delete' ) ) {
70
			register_rest_route(
@@ 69-81 (lines=13) @@
66
			);
67
		}
68
69
		if ( method_exists( $this, 'delete' ) ) {
70
			register_rest_route(
71
				$this->namespace,
72
				'/' . $this->rest_base,
73
				array(
74
					array(
75
						'methods'             => 'DELETE',
76
						'callback'            => array( $this, 'delete_internal' ),
77
						'permission_callback' => array( $this, 'check_permission' ),
78
					),
79
				)
80
			);
81
		}
82
	}
83
84
	/**