Merge pull request #5090 from colemanw/explorer
[civicrm-core.git] / CRM / Utils / Zip.php
index 2499aec9fbf84ad1b920b8da106fed7e7c12999c..078bab427ecb0cd0cdc5f51da3aedc0127b442c3 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -61,7 +61,8 @@ class CRM_Utils_Zip {
         else {
           return FALSE;
         }
-      }  elseif (0 != substr_compare($base, $filename, 0, $baselen)) {
+      }
+      elseif (0 != substr_compare($base, $filename, 0, $baselen)) {
         return FALSE;
       }
     }
@@ -92,12 +93,13 @@ class CRM_Utils_Zip {
   }
 
   /**
-   * Determine the name of the folder within a zip
+   * Determine the name of the folder within a zip.
    *
    * @param ZipArchive $zip
    * @param $expected
    *
-   * @return string or FALSE
+   * @return string
+   *   or FALSE
    */
   static public function guessBasedir(ZipArchive $zip, $expected) {
     $candidate = FALSE;
@@ -121,11 +123,11 @@ class CRM_Utils_Zip {
    * An inefficient helper for creating a ZIP file from data in memory.
    * This is only intended for building temp files for unit-testing.
    *
-   * @param $zipName
-   *   String, file name.
-   * @param $dirs
+   * @param string $zipName
+   *   file name.
+   * @param array $dirs
    *   Array, list of directory paths.
-   * @param $files
+   * @param array $files
    *   Array, keys are file names and values are file contents.
    * @return bool
    */
@@ -150,4 +152,5 @@ class CRM_Utils_Zip {
     }
     return TRUE;
   }
+
 }