$vars Become local variables of the template. */ public function render( string $name, array $vars = array() ): void { $file = $this->dir . $name . '.php'; ( static function () use ( $file, $vars ): void { extract( $vars, EXTR_SKIP ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract -- the point of a view helper. include $file; } )(); } }