Code Duplication    Length = 14-14 lines in 2 locations

includes/widget/ComplexNamespaceInputWidget.php 2 locations

@@ 61-74 (lines=14) @@
58
		$this->config = $config;
59
60
		$this->namespace = new NamespaceInputWidget( $config['namespace'] );
61
		if ( $config['associated'] !== null ) {
62
			$this->associated = new \OOUI\CheckboxInputWidget( array_merge(
63
				[ 'value' => '1' ],
64
				$config['associated']
65
			) );
66
			// TODO Should use a LabelWidget? But they don't work like HTML <label>s yet
67
			$this->associatedLabel = new \OOUI\FieldLayout(
68
				$this->associated,
69
				array_merge(
70
					[ 'align' => 'inline' ],
71
					$config['associatedLabel']
72
				)
73
			);
74
		}
75
		if ( $config['invert'] !== null ) {
76
			$this->invert = new \OOUI\CheckboxInputWidget( array_merge(
77
				[ 'value' => '1' ],
@@ 75-88 (lines=14) @@
72
				)
73
			);
74
		}
75
		if ( $config['invert'] !== null ) {
76
			$this->invert = new \OOUI\CheckboxInputWidget( array_merge(
77
				[ 'value' => '1' ],
78
				$config['invert']
79
			) );
80
			// TODO Should use a LabelWidget? But they don't work like HTML <label>s yet
81
			$this->invertLabel = new \OOUI\FieldLayout(
82
				$this->invert,
83
				array_merge(
84
					[ 'align' => 'inline' ],
85
					$config['invertLabel']
86
				)
87
			);
88
		}
89
90
		// Initialization
91
		$this