original_string: public function check_chunks($type, $check) {
          if (array_key_exists($type, $this->_chunks)) {
              foreach (array_keys($this->_chunks[$type]) as $typekey) {
                  list($key, $data) = explode("\0", $this->_chunks[$type][$typekey]);
  
                  if (strcmp($key, $check) == 0) {
                      debugging('Key "' . $check . '" already exists in "' . $type . '" chunk.');
                      return false;
                  }
              }
          }
          return true;
      }
code: public function check_chunks($type, $check) {
          if (array_key_exists($type, $this->_chunks)) {
              foreach (array_keys($this->_chunks[$type]) as $typekey) {
                  list($key, $data) = explode("\0", $this->_chunks[$type][$typekey]);
  
                  if (strcmp($key, $check) == 0) {
                      debugging('Key "' . $check . '" already exists in "' . $type . '" chunk.');
                      return false;
                  }
              }
          }
          return true;
      }
code_tokens: public function check_chunks ( $ type , $ check ) { if ( array_key_exists ( $ type , $ this -> _chunks ) ) { foreach ( array_keys ( $ this -> _chunks [ $ type ] ) as $ typekey ) { list ( $ key , $ data ) = explode ( "\0" , $ this -> _chunks [ $ type ] [ $ typekey ] ) ; if ( strcmp ( $ key , $ check ) == 0 ) { debugging ( 'Key "' . $ check . '" already exists in "' . $ type . '" chunk.' ) ; return false ; } } } return true ; }
docstring: Checks if a key already exists in the chunk of said type.
  We need to avoid writing same keyword into file chunks.
  
  @param string $type Chunk type, like iTXt, tEXt, etc.
  @param string $check Keyword that needs to be checked.
  
  @return boolean (true|false) True if file is safe to write this keyword, false otherwise.
docstring_tokens: Checks if a key already exists in the chunk of said type . We need to avoid writing same keyword into file chunks .