Skip to content

Commit

Permalink
Merge pull request #10924 from jolyot/replace-bool-with-boolean
Browse files Browse the repository at this point in the history
Replace [Bool] with [Boolean] in method comments  according to the YARD convention.
  • Loading branch information
dnkoutso committed Sep 7, 2021
2 parents 416d680 + ef47fa6 commit e83d326
Show file tree
Hide file tree
Showing 26 changed files with 67 additions and 67 deletions.
10 changes: 5 additions & 5 deletions lib/cocoapods/config.rb
Expand Up @@ -49,23 +49,23 @@ def with_changes(changes)

# @!group UI

# @return [Bool] Whether CocoaPods should provide detailed output about the
# @return [Boolean] Whether CocoaPods should provide detailed output about the
# performed actions.
#
attr_accessor :verbose
alias_method :verbose?, :verbose

# @return [Bool] Whether CocoaPods should produce not output.
# @return [Boolean] Whether CocoaPods should produce not output.
#
attr_accessor :silent
alias_method :silent?, :silent

# @return [Bool] Whether CocoaPods is allowed to run as root.
# @return [Boolean] Whether CocoaPods is allowed to run as root.
#
attr_accessor :allow_root
alias_method :allow_root?, :allow_root

# @return [Bool] Whether a message should be printed when a new version of
# @return [Boolean] Whether a message should be printed when a new version of
# CocoaPods is available.
#
attr_accessor :new_version_message
Expand All @@ -75,7 +75,7 @@ def with_changes(changes)

# @!group Installation

# @return [Bool] Whether the installer should skip the download cache.
# @return [Boolean] Whether the installer should skip the download cache.
#
attr_accessor :skip_download_cache
alias_method :skip_download_cache?, :skip_download_cache
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods/executable.rb
Expand Up @@ -36,7 +36,7 @@ def executable(name)
# @param [Array<#to_s>] command
# The command to send to the binary.
#
# @param [Bool] raise_on_failure
# @param [Boolean] raise_on_failure
# Whether it should raise if the command fails.
#
# @raise If the executable could not be located.
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods/external_sources/abstract_external_source.rb
Expand Up @@ -36,7 +36,7 @@ def initialize(name, params, podfile_path, can_cache = true)
@can_cache = can_cache
end

# @return [Bool] whether an external source source is equal to another
# @return [Boolean] whether an external source source is equal to another
# according to the {#name} and to the {#params}.
#
def ==(other)
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods/external_sources/path_source.rb
Expand Up @@ -45,7 +45,7 @@ def podspec_path
path.exist? ? path : Pathname("#{path}.json")
end

# @return [Bool]
# @return [Boolean]
#
def absolute?(path)
Pathname(path).absolute? || path.to_s.start_with?('~')
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods/generator/copy_resources_script.rb
Expand Up @@ -59,7 +59,7 @@ def generate
:tvos => Version.new('9.0'),
}

# @return [Bool] Whether the external strings file is supported by the
# @return [Boolean] Whether the external strings file is supported by the
# `ibtool` according to the deployment target of the platform.
#
def use_external_strings_file?
Expand Down
6 changes: 3 additions & 3 deletions lib/cocoapods/installer/analyzer.rb
Expand Up @@ -43,7 +43,7 @@ class Analyzer
#
attr_reader :plugin_sources

# @return [Bool] Whether the analysis has dependencies and thus sources must be configured.
# @return [Boolean] Whether the analysis has dependencies and thus sources must be configured.
#
# @note This is used by the `pod lib lint` command to prevent update of specs when not needed.
#
Expand Down Expand Up @@ -93,7 +93,7 @@ def initialize(sandbox, podfile, lockfile = nil, plugin_sources = nil, has_depen
# compute which specification should be installed. The manifest of the
# sandbox returns which specifications are installed.
#
# @param [Bool] allow_fetches
# @param [Boolean] allow_fetches
# whether external sources may be fetched
#
# @return [AnalysisResult]
Expand Down Expand Up @@ -193,7 +193,7 @@ def sources

# @!group Configuration

# @return [Bool] Whether the version of the dependencies which did not
# @return [Boolean] Whether the version of the dependencies which did not
# change in the Podfile should be locked.
#
def update_mode?
Expand Down
6 changes: 3 additions & 3 deletions lib/cocoapods/installer/analyzer/analysis_result.rb
Expand Up @@ -59,22 +59,22 @@ def all_user_build_configurations
end
end

# @return [Bool] Whether an installation should be performed or this
# @return [Boolean] Whether an installation should be performed or this
# CocoaPods project is already up to date.
#
def needs_install?
podfile_needs_install? || sandbox_needs_install?
end

# @return [Bool] Whether the podfile has changes respect to the lockfile.
# @return [Boolean] Whether the podfile has changes respect to the lockfile.
#
def podfile_needs_install?
state = podfile_state
needing_install = state.added.length + state.changed.length + state.deleted.length
needing_install > 0
end

# @return [Bool] Whether the sandbox is in synch with the lockfile.
# @return [Boolean] Whether the sandbox is in synch with the lockfile.
#
def sandbox_needs_install?
state = sandbox_state
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods/installer/analyzer/pod_variant.rb
Expand Up @@ -56,7 +56,7 @@ def root_spec
# @note Non library specs are intentionally not included as part of the equality for pod variants since a pod
# variant should not be affected by the number of test nor app specs included.
#
# @return [Bool] whether the {PodVariant} is equal to another taking all all their attributes into account
# @return [Boolean] whether the {PodVariant} is equal to another taking all all their attributes into account
#
def ==(other)
self.class == other.class &&
Expand Down
10 changes: 5 additions & 5 deletions lib/cocoapods/installer/analyzer/sandbox_analyzer.rb
Expand Up @@ -40,7 +40,7 @@ class SandboxAnalyzer
#
attr_reader :specs

# @return [Bool] Whether the installation is performed in update mode.
# @return [Boolean] Whether the installation is performed in update mode.
#
attr_reader :update_mode

Expand All @@ -51,7 +51,7 @@ class SandboxAnalyzer
# @param [Sandbox] sandbox @see sandbox
# @param [Podfile] podfile @see podfile
# @param [Array<Specifications>] specs @see specs
# @param [Bool] update_mode @see update_mode
# @param [Boolean] update_mode @see update_mode
#
def initialize(sandbox, podfile, specs, update_mode)
@sandbox = sandbox
Expand Down Expand Up @@ -105,7 +105,7 @@ def pod_state(pod)
# @param [String] pod
# the name of the Pod.
#
# @return [Bool] Whether the Pod is added.
# @return [Boolean] Whether the Pod is added.
#
def pod_added?(pod)
return true if resolved_pods.include?(pod) && !sandbox_pods.include?(pod)
Expand All @@ -119,7 +119,7 @@ def pod_added?(pod)
# @param [String] pod
# the name of the Pod.
#
# @return [Bool] Whether the Pod is deleted.
# @return [Boolean] Whether the Pod is deleted.
#
def pod_deleted?(pod)
return true if !resolved_pods.include?(pod) && sandbox_pods.include?(pod)
Expand All @@ -138,7 +138,7 @@ def pod_deleted?(pod)
# @param [String] pod
# the name of the Pod.
#
# @return [Bool] Whether the Pod is changed.
# @return [Boolean] Whether the Pod is changed.
#
def pod_changed?(pod)
spec = root_spec(pod)
Expand Down
Expand Up @@ -38,7 +38,7 @@ class ProjectCacheAnalyzer
#
attr_reader :installation_options

# @return [Bool] Flag indicating if we want to ignore the cache and force a clean installation.
# @return [Boolean] Flag indicating if we want to ignore the cache and force a clean installation.
#
attr_reader :clean_install

Expand All @@ -52,7 +52,7 @@ class ProjectCacheAnalyzer
# @param [Array<PodTarget>] pod_targets @see #pod_targets
# @param [Array<AggregateTarget>] aggregate_targets @see #aggregate_targets
# @param [Hash<Symbol, Object>] installation_options @see #installation_options
# @param [Bool] clean_install @see #clean_install
# @param [Boolean] clean_install @see #clean_install
#
def initialize(sandbox, cache, build_configurations, project_object_version, podfile_plugins, pod_targets, aggregate_targets, installation_options,
clean_install: false)
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods/installer/project_cache/target_cache_key.rb
Expand Up @@ -109,7 +109,7 @@ def self.from_cache_hash(sandbox, key_hash)
# @param [PodTarget] pod_target
# The pod target used to construct a TargetCacheKey object.
#
# @param [Bool] is_local_pod
# @param [Boolean] is_local_pod
# Used to also include its local files in the cache key.
#
# @param [Hash] checkout_options
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods/installer/xcode/pods_project_generator.rb
Expand Up @@ -195,7 +195,7 @@ def wire_target_dependencies(target_installation_results)

# @param [String] pod The root name of the development pod.
#
# @return [Bool] whether the scheme for the given development pod should be
# @return [Boolean] whether the scheme for the given development pod should be
# shared.
#
def share_scheme_for_development_pod?(pod)
Expand Down
Expand Up @@ -21,7 +21,7 @@ class FileReferencesInstaller
#
attr_reader :pods_project

# @return [Bool] add support for preserving the file structure of externally sourced pods, in addition to local pods.
# @return [Boolean] add support for preserving the file structure of externally sourced pods, in addition to local pods.
#
attr_reader :preserve_pod_file_structure

Expand All @@ -30,7 +30,7 @@ class FileReferencesInstaller
# @param [Sandbox] sandbox @see #sandbox
# @param [Array<PodTarget>] pod_targets @see #pod_targets
# @param [Project] pods_project @see #pods_project
# @param [Bool] preserve_pod_file_structure @see #preserve_pod_file_structure
# @param [Boolean] preserve_pod_file_structure @see #preserve_pod_file_structure
#
def initialize(sandbox, pod_targets, pods_project, preserve_pod_file_structure = false)
@sandbox = sandbox
Expand Down Expand Up @@ -207,7 +207,7 @@ def file_accessors
# @param [Symbol] group_key
# The key of the group of the Pods project.
#
# @param [Bool] reflect_file_system_structure
# @param [Boolean] reflect_file_system_structure
# Whether organizing a local pod's files in subgroups inside
# the pod's group is allowed.
#
Expand Down
Expand Up @@ -38,7 +38,7 @@ class ProjectGenerator
#
attr_reader :podfile_path

# @return [Bool] Bool indicating if this project is a pod target subproject.
# @return [Boolean] Bool indicating if this project is a pod target subproject.
# Used by `generate_multiple_pod_projects` installation option.
#
attr_reader :pod_target_subproject
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods/native_target_extension.rb
Expand Up @@ -43,7 +43,7 @@ def self.add_cached_dependency(sandbox, target, metadata)
# @param [TargetMetadata] cached_target
# the target to search for.
#
# @return [Bool]
# @return [Boolean]
#
def self.dependency_for_cached_target?(sandbox, target, cached_target)
target.dependencies.find do |dep|
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods/open-uri.rb
Expand Up @@ -24,7 +24,7 @@ module OpenURI
# @param [URI::Generic] uri2
# the target uri where to where the redirect points to
#
# @return [Bool]
# @return [Boolean]
#
def self.redirectable?(uri1, uri2)
uri1.scheme.downcase == uri2.scheme.downcase ||
Expand Down
16 changes: 8 additions & 8 deletions lib/cocoapods/project.rb
Expand Up @@ -26,7 +26,7 @@ class Project < Xcodeproj::Project
#
attr_reader :dependencies_group

# @return [Bool] Bool indicating if this project is a pod target subproject.
# @return [Boolean] Bool indicating if this project is a pod target subproject.
# Used by `generate_multiple_pod_projects` installation option.
#
attr_reader :pod_target_subproject
Expand All @@ -39,7 +39,7 @@ class Project < Xcodeproj::Project
# Initialize a new instance
#
# @param [Pathname, String] path @see Xcodeproj::Project#path
# @param [Bool] skip_initialization Whether the project should be initialized from scratch.
# @param [Boolean] skip_initialization Whether the project should be initialized from scratch.
# @param [Int] object_version Object version to use for serialization, defaults to Xcode 3.2 compatible.
#
def initialize(path, skip_initialization = false,
Expand Down Expand Up @@ -107,10 +107,10 @@ def symroot=(symroot)
# @param [#to_s] path
# The path to the root of the Pod.
#
# @param [Bool] development
# @param [Boolean] development
# Whether the group should be added to the Development Pods group.
#
# @param [Bool] absolute
# @param [Boolean] absolute
# Whether the path of the group should be set as absolute.
#
# @return [PBXGroup] The new group.
Expand All @@ -136,7 +136,7 @@ def add_pod_group(pod_name, path, development = false, absolute = false)
# @param [Project] project
# The subproject to be added.
#
# @param [Bool] development
# @param [Boolean] development
# Whether the project should be added to the Development Pods group.
# For projects where `pod_target_subproject` is enabled, all subprojects are added into the Dependencies group.
#
Expand All @@ -156,7 +156,7 @@ def add_pod_subproject(project, development = false)
# @param [TargetMetadata] metadata
# The project metadata to be added.
#
# @param [Bool] development
# @param [Boolean] development
# Whether the project should be added to the Development Pods group.
# For projects where `pod_target_subproject` is enabled, all subprojects are added into the Dependencies group.
#
Expand Down Expand Up @@ -253,7 +253,7 @@ def pod_support_files_group(pod_name, dir)
# @param [PBXGroup] group
# The group for the new file reference.
#
# @param [Bool] reflect_file_system_structure
# @param [Boolean] reflect_file_system_structure
# Whether group structure should reflect the file system structure.
# If yes, where needed, intermediate groups are created, similar to
# how mkdir -p operates.
Expand Down Expand Up @@ -430,7 +430,7 @@ def defininition_for_build_configuration(name)
# @param [PBXGroup] group
# The parent group used as the base of the relative path.
#
# @param [Bool] reflect_file_system_structure
# @param [Boolean] reflect_file_system_structure
# Whether group structure should reflect the file system structure.
# If yes, where needed, intermediate groups are created, similar to
# how mkdir -p operates.
Expand Down
6 changes: 3 additions & 3 deletions lib/cocoapods/resolver.rb
Expand Up @@ -34,7 +34,7 @@ class Resolver
#
attr_reader :sources

# @return [Bool] Whether the resolver has sources repositories up-to-date.
# @return [Boolean] Whether the resolver has sources repositories up-to-date.
#
attr_reader :specs_updated
alias specs_updated? specs_updated
Expand Down Expand Up @@ -531,7 +531,7 @@ def handle_resolver_error(error)
#
# @param [Specification] spec
#
# @return [Bool]
# @return [Boolean]
#
def spec_is_platform_compatible?(dependency_graph, dependency, spec)
# This is safe since a pod will only be in locked dependencies if we're
Expand Down Expand Up @@ -575,7 +575,7 @@ def hash
# Whether the given `edge` should be followed to find dependencies for the
# given `target_platform`.
#
# @return [Bool]
# @return [Boolean]
#
def edge_is_valid_for_target_platform?(edge, target_platform)
@edge_validity ||= Hash.new do |hash, edge_and_platform|
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods/resolver/resolver_specification.rb
Expand Up @@ -12,7 +12,7 @@ class ResolverSpecification
#
attr_reader :source

# @return [Bool] whether this resolved specification is used by non-library targets.
# @return [Boolean] whether this resolved specification is used by non-library targets.
#
attr_reader :used_by_non_library_targets_only
alias used_by_non_library_targets_only? used_by_non_library_targets_only
Expand Down

0 comments on commit e83d326

Please sign in to comment.