public static function sortProperties(array $contents, $sort)
    {
        switch ($sort) {
            case self::SORT_VISIBILITY:
                /** @var array<array-key, BasicObject[]> Containers to quickly stable sort by type */
                $containers = array(
                    BasicObject::ACCESS_PUBLIC => array(),
                    BasicObject::ACCESS_PROTECTED => array(),
                    BasicObject::ACCESS_PRIVATE => array(),
                    BasicObject::ACCESS_NONE => array(),
                );

                foreach ($contents as $item) {
                    $containers[$item->access][] = $item;
                }

                return \call_user_func_array('array_merge', $containers);
            case self::SORT_FULL:
                \usort($contents, array('Kint\\Renderer\\Renderer', 'sortPropertiesFull'));
                // no break
            default:
                return $contents;
        }
    }