X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fdrupalmoduleupgrader%2Fsrc%2FReport.php;fp=web%2Fmodules%2Fcontrib%2Fdrupalmoduleupgrader%2Fsrc%2FReport.php;h=995a1f48bdb20afffe170179d70c54439484292b;hp=0000000000000000000000000000000000000000;hb=8acec36f19c470dfcda1ae2336826a782f41874c;hpb=e0411c4e83ba0d079034db83c3f7f55be24a0e35 diff --git a/web/modules/contrib/drupalmoduleupgrader/src/Report.php b/web/modules/contrib/drupalmoduleupgrader/src/Report.php new file mode 100644 index 000000000..995a1f48b --- /dev/null +++ b/web/modules/contrib/drupalmoduleupgrader/src/Report.php @@ -0,0 +1,45 @@ +issues[$id] = $issue; + return $this; + } + + /** + * {@inheritdoc} + */ + public function getIssues($tag = NULL) { + // We call array_values() here to reset the keys. + $issues = array_values($this->issues); + + if ($tag) { + $issues = array_filter($issues, function(IssueInterface $issue) use ($tag) { + return $issue->hasTag($tag); + }); + } + + return $issues; + } + + public function enumerateTag($tag) { + $enum = array_map(function(IssueInterface $issue) use ($tag) { return $issue->getTag($tag); }, $this->getIssues($tag)); + return array_unique($enum); + } + +}