public function testSetDetailsAndGetDetails() { $this->assertSame([], $this->rfc->getDetails()); $details = ['version' => '0.1.0', 'author' => 'Some dude']; $this->rfc->setDetails($details); $this->assertSame($details, $this->rfc->getDetails()); }
/** * Returns array of changes in RFC 1 compared to RFC 2 * * @param Rfc $rfc1 * @param Rfc $rfc2 * @return array */ public function rfcDiff(Rfc $rfc1, Rfc $rfc2) { // Get any vote diffs between two RFCs $voteDiffs = $this->recursiveArrayDiff($rfc1->getVotes(), $rfc2->getVotes()); return ['details' => $this->recursiveArrayDiff($rfc1->getDetails(), $rfc2->getDetails()), 'changeLog' => $this->recursiveArrayDiff($rfc1->getChangeLog(), $rfc2->getChangeLog()), 'votes' => $this->parseVotesDiff($voteDiffs, $rfc2->getVotes())]; }
/** * Get the details in a flat format * * @param Rfc $rfc * @return array */ public function getDetailsAsTableRows(Rfc $rfc) { return $this->assocArrayToRows($rfc->getDetails()); }