Code Duplication    Length = 3-3 lines in 4 locations

classes/cli/Pods_CLI_Command.php 4 locations

@@ 92-94 (lines=3) @@
89
			WP_CLI::error( sprintf( __( 'Pod "%s" does not exist.', 'pods' ), $assoc_args['pod'] ) );
90
		}
91
92
		if ( null !== $item && $pod->exists() ) {
93
			WP_CLI::error( sprintf( __( 'Pod "%s" item "%s" does not exist.', 'pods' ), $assoc_args['pod'], $assoc_args['item'] ) );
94
		}
95
96
		if ( ! empty( $assoc_args ) ) {
97
			$id = 0;
@@ 140-142 (lines=3) @@
137
			WP_CLI::error( sprintf( __( 'Pod "%s" does not exist.', 'pods' ), $assoc_args['pod'] ) );
138
		}
139
140
		if ( $pod->exists() ) {
141
			WP_CLI::error( sprintf( __( 'Pod "%s" item "%s" does not exist.', 'pods' ), $assoc_args['pod'], $assoc_args['item'] ) );
142
		}
143
144
		$id = 0;
145
@@ 184-186 (lines=3) @@
181
			WP_CLI::error( sprintf( __( 'Pod "%s" does not exist.', 'pods' ), $assoc_args['pod'] ) );
182
		}
183
184
		if ( $pod->exists() ) {
185
			WP_CLI::error( sprintf( __( 'Pod "%s" item "%s" does not exist.', 'pods' ), $assoc_args['pod'], $assoc_args['item'] ) );
186
		}
187
188
		$deleted = false;
189
@@ 250-252 (lines=3) @@
247
			WP_CLI::error( sprintf( __( 'Pod "%s" does not exist.', 'pods' ), $assoc_args['pod'] ) );
248
		}
249
250
		if ( null !== $item && $pod->exists() ) {
251
			WP_CLI::error( sprintf( __( 'Pod "%s" item "%s" does not exist.', 'pods' ), $assoc_args['pod'], $assoc_args['item'] ) );
252
		}
253
254
		$params = array(
255
			'fields' => pods_v( 'fields', $assoc_args, null, true ),