Method convertNumber
has 40 lines of code (exceeds 25 allowed). Consider refactoring.
private function convertNumber( $number ) {
$word = array();
$crore_quotient = floor( $number / $this->croreDivisor );
Function convertNumber
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
private function convertNumber( $number ) {
$word = array();
$crore_quotient = floor( $number / $this->croreDivisor );
Function numToWordSmall
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
public function numToWordSmall( $number ) {
if ( ! is_numeric( $number ) ) {
throw new Exception\NTWIndiaInvalidNumber( 'Valid number not given.' );
}
Method numToWordSmall
has 27 lines of code (exceeds 25 allowed). Consider refactoring.
public function numToWordSmall( $number ) {
if ( ! is_numeric( $number ) ) {
throw new Exception\NTWIndiaInvalidNumber( 'Valid number not given.' );
}
Function numToWord
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
public function numToWord( $number ) {
/**
* Check if a valid number is passed
*
* If not then log a warning
Avoid too many return
statements within this method.
return $this->numToWord['90'] . ' ' . $this->numToWord[ $lastCharacter ];
Avoid too many return
statements within this method.
return $this->numToWord['50'] . ' ' . $this->numToWord[ $lastCharacter ];
Avoid too many return
statements within this method.
return $this->numToWord['80'] . ' ' . $this->numToWord[ $lastCharacter ];
Avoid too many return
statements within this method.
return $this->numToWord['70'] . ' ' . $this->numToWord[ $lastCharacter ];
Avoid too many return
statements within this method.
return $this->numToWord['60'] . ' ' . $this->numToWord[ $lastCharacter ];