Code Duplication    Length = 12-12 lines in 2 locations

app/components/Forms/BlockForm.php 1 location

@@ 189-200 (lines=12) @@
186
	/**
187
	 * @return array
188
	 */
189
	protected function buildCategorySelect(): array
190
	{
191
		$categories = $this->getCategoryRepository()->findAll();
192
193
		$selectContent = [];
194
195
		foreach($categories as $category) {
196
			$selectContent[$category->id] = $category->name;
197
		}
198
199
		return $selectContent;
200
	}
201
202
    /**
203
     * @param  BlockEntity $defaults

app/components/Forms/ProgramForm.php 1 location

@@ 170-181 (lines=12) @@
167
	/**
168
	 * @return array
169
	 */
170
	protected function buildCategorySelect(): array
171
	{
172
		$categories = $this->getCategoryRepository()->findAll();
173
174
		$selectContent = [];
175
176
		foreach($categories as $category) {
177
			$selectContent[$category->id] = $category->name;
178
		}
179
180
		return $selectContent;
181
	}
182
183
	/**
184
	 * @return BlockRepository