Commit aa0d3ede authored by Marius Rackwitz's avatar Marius Rackwitz

[Style] Prefer find over select {…}.first

parent a2b6404f
...@@ -134,7 +134,7 @@ module Pod ...@@ -134,7 +134,7 @@ module Pod
def add_embed_frameworks_script_phase def add_embed_frameworks_script_phase
phase_name = 'Embed Pods Frameworks' phase_name = 'Embed Pods Frameworks'
native_targets_to_integrate.each do |native_target| native_targets_to_integrate.each do |native_target|
embed_build_phase = native_target.shell_script_build_phases.select { |bp| bp.name == phase_name }.first embed_build_phase = native_target.shell_script_build_phases.find { |bp| bp.name == phase_name }
unless embed_build_phase.present? unless embed_build_phase.present?
UI.message("Add Build Phase '#{phase_name}' to project.") UI.message("Add Build Phase '#{phase_name}' to project.")
embed_build_phase = native_target.new_shell_script_build_phase(phase_name) embed_build_phase = native_target.new_shell_script_build_phase(phase_name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment