src/Factory/ProxyBuilderFactory.php 1 location
|
@@ 24-32 (lines=9) @@
|
21 |
|
* @param MockingStrategyInterface $mockingStrategy |
22 |
|
* @return ProxyBuilder |
23 |
|
*/ |
24 |
|
public static function get(MockingStrategyInterface $mockingStrategy): ProxyBuilder |
25 |
|
{ |
26 |
|
$key = self::key($mockingStrategy); |
27 |
|
if (!array_key_exists($key, self::$mockBuilders) || !self::$mockBuilders[$key] instanceof ProxyBuilder) { |
28 |
|
self::$mockBuilders[$key] = static::build($mockingStrategy); |
29 |
|
} |
30 |
|
|
31 |
|
return self::$mockBuilders[$key]; |
32 |
|
} |
33 |
|
|
34 |
|
/** |
35 |
|
* @param MockingStrategyInterface $mockingStrategy |
src/Factory/ProxyGeneratorFactory.php 1 location
|
@@ 24-32 (lines=9) @@
|
21 |
|
* @param MockingStrategyInterface $mockingStrategy |
22 |
|
* @return ProxyGenerator |
23 |
|
*/ |
24 |
|
public static function get(MockingStrategyInterface $mockingStrategy): ProxyGenerator |
25 |
|
{ |
26 |
|
$key = self::key($mockingStrategy); |
27 |
|
if (!array_key_exists($key, self::$proxyGenerators) || !self::$proxyGenerators[$key] instanceof ProxyGenerator) { |
28 |
|
self::$proxyGenerators[$key] = static::build($mockingStrategy); |
29 |
|
} |
30 |
|
|
31 |
|
return self::$proxyGenerators[$key]; |
32 |
|
} |
33 |
|
|
34 |
|
/** |
35 |
|
* @param MockingStrategyInterface $mockingStrategy |