From aa4be46c082356f4267c400356417cac8d3c8470 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Mon, 28 Jan 2019 19:17:39 +0000 Subject: [PATCH] Added missing throws doc (#330) --- src/Dotenv.php | 8 ++++++++ src/Loader.php | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/Dotenv.php b/src/Dotenv.php index 22fc0f18..775bd9b7 100644 --- a/src/Dotenv.php +++ b/src/Dotenv.php @@ -43,6 +43,8 @@ public function __construct($path, $file = '.env') /** * Load environment file in given directory. * + * @throws \Dotenv\Exception\InvalidPathException|\Dotenv\Exception\InvalidFileException + * * @return array */ public function load() @@ -53,6 +55,8 @@ public function load() /** * Load environment file in given directory, suppress InvalidPathException. * + * @throws \Dotenv\Exception\InvalidFileException + * * @return array */ public function safeLoad() @@ -68,6 +72,8 @@ public function safeLoad() /** * Load environment file in given directory. * + * @throws \Dotenv\Exception\InvalidPathException|\Dotenv\Exception\InvalidFileException + * * @return array */ public function overload() @@ -99,6 +105,8 @@ protected function getFilePath($path, $file) * * @param bool $overload * + * @throws \Dotenv\Exception\InvalidPathException|\Dotenv\Exception\InvalidFileException + * * @return array */ protected function loadData($overload = false) diff --git a/src/Loader.php b/src/Loader.php index f0dc8b9b..52c377fc 100644 --- a/src/Loader.php +++ b/src/Loader.php @@ -75,6 +75,8 @@ public function getImmutable() /** * Load `.env` file in given directory. * + * @throws \Dotenv\Exception\InvalidPathException|\Dotenv\Exception\InvalidFileException + * * @return array */ public function load() @@ -118,6 +120,8 @@ protected function ensureFileIsReadable() * @param string $name * @param string $value * + * @throws \Dotenv\Exception\InvalidFileException + * * @return array */ protected function normaliseEnvironmentVariable($name, $value) @@ -137,6 +141,8 @@ protected function normaliseEnvironmentVariable($name, $value) * @param string $name * @param string $value * + * @throws \Dotenv\Exception\InvalidFileException + * * @return array */ public function processFilters($name, $value) @@ -358,6 +364,8 @@ public function getEnvironmentVariable($name) * @param string $name * @param string|null $value * + * @throws \Dotenv\Exception\InvalidFileException + * * @return void */ public function setEnvironmentVariable($name, $value = null)