/** * Sorts constants by FQN. * * @param \ApiGen\ReflectionConstant $one * @param \ApiGen\ReflectionConstant $two * * @return integer */ private function sortConstants(ReflectionConstant $one, ReflectionConstant $two) { return strcasecmp(($one->getDeclaringClassName() ?: $one->getNamespaceName()) . '\\' . $one->getName(), ($two->getDeclaringClassName() ?: $two->getNamespaceName()) . '\\' . $two->getName()); }