mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-30 12:06:56 +00:00
Fix code for PHP 8.1
This commit is contained in:
@@ -252,7 +252,7 @@ class FilesystemLoader implements LoaderInterface, ExistsLoaderInterface, Source
|
||||
|
||||
private function normalizeName($name)
|
||||
{
|
||||
return preg_replace('#/{2,}#', '/', str_replace('\\', '/', $name));
|
||||
return preg_replace('#/{2,}#', '/', str_replace('\\', '/', (string) $name));
|
||||
}
|
||||
|
||||
private function parseName($name, $default = self::MAIN_NAMESPACE)
|
||||
|
||||
@@ -214,10 +214,8 @@ class FilesystemTest extends TestCase
|
||||
|
||||
/**
|
||||
* @dataProvider getArrayInheritanceTests
|
||||
*
|
||||
* @param $templateName string Template name with array inheritance
|
||||
*/
|
||||
public function testArrayInheritance($templateName)
|
||||
public function testArrayInheritance(string $templateName)
|
||||
{
|
||||
$loader = new FilesystemLoader([]);
|
||||
$loader->addPath(__DIR__.'/Fixtures/inheritance');
|
||||
|
||||
Reference in New Issue
Block a user