src/LocaleTranslationProvider.php
public function translate(string $key, array $arguments = [])
    {
        if (!isset($this->translations[$key])) {
            return null;
        }

        if (!$this->hasNamedArguments($arguments)) {
            return $this->translateWithoutNamedArguments($key, $arguments);
        }

        return $this->translateWithNamedArguments($key, $arguments);
    }
public function translate(string $key, array $arguments = [])
    {
        if (!isset($this->translations[$key])) {
            return null;
        }

        if (!$this->hasNamedArguments($arguments)) {
            return $this->translateWithoutNamedArguments($key, $arguments);
        }

        return $this->translateWithNamedArguments($key, $arguments);
    }
public function translate ( string $ key , array $ arguments = [ ] ) { if ( ! isset ( $ this -> translations [ $ key ] ) ) { return null ; } if ( ! $ this -> hasNamedArguments ( $ arguments ) ) { return $ this -> translateWithoutNamedArguments ( $ key , $ arguments ) ; } return $ this -> translateWithNamedArguments ( $ key , $ arguments ) ; }
@param string $key
@param array  $arguments

@return string|null
@param string $key @param array $arguments