4 * This file is part of the Prophecy.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
6 * Marcello Duarte <marcello.duarte@gmail.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Prophecy\Comparator;
14 use SebastianBergmann\Comparator\Factory as BaseFactory;
17 * Prophecy comparator factory.
19 * @author Konstantin Kudryashov <ever.zet@gmail.com>
21 final class Factory extends BaseFactory
26 private static $instance;
28 public function __construct()
30 parent::__construct();
32 $this->register(new ClosureComparator());
33 $this->register(new ProphecyComparator());
39 public static function getInstance()
41 if (self::$instance === null) {
42 self::$instance = new Factory;
45 return self::$instance;