Code Duplication    Length = 9-11 lines in 2 locations

src/ConstraintRepository.php 2 locations

@@ 29-39 (lines=11) @@
26
	 *
27
	 * @return Constraint[]
28
	 */
29
	public function queryConstraintsForProperty( PropertyId $propertyId ) {
30
		$dbr = $this->lb->getConnection( ILoadBalancer::DB_REPLICA );
31
32
		$results = $dbr->select(
33
			'wbqc_constraints',
34
			'*',
35
			[ 'pid' => $propertyId->getNumericId() ]
36
		);
37
38
		return $this->convertToConstraints( $results );
39
	}
40
41
	private function encodeConstraintParameters( array $constraintParameters ) {
42
		$json = json_encode( $constraintParameters, JSON_FORCE_OBJECT );
@@ 81-89 (lines=9) @@
78
	 *
79
	 * @throws DBUnexpectedError
80
	 */
81
	public function deleteForProperty( PropertyId $propertyId ) {
82
		$dbw = $this->lb->getConnection( ILoadBalancer::DB_MASTER );
83
		$dbw->delete(
84
			'wbqc_constraints',
85
			[
86
				'pid' => $propertyId->getNumericId(),
87
			]
88
		);
89
	}
90
91
	/**
92
	 * @param IResultWrapper $results