Code Duplication    Length = 15-15 lines in 2 locations

lib/private/Repair/NC13/RepairInvalidPaths.php 2 locations

@@ 82-96 (lines=15) @@
79
		} while (count($rows) >= self::MAX_ROWS);
80
	}
81
82
	private function getId($storage, $path) {
83
		if (!$this->getIdQuery) {
84
			$builder = $this->connection->getQueryBuilder();
85
86
			$this->getIdQuery = $builder->select('fileid')
87
				->from('filecache')
88
				->where($builder->expr()->eq('storage', $builder->createParameter('storage')))
89
				->andWhere($builder->expr()->eq('path', $builder->createParameter('path')));
90
		}
91
92
		$this->getIdQuery->setParameter('storage', $storage, IQueryBuilder::PARAM_INT);
93
		$this->getIdQuery->setParameter('path', $path);
94
95
		return $this->getIdQuery->execute()->fetchColumn();
96
	}
97
98
	private function update($fileid, $newPath) {
99
		if (!$this->updateQuery) {
@@ 98-112 (lines=15) @@
95
		return $this->getIdQuery->execute()->fetchColumn();
96
	}
97
98
	private function update($fileid, $newPath) {
99
		if (!$this->updateQuery) {
100
			$builder = $this->connection->getQueryBuilder();
101
102
			$this->updateQuery = $builder->update('filecache')
103
				->set('path', $builder->createParameter('newpath'))
104
				->set('path_hash', $builder->func()->md5($builder->createParameter('newpath')))
105
				->where($builder->expr()->eq('fileid', $builder->createParameter('fileid')));
106
		}
107
108
		$this->updateQuery->setParameter('newpath', $newPath);
109
		$this->updateQuery->setParameter('fileid', $fileid, IQueryBuilder::PARAM_INT);
110
111
		$this->updateQuery->execute();
112
	}
113
114
	private function reparent($from, $to) {
115
		if (!$this->reparentQuery) {