Merge pull request #23912 from mlutfy/reportVars
[civicrm-core.git] / CRM / Utils / File.php
index 493597cc005b2bf0dd1816987d5a5627b1040bb6..cdda9aa217a92b69825e989ce6e87e445bf08ec7 100644 (file)
@@ -293,7 +293,7 @@ class CRM_Utils_File {
   }
 
   /**
-   * @param string|NULL $dsn
+   * @param string|null $dsn
    *   Use NULL to load the default/active connection from CRM_Core_DAO.
    *   Otherwise, give a full DSN string.
    * @param string $fileName
@@ -312,7 +312,7 @@ class CRM_Utils_File {
 
   /**
    *
-   * @param string|NULL $dsn
+   * @param string|null $dsn
    * @param string $queryString
    * @param string $prefix
    * @param bool $dieOnErrors
@@ -377,7 +377,7 @@ class CRM_Utils_File {
   }
 
   /**
-   * @param $ext
+   * @param string $ext
    *
    * @return bool
    */
@@ -1124,9 +1124,10 @@ HTACCESS;
    * It should either return FALSE, or the value returned from is_dir().
    *
    * @param string|null $dir
-   * @return bool
+   * @return bool|null
+   *   In php8 the return value from is_dir() is always bool but in php7 it can be null.
    */
-  public static function isDir(?string $dir): bool {
+  public static function isDir(?string $dir) {
     set_error_handler(function($errno, $errstr) {
       // If this is open_basedir-related, convert it to an exception so we
       // can catch it.