GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Setup Failed
Push — master ( d0e1fe...39ef5b )
by Leonardo
01:32
created

__bic_validation_proc()   A

Complexity

Conditions 2

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
1
# frozen_string_literal: true
2
3
IbanBic.configure do
4
  def __iban_bic_es_bic_validation_proc(digits)
5
    ret = 11 - digits.chars.each_with_index.sum { |x, i| x.to_i * 2**i } % 11
6
    ret < 10 ? ret : 11 - ret
7
  end
8
  add "ES" do |parts|
9
    parts[:check] = "#{__iban_bic_es_bic_validation_proc("00#{parts[:bank]}#{parts[:branch]}")}#{__iban_bic_es_bic_validation_proc(parts[:account])}"
10
  end
11
end
12