original_string: protected function getNormalizedNumbers($args)
      {
          $unit = null;
          $originalUnit = null;
          $numbers = [];
  
          foreach ($args as $key => $item) {
              if ($item[0] !== Type::T_NUMBER) {
                  $this->throwError('%s is not a number', $item[0]);
                  break;
              }
  
              $number = $item->normalize();
  
              if (null === $unit) {
                  $unit = $number[2];
                  $originalUnit = $item->unitStr();
              } elseif ($unit !== $number[2]) {
                  $this->throwError('Incompatible units: "%s" and "%s".', $originalUnit, $item->unitStr());
                  break;
              }
  
              $numbers[$key] = $number;
          }
  
          return $numbers;
      }
code: protected function getNormalizedNumbers($args)
      {
          $unit = null;
          $originalUnit = null;
          $numbers = [];
  
          foreach ($args as $key => $item) {
              if ($item[0] !== Type::T_NUMBER) {
                  $this->throwError('%s is not a number', $item[0]);
                  break;
              }
  
              $number = $item->normalize();
  
              if (null === $unit) {
                  $unit = $number[2];
                  $originalUnit = $item->unitStr();
              } elseif ($unit !== $number[2]) {
                  $this->throwError('Incompatible units: "%s" and "%s".', $originalUnit, $item->unitStr());
                  break;
              }
  
              $numbers[$key] = $number;
          }
  
          return $numbers;
      }
code_tokens: protected function getNormalizedNumbers ( $ args ) { $ unit = null ; $ originalUnit = null ; $ numbers = [ ] ; foreach ( $ args as $ key => $ item ) { if ( $ item [ 0 ] !== Type :: T_NUMBER ) { $ this -> throwError ( '%s is not a number' , $ item [ 0 ] ) ; break ; } $ number = $ item -> normalize ( ) ; if ( null === $ unit ) { $ unit = $ number [ 2 ] ; $ originalUnit = $ item -> unitStr ( ) ; } elseif ( $ unit !== $ number [ 2 ] ) { $ this -> throwError ( 'Incompatible units: "%s" and "%s".' , $ originalUnit , $ item -> unitStr ( ) ) ; break ; } $ numbers [ $ key ] = $ number ; } return $ numbers ; }
docstring: Helper to normalize args containing numbers
  
  @param array $args
  
  @return array
docstring_tokens: Helper to normalize args containing numbers