From 5516fefb1c810bbef2302f61ad2863745e0866fd Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Wed, 14 Jun 2023 11:06:55 +0000
Subject: [PATCH] Release version 2.0

---
 src/UcrmAttributes.php |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/UcrmAttributes.php b/src/UcrmAttributes.php
index 5782706..dfe9d28 100644
--- a/src/UcrmAttributes.php
+++ b/src/UcrmAttributes.php
@@ -3,10 +3,10 @@
 namespace SIPL\UCRM\wFirma;
 
 class UcrmAttributes {
-	protected $attributesFile;
-	protected $api;
+	protected string $attributesFile;
+	protected \Ubnt\UcrmPluginSdk\Service\UcrmApi $api;
 
-	protected static $definition = [
+	protected static array $definition = [
 		'wFirma Customer ID' => [
 			'code' => 'client',
 			'type' => 'client',
@@ -20,7 +20,7 @@
 			'type' => 'payment',
 		],
 	];
-	protected $ids = [];
+	protected array $ids = [];
 
 	function __construct(UcrmHelper $ucrmHelper) {
 		$this->attributesFile = $ucrmHelper->getRootDirectory() . '/data/attributes.json';
@@ -41,7 +41,7 @@
 		return $this->ids[$attributeCode];
 	}
 
-	function updateMapping() {
+	function updateMapping(): bool {
 		$attributes = $this->api->get('/custom-attributes');
 		foreach ($attributes as $attribute) {
 			$data = self::$definition[$attribute['name']] ?? NULL;
@@ -71,7 +71,7 @@
 		return $changed;
 	}
 
-	function saveMapping() {
+	function saveMapping(): void {
 		if (!is_dir(dirname($this->attributesFile))) {
 			mkdir(dirname($this->attributesFile));
 		}

--
Gitblit v1.10.0