diff --git a/Library/Homebrew/cache_store.rb b/Library/Homebrew/cache_store.rb index 51c4492529..e28795d4bf 100644 --- a/Library/Homebrew/cache_store.rb +++ b/Library/Homebrew/cache_store.rb @@ -38,6 +38,15 @@ class CacheStoreDatabase return_value end + # Creates a CacheStoreDatabase. + # + # @param [Symbol] type + # @return [nil] + def initialize(type) + @type = type + @dirty = false + end + # Sets a value in the underlying database (and creates it if necessary). def set(key, value) dirty! @@ -120,15 +129,6 @@ class CacheStoreDatabase @db ||= {} end - # Creates a CacheStoreDatabase. - # - # @param [Symbol] type - # @return [nil] - def initialize(type) - @type = type - @dirty = false - end - # The path where the database resides in the `HOMEBREW_CACHE` for the given # `@type`. # diff --git a/Library/Homebrew/utils/spdx.rb b/Library/Homebrew/utils/spdx.rb index 65a307770f..1fe89ae6fa 100644 --- a/Library/Homebrew/utils/spdx.rb +++ b/Library/Homebrew/utils/spdx.rb @@ -39,8 +39,8 @@ module SPDX end def parse_license_expression(license_expression) - licenses = [] - exceptions = [] + licenses = T.let([], T::Array[T.any(String, Symbol)]) + exceptions = T.let([], T::Array[String]) case license_expression when String, Symbol