original_string: private function checkType($oldType, $newType, NodePath $nodePath) : string
      {
          if (!is_null($oldType) && ($newType !== $oldType) && ($newType !== 'null') && ($oldType !== 'null')) {
              throw new JsonParserException(
                  "Data in '$nodePath' contains incompatible data types '$oldType' and '$newType'."
              );
          }
          return $newType;
      }
code: private function checkType($oldType, $newType, NodePath $nodePath) : string
      {
          if (!is_null($oldType) && ($newType !== $oldType) && ($newType !== 'null') && ($oldType !== 'null')) {
              throw new JsonParserException(
                  "Data in '$nodePath' contains incompatible data types '$oldType' and '$newType'."
              );
          }
          return $newType;
      }
code_tokens: private function checkType ( $ oldType , $ newType , NodePath $ nodePath ) : string { if ( ! is_null ( $ oldType ) && ( $ newType !== $ oldType ) && ( $ newType !== 'null' ) && ( $ oldType !== 'null' ) ) { throw new JsonParserException ( "Data in '$nodePath' contains incompatible data types '$oldType' and '$newType'." ) ; } return $ newType ; }
docstring: Check that two types same or compatible.
  @param $oldType
  @param $newType
  @param NodePath $nodePath
  @return string
  @throws JsonParserException
docstring_tokens: Check that two types same or compatible .