[ticket/10824] Clean up code a bit

PHPBB3-10824
This commit is contained in:
Marc Alexander 2020-10-31 14:16:40 +01:00
parent 646f9826ec
commit ed9be050ad
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@ class sanitizer
{ {
if (!empty($data)) if (!empty($data))
{ {
$json_sanitizer = function (&$value, $key) { $json_sanitizer = function (&$value) {
$type_cast_helper = new type_cast_helper(); $type_cast_helper = new type_cast_helper();
$type_cast_helper->set_var($value, $value, gettype($value), true); $type_cast_helper->set_var($value, $value, gettype($value), true);
}; };

View file

@ -69,7 +69,7 @@ class language_file_helper
* @param string $path * @param string $path
* @return array * @return array
*/ */
public function get_language_data_from_composer_file($path) public function get_language_data_from_composer_file(string $path)
{ {
$json_data = file_get_contents($path); $json_data = file_get_contents($path);
return $this->get_language_data_from_json(sanitizer::decode($json_data)); return $this->get_language_data_from_json(sanitizer::decode($json_data));