original_string: final private static function sortConstants(ReflectionClass $reflection): array
      {
          $constants = [];
          while ($reflection && __CLASS__ !== $reflection->getName()) {
              $scope = [];
              foreach ($reflection->getReflectionConstants() as $const) {
                  if ($const->isPublic()) {
                      $scope[$const->getName()] = $const->getValue();
                  }
              }
              $constants = $scope + $constants;
              $reflection = $reflection->getParentClass();
          }
  
  
          return $constants;
      }
code: final private static function sortConstants(ReflectionClass $reflection): array
      {
          $constants = [];
          while ($reflection && __CLASS__ !== $reflection->getName()) {
              $scope = [];
              foreach ($reflection->getReflectionConstants() as $const) {
                  if ($const->isPublic()) {
                      $scope[$const->getName()] = $const->getValue();
                  }
              }
              $constants = $scope + $constants;
              $reflection = $reflection->getParentClass();
          }
  
  
          return $constants;
      }
code_tokens: final private static function sortConstants ( ReflectionClass $ reflection ) : array { $ constants = [ ] ; while ( $ reflection && __CLASS__ !== $ reflection -> getName ( ) ) { $ scope = [ ] ; foreach ( $ reflection -> getReflectionConstants ( ) as $ const ) { if ( $ const -> isPublic ( ) ) { $ scope [ $ const -> getName ( ) ] = $ const -> getValue ( ) ; } } $ constants = $ scope + $ constants ; $ reflection = $ reflection -> getParentClass ( ) ; } return $ constants ; }
docstring: Sorts member constants
  
  @param ReflectionClass $reflection The reflection instance
  
  @return array
docstring_tokens: Sorts member constants