http://phing.info/

Source Code Coverage

Designed for use with PHPUnit2, Xdebug and Phing.

Methods: 1 LOC: 36 Statements: 3
Legend: executednot executeddead code
Source file Statements Methods Total coverage
SortableSet.php 100.0% 100.0% 100.0%
 
1
<?php
2
/**
3
 * Xyster Framework
4
 *
5
 * This source file is subject to the new BSD license that is bundled
6
 * with this package in the file LICENSE.txt.
7
 * It is also available through the world-wide-web at this URL:
8
 * http://www.opensource.org/licenses/bsd-license.php
9
 *
10
 * @category  Xyster
11
 * @package   Xyster_Collection
12
 * @copyright Copyright LibreWorks, LLC (http://libreworks.net)
13
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
14
 * @version   $Id$
15
 */
16
namespace Xyster\Collection;
17
/**
18
 * No-duplicate collection whose elements can be reordered
19
 *
20
 * @category  Xyster
21
 * @package   Xyster_Collection
22
 * @copyright Copyright LibreWorks, LLC (http://libreworks.net)
23
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
24
 */
25
class SortableSet extends Set
26 1
{
27
    /**
28
     * Sorts the collection according to the values in the elements
29
     *
30
     * @param IComparator $comparator The comparator
31
     */
32
    public function sort(IComparator $comparator)
33
    {
34 7
        usort($this->_items, array($comparator, 'compare'));
35
    }
36 1
}


Report generated at 2010-10-18T17:19:49-04:00