diff --git a/freebox/api/v3/models/AirMedia/AirMediaConfig.php b/freebox/api/v3/models/AirMedia/AirMediaConfig.php index b3d3553..2ed9a67 100644 --- a/freebox/api/v3/models/AirMedia/AirMediaConfig.php +++ b/freebox/api/v3/models/AirMedia/AirMediaConfig.php @@ -1,6 +1,6 @@ country = $country; } -} \ No newline at end of file +} diff --git a/freebox/api/v3/models/Call/ContactEmail.php b/freebox/api/v3/models/Call/ContactEmail.php index 4493df3..07e98b2 100644 --- a/freebox/api/v3/models/Call/ContactEmail.php +++ b/freebox/api/v3/models/Call/ContactEmail.php @@ -1,6 +1,6 @@ allow_token_request = $allow_token_request; } -} \ No newline at end of file +} diff --git a/freebox/api/v3/models/Connection/DynDns/Config.php b/freebox/api/v3/models/Connection/DynDns/Config.php index 57cb943..a6b72f9 100644 --- a/freebox/api/v3/models/Connection/DynDns/Config.php +++ b/freebox/api/v3/models/Connection/DynDns/Config.php @@ -1,6 +1,6 @@ delegations = $delegations; } -} \ No newline at end of file +} diff --git a/freebox/api/v3/models/Connection/Ipv6/Delegation.php b/freebox/api/v3/models/Connection/Ipv6/Delegation.php index 35874da..49e305c 100644 --- a/freebox/api/v3/models/Connection/Ipv6/Delegation.php +++ b/freebox/api/v3/models/Connection/Ipv6/Delegation.php @@ -1,6 +1,6 @@ fullurl; } -} \ No newline at end of file +} diff --git a/freebox/api/v3/models/Freeplug/Freeplug.php b/freebox/api/v3/models/Freeplug/Freeplug.php index e7a89d8..69ac3f9 100644 --- a/freebox/api/v3/models/Freeplug/Freeplug.php +++ b/freebox/api/v3/models/Freeplug/Freeplug.php @@ -1,6 +1,6 @@ members; } -} \ No newline at end of file +} diff --git a/freebox/api/v3/models/FtpConfig.php b/freebox/api/v3/models/FtpConfig.php index cd25499..0aaf219 100644 --- a/freebox/api/v3/models/FtpConfig.php +++ b/freebox/api/v3/models/FtpConfig.php @@ -1,6 +1,6 @@ box_authenticated; } -} \ No newline at end of file +} diff --git a/freebox/api/v3/models/UPnP/UpnpAvConfig.php b/freebox/api/v3/models/UPnP/UpnpAvConfig.php index 42d3897..3a5d000 100644 --- a/freebox/api/v3/models/UPnP/UpnpAvConfig.php +++ b/freebox/api/v3/models/UPnP/UpnpAvConfig.php @@ -1,6 +1,6 @@ capabilites; + return $this->capabilities; } /** diff --git a/freebox/api/v3/models/WiFi/AccessPoint/APCapabilities.php b/freebox/api/v3/models/WiFi/AccessPoint/APCapabilities.php index 5cd8c71..e55beb0 100644 --- a/freebox/api/v3/models/WiFi/AccessPoint/APCapabilities.php +++ b/freebox/api/v3/models/WiFi/AccessPoint/APCapabilities.php @@ -1,6 +1,6 @@ toArray(); } -} \ No newline at end of file +} diff --git a/freebox/utils/rest/Rest.php b/freebox/utils/rest/Rest.php index 0e5e346..0ca26fa 100644 --- a/freebox/utils/rest/Rest.php +++ b/freebox/utils/rest/Rest.php @@ -80,7 +80,7 @@ class Rest extends alphayax\utils\Rest { $Model_xs = @$this->getCurlResponse()['result'] ?: []; /// Cast elements - if( ! empty( $className) && ! empty( $Model_xs) && is_subclass_of( $className, alphayax\freebox\api\v3\Model::class)) { + if( ! empty( $className) && ! empty( $Model_xs) && is_subclass_of( $className, alphayax\freebox\utils\Model::class)) { array_walk( $Model_xs, function( &$item, $key, $className){ $item = new $className( $item); }, $className); @@ -91,13 +91,13 @@ class Rest extends alphayax\utils\Rest { /** * @param string $className - * @return array|alphayax\freebox\api\v3\Model + * @return array|\alphayax\freebox\utils\Model */ public function getResult( $className = ''){ $Model = @$this->getCurlResponse()['result']; /// Cast element - if( ! empty( $className) && ! empty( $Model) && is_subclass_of( $className, alphayax\freebox\api\v3\Model::class) && is_array( $Model)){ + if( ! empty( $className) && ! empty( $Model) && is_subclass_of( $className, alphayax\freebox\utils\Model::class) && is_array( $Model)){ return new $className( $Model); } diff --git a/tests/Test.php b/tests/Test.php index 2d81eb0..b966cac 100644 --- a/tests/Test.php +++ b/tests/Test.php @@ -1,6 +1,6 @@