/** * parse and prepare info from docks * * @throws \InvalidArgumentException * @throws \LogicException * @throws \Symfony\Component\Yaml\Exception\ParseException */ private function prepareDocumentation() { foreach (eVersion::getConstants() as $cons => $version) { $eVersion = eVersion::get($version); $documentation = $this->getDocumentation($eVersion); $this->processDocumentation($documentation); } $this->removeDuplicates(); }
/** * @param eSection $section * @param eVersion $targetVersion * @param array $versions * * @return array * @throws \Symfony\Component\Yaml\Exception\ParseException * @throws \LogicException * @throws \LTDBeget\sphinx\informer\exceptions\InformerRuntimeException * @throws \LTDBeget\sphinx\informer\exceptions\DocumentationSourceException * @throws \InvalidArgumentException */ private function getPermanentlyRemoved(eSection $section, eVersion $targetVersion, array $versions) : array { $target_version_options = $this->getVersionOptions($section, $targetVersion); $old_versions_options = []; foreach ($versions as $version) { /** @noinspection SlowArrayOperationsInLoopInspection */ $old_versions_options = array_merge($this->getVersionOptions($section, eVersion::get($version)), $old_versions_options); } $old_versions_options = array_unique($old_versions_options); $options_intersect = array_intersect($target_version_options, $old_versions_options); $values = array_flip(array_values(array_diff($old_versions_options, $options_intersect))); array_walk($values, function (&$value) { $value = true; }); return $values; }
public function testAllOptionInfo() { foreach (eVersion::getConstants() as $version) { $version = eVersion::get($version); $informer = Informer::get($version); foreach (eSection::getConstants() as $section) { $section = eSection::get($section); if ($informer->isSectionExist($section)) { foreach ($informer->iterateOptionInfo($section) as $optionInfo) { $optionInfo->getSection(); $optionInfo->getName(); $optionInfo->getDescription(); $optionInfo->getDocLink(); $optionInfo->getVersion(); $optionInfo->isIsMultiValue(); } } } } }