Ejemplo n.º 1
0
 private function patchItem(Item $item, EntityDiff $patch)
 {
     $this->fingerprintPatcher->patchFingerprint($item->getFingerprint(), $patch);
     if ($patch instanceof ItemDiff) {
         $item->setSiteLinkList($this->siteLinkListPatcher->getPatchedSiteLinkList($item->getSiteLinkList(), $patch->getSiteLinkDiff()));
     }
     $item->setStatements($this->statementListPatcher->getPatchedStatementList($item->getStatements(), $patch->getClaimsDiff()));
 }
 private function assertListResultsFromPatch(StatementList $expected, StatementList $original, Diff $patch)
 {
     $patcher = new StatementListPatcher();
     $this->assertEquals($expected, $patcher->getPatchedStatementList($original, $patch));
 }
Ejemplo n.º 3
0
 private function patchProperty(Property $property, EntityDiff $patch)
 {
     $this->fingerprintPatcher->patchFingerprint($property->getFingerprint(), $patch);
     $property->setStatements($this->statementListPatcher->getPatchedStatementList($property->getStatements(), $patch->getClaimsDiff()));
 }