//{
    /**
     * Sorts the array of comparable objects.
     */
    protected function doSort()
    {
        for ($i = 1; $i < $this->n; ++$i) {
            for ($j = $i; $j > 0 && gt($this->array[$j - 1], $this->array[$j]); --$j) {
                $this->swap($j, $j - 1);
            }
        }
    }
    //}>a
    /**
     * Main program.
     *
     * @param array $args Command-line arguments.
     * @return integer Zero on success; non-zero on failure.
     */
    public static function main($args)
    {
        printf("StraightInsertionSorter main program.\n");
        $status = 0;
        $sorter = new StraightInsertionSorter();
        AbstractSorter::test($sorter, 100, 123);
        return $status;
    }
}
if (realpath($argv[0]) == realpath(__FILE__)) {
    exit(StraightInsertionSorter::main(array_slice($argv, 1)));
}