original_string: protected function validateFiles(array &$library)
      {
          if (empty($library['files'])) {
              return true; // Assume files will be loaded dynamically
          }
  
          $readable = $count = 0;
  
          foreach ($library['files'] as &$file) {
  
              $count++;
  
              if (!gplcart_path_is_absolute($file)) {
                  $file = $library['basepath'] . "/$file";
              }
  
              $readable += (int) (is_file($file) && is_readable($file));
          }
  
          return $count == $readable;
      }
code: protected function validateFiles(array &$library)
      {
          if (empty($library['files'])) {
              return true; // Assume files will be loaded dynamically
          }
  
          $readable = $count = 0;
  
          foreach ($library['files'] as &$file) {
  
              $count++;
  
              if (!gplcart_path_is_absolute($file)) {
                  $file = $library['basepath'] . "/$file";
              }
  
              $readable += (int) (is_file($file) && is_readable($file));
          }
  
          return $count == $readable;
      }
code_tokens: protected function validateFiles ( array & $ library ) { if ( empty ( $ library [ 'files' ] ) ) { return true ; // Assume files will be loaded dynamically } $ readable = $ count = 0 ; foreach ( $ library [ 'files' ] as & $ file ) { $ count ++ ; if ( ! gplcart_path_is_absolute ( $ file ) ) { $ file = $ library [ 'basepath' ] . "/$file" ; } $ readable += ( int ) ( is_file ( $ file ) && is_readable ( $ file ) ) ; } return $ count == $ readable ; }
docstring: Validates library files
  @param array $library
  @return bool
docstring_tokens: Validates library files