/** * @internal param $ScopeInterface ... $scope * @internal param callable $closure * @deprecated * @return mixed */ public static function scope() { $scopes = func_get_args(); $callable = array_pop($scopes); $scope = new Scope($scopes); return $scope->call($callable); }
/** * @depends testCallValuePassing */ public function testCallDefaultValueIfNotExists() { $scope = new Scope(); $scope->test = 3; $scope->call(function ($x = 5) { $this->assertEquals(5, $x); }); }