/** * Return a numerical counter for the given build. */ protected static function buildname_to_counter($buildname, DNProject $project) { $builds = $project->DNBuildList()->reverse(); $counter = 1; foreach ($builds as $build) { if ($build->FullName() == $buildname) { return $counter; } $counter++; } }