From 9561b6661389ae052403309c9fc9541480197b94 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Thu, 6 Apr 2023 17:58:53 -0700 Subject: [PATCH] Add return types and docblock --- tests/Support/Settings.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/Support/Settings.php b/tests/Support/Settings.php index e0b997054..5061c461d 100644 --- a/tests/Support/Settings.php +++ b/tests/Support/Settings.php @@ -7,28 +7,31 @@ use App\Models\Setting; class Settings { private Setting $setting; - + private function __construct() { $this->setting = Setting::factory()->create(); } - public static function initialize() + public static function initialize(): Settings { return new self(); } - public function enableMultipleFullCompanySupport() + public function enableMultipleFullCompanySupport(): void { $this->update(['full_multiple_companies_support' => 1]); } - public function set(array $attributes) + /** + * @param array $attributes Attributes to modify in the application's settings. + */ + public function set(array $attributes): void { $this->update($attributes); } - private function update(array $attributes) + private function update(array $attributes): void { Setting::unguarded(fn() => $this->setting->update($attributes)); Setting::$_cache = null;