class FactoryProvider
Prophecy comparator factory.
@author Konstantin Kudryashov <ever.zet@gmail.com>
Hierarchy
- class \Prophecy\Comparator\FactoryProvider
Expanded class hierarchy of FactoryProvider
3 files declare their use of FactoryProvider
- ExactValueToken.php in vendor/
phpspec/ prophecy/ src/ Prophecy/ Argument/ Token/ ExactValueToken.php - ObjectProphecy.php in vendor/
phpspec/ prophecy/ src/ Prophecy/ Prophecy/ ObjectProphecy.php - ObjectStateToken.php in vendor/
phpspec/ prophecy/ src/ Prophecy/ Argument/ Token/ ObjectStateToken.php
File
-
vendor/
phpspec/ prophecy/ src/ Prophecy/ Comparator/ FactoryProvider.php, line 21
Namespace
Prophecy\ComparatorView source
final class FactoryProvider {
/**
* @var Factory|null
*/
private static $instance;
private function __construct() {
}
public static function getInstance() : Factory {
if (self::$instance === null) {
self::$instance = new Factory();
self::$instance->register(new ClosureComparator());
self::$instance->register(new ProphecyComparator());
}
return self::$instance;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
FactoryProvider::$instance | private static | property | |
FactoryProvider::getInstance | public static | function | |
FactoryProvider::__construct | private | function |