Add explicit `return null;` statements
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / template / TemplateEngine.class.php
index a910ef33e7835f4840dcabd5219309044b1ea868..cbf84b053771d61bd78c460a820b48b50227bc3e 100755 (executable)
@@ -801,12 +801,12 @@ class TemplateEngine extends SingletonFactory
      *
      * @param string $templateName
      * @param string $filename
-     * @return  array
+     * @return  array|null
      */
     protected function getMetaData($templateName, $filename)
     {
         if (!\file_exists($filename) || !\is_readable($filename)) {
-            return;
+            return null;
         }
 
         // get file contents
@@ -815,7 +815,7 @@ class TemplateEngine extends SingletonFactory
         // find first newline
         $position = \strpos($contents, "\n");
         if ($position === false) {
-            return;
+            return null;
         }
 
         // cut contents
@@ -824,7 +824,7 @@ class TemplateEngine extends SingletonFactory
         // read serializes data
         $data = @\unserialize($contents);
         if ($data === false || !\is_array($data)) {
-            return;
+            return null;
         }
 
         return $data;