Code Duplication    Length = 12-15 lines in 2 locations

src/ShortcodeUI.php 1 location

@@ 61-72 (lines=12) @@
58
	 *                                              need to be enqueued.
59
	 * @throws RuntimeException If the config could not be processed.
60
	 */
61
	public function __construct(
62
		$shortcode_tag,
63
		ConfigInterface $config,
64
		DependencyManager $dependencies = null
65
	) {
66
		Assert\that( $shortcode_tag )->string()->notEmpty();
67
68
		$this->processConfig( $config );
69
70
		$this->shortcode_tag = $shortcode_tag;
71
		$this->dependencies  = $dependencies;
72
	}
73
74
	/**
75
	 * Register the shortcode UI handler function with WordPress.

src/Shortcode.php 1 location

@@ 86-100 (lines=15) @@
83
	 *                                              the shortcode.
84
	 * @throws RuntimeException If the config could not be processed.
85
	 */
86
	public function __construct(
87
		$shortcode_tag,
88
		ConfigInterface $config,
89
		ShortcodeAttsParser $atts_parser,
90
		DependencyManager $dependencies = null
91
	) {
92
93
		Assert\that( $shortcode_tag )->string()->notEmpty();
94
95
		$this->processConfig( $config );
96
97
		$this->shortcode_tag = $shortcode_tag;
98
		$this->atts_parser   = $atts_parser;
99
		$this->dependencies  = $dependencies;
100
	}
101
102
	/**
103
	 * Register the shortcode handler function with WordPress.