DD2480-G12 / libphonenumber

Google's common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers.
Apache License 2.0
0 stars 0 forks source link

Calculate code complexity for PhoneNumberUtil::maybeStripNationalPrefixAndCarrierCode #7

Open newinteger opened 2 years ago

newinteger commented 2 years ago

lizard gives a CCN of 16

newinteger commented 2 years ago

I counted it to 16

  1. Lizard gave the same result
  2. The code is around 50 lines of code, so it is not very long
  3. The purpose of the function is to strip the national prefix and carrier code from a function depending on some conditions
  4. The function does not have any exceptions
  5. The function is well documented
ekner commented 2 years ago

I counted CCN to 17

spelgubbe commented 2 years ago

I counted it to 16.