original_string: private function checkImageAltTags() {
  
          $html = $this->getPageContent();
  
          // for newly created page
          if ($html == '') {
              return false;
          }
  
          $dom = $this->createDOMDocumentFromHTML($html);
  
          $images = $dom->getElementsByTagName('img');
  
          $imagesWithAltTags = 0;
          foreach($images as $image){
              if($image->hasAttribute('alt') && $image->getAttribute('alt') != ''){
                  $imagesWithAltTags++;
              }
          }
          if($imagesWithAltTags == $images->length){
              return true;
          }
  
          return false;
      }
code: private function checkImageAltTags() {
  
          $html = $this->getPageContent();
  
          // for newly created page
          if ($html == '') {
              return false;
          }
  
          $dom = $this->createDOMDocumentFromHTML($html);
  
          $images = $dom->getElementsByTagName('img');
  
          $imagesWithAltTags = 0;
          foreach($images as $image){
              if($image->hasAttribute('alt') && $image->getAttribute('alt') != ''){
                  $imagesWithAltTags++;
              }
          }
          if($imagesWithAltTags == $images->length){
              return true;
          }
  
          return false;
      }
code_tokens: private function checkImageAltTags ( ) { $ html = $ this -> getPageContent ( ) ; // for newly created page if ( $ html == '' ) { return false ; } $ dom = $ this -> createDOMDocumentFromHTML ( $ html ) ; $ images = $ dom -> getElementsByTagName ( 'img' ) ; $ imagesWithAltTags = 0 ; foreach ( $ images as $ image ) { if ( $ image -> hasAttribute ( 'alt' ) && $ image -> getAttribute ( 'alt' ) != '' ) { $ imagesWithAltTags ++ ; } } if ( $ imagesWithAltTags == $ images -> length ) { return true ; } return false ; }
docstring: checkImageAltTags.
  Checks if images in content have alt tags
  
  @param none
  @return boolean
docstring_tokens: checkImageAltTags . Checks if images in content have alt tags