]> git.mxchange.org Git - core.git/blobdiff - framework/bootstrap/class_FrameworkBootstrap.php
Continued:
[core.git] / framework / bootstrap / class_FrameworkBootstrap.php
index 0e0cdb6a917259b31b7040b6a64999d67c464092..9f376df51ba254807866e0160364ccd306620950 100644 (file)
@@ -449,18 +449,11 @@ final class FrameworkBootstrap {
         *
         * @param       $timezone       The timezone string (e.g. Europe/Berlin)
         * @return      $success        If timezone was accepted
-        * @throws      NullPointerException    If $timezone is NULL
         * @throws      InvalidArgumentException        If $timezone is empty
         */
-       public static function setDefaultTimezone ($timezone) {
-               // Is it null?
-               if (is_null($timezone)) {
-                       // Throw NPE
-                       throw new NullPointerException(NULL, BaseFrameworkSystem::EXCEPTION_IS_NULL_POINTER);
-               } elseif (!is_string($timezone)) {
-                       // Is not a string
-                       throw new InvalidArgumentException(sprintf('timezone[]=%s is not a string', gettype($timezone)));
-               } elseif ((is_string($timezone)) && (empty($timezone))) {
+       public static function setDefaultTimezone (string $timezone) {
+               // Is it set?
+               if (empty($timezone)) {
                        // Entry is empty
                        throw new InvalidArgumentException('timezone is empty');
                }