original_string: protected function verifyDirectoryExistence($base, $cacheDir)
      {
          if (is_dir("$base/$cacheDir")) {
              return;
          }
  
          $folder_path = explode('/', $cacheDir);
          foreach ($folder_path as $element) {
              $base .= '/' . $element;
              if (!is_dir($base)) {
                  mkdir($base, 0755, true);
                  chmod($base, 0755);
              }
          }
      }
code: protected function verifyDirectoryExistence($base, $cacheDir)
      {
          if (is_dir("$base/$cacheDir")) {
              return;
          }
  
          $folder_path = explode('/', $cacheDir);
          foreach ($folder_path as $element) {
              $base .= '/' . $element;
              if (!is_dir($base)) {
                  mkdir($base, 0755, true);
                  chmod($base, 0755);
              }
          }
      }
code_tokens: protected function verifyDirectoryExistence ( $ base , $ cacheDir ) { if ( is_dir ( "$base/$cacheDir" ) ) { return ; } $ folder_path = explode ( '/' , $ cacheDir ) ; foreach ( $ folder_path as $ element ) { $ base .= '/' . $ element ; if ( ! is_dir ( $ base ) ) { mkdir ( $ base , 0755 , true ) ; chmod ( $ base , 0755 ) ; } } }
docstring: Create the folder containing the cached images if it doesn't exist
  
  @param $base
  @param $cacheDir
docstring_tokens: Create the folder containing the cached images if it doesn t exist