Pinq\Expressions\EvaluationContext::staticContext PHP Method

staticContext() public static method

public static staticContext ( string | null $namespace, string | null $scopeType ) : Pinq\Expressions\IEvaluationContext
$namespace string | null
$scopeType string | null
return Pinq\Expressions\IEvaluationContext
    public static function staticContext($namespace, $scopeType)
    {
        return new self($namespace, $scopeType);
    }

Usage Example

コード例 #1
0
ファイル: TypeAnalysisTest.php プロジェクト: timetoogo/pinq
 protected function assertTypeMatchesValue(ITypeAnalysis $analysis, O\Expression $expression, IType $metadataType = null)
 {
     $type = $this->typeSystem->getTypeFromValue($expression->evaluate(O\EvaluationContext::staticContext(__NAMESPACE__, __CLASS__)));
     $this->assertEqualTypes($type, $analysis->getReturnTypeOf($expression));
     if ($metadataType !== null) {
         $this->assertEqualTypes($metadataType, $type, $expression->compileDebug());
     }
 }
All Usage Examples Of Pinq\Expressions\EvaluationContext::staticContext