mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-02 21:19:58 +09:00
Update to laravel 7
This commit is contained in:
@@ -26,7 +26,7 @@ class IcuResFileLoader implements LoaderInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function load($resource, $locale, $domain = 'messages')
|
||||
public function load($resource, string $locale, string $domain = 'messages')
|
||||
{
|
||||
if (!stream_is_local($resource)) {
|
||||
throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource));
|
||||
@@ -43,7 +43,7 @@ class IcuResFileLoader implements LoaderInterface
|
||||
}
|
||||
|
||||
if (!$rb) {
|
||||
throw new InvalidResourceException(sprintf('Cannot load resource "%s"', $resource));
|
||||
throw new InvalidResourceException(sprintf('Cannot load resource "%s".', $resource));
|
||||
} elseif (intl_is_failure($rb->getErrorCode())) {
|
||||
throw new InvalidResourceException($rb->getErrorMessage(), $rb->getErrorCode());
|
||||
}
|
||||
@@ -52,7 +52,7 @@ class IcuResFileLoader implements LoaderInterface
|
||||
$catalogue = new MessageCatalogue($locale);
|
||||
$catalogue->add($messages, $domain);
|
||||
|
||||
if (class_exists('Symfony\Component\Config\Resource\DirectoryResource')) {
|
||||
if (class_exists(DirectoryResource::class)) {
|
||||
$catalogue->addResource(new DirectoryResource($resource));
|
||||
}
|
||||
|
||||
@@ -73,9 +73,9 @@ class IcuResFileLoader implements LoaderInterface
|
||||
* @param array $messages Used internally for recursive calls
|
||||
* @param string $path Current path being parsed, used internally for recursive calls
|
||||
*
|
||||
* @return array the flattened ResourceBundle
|
||||
* @return array
|
||||
*/
|
||||
protected function flatten(\ResourceBundle $rb, array &$messages = [], $path = null)
|
||||
protected function flatten(\ResourceBundle $rb, array &$messages = [], string $path = null)
|
||||
{
|
||||
foreach ($rb as $key => $value) {
|
||||
$nodePath = $path ? $path.'.'.$key : $key;
|
||||
|
||||
Reference in New Issue
Block a user