From 6049929b3e72ec073aaa1225ee6774bfe7f4d03e Mon Sep 17 00:00:00 2001 From: "Michael K. Squires" Date: Mon, 17 Oct 2016 11:53:27 -0500 Subject: [PATCH] GitHub #102 - Scene isActive now always returns null --- examples/list-scenes.php | 4 ++-- library/Phue/Scene.php | 6 ++++-- tests/Phue/Test/SceneTest.php | 13 +------------ 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/examples/list-scenes.php b/examples/list-scenes.php index ca57b15..6e8823f 100644 --- a/examples/list-scenes.php +++ b/examples/list-scenes.php @@ -11,6 +11,6 @@ echo 'Listing scenes:', "\n"; foreach ($client->getScenes() as $scene) { - echo "\t", "#{$scene->getId()} - {$scene->getName()}", "\n", "\t\t", "Light Ids: ", implode( - ', ', $scene->getLightIds()), "\n", "\t\t", "Is active: ", $scene->isActive() ? 'Yes' : 'No', "\n"; + echo "\t", "#{$scene->getId()} - {$scene->getName()}", "\n", + "\t\t", "Light Ids: ", implode(', ', $scene->getLightIds()), "\n"; } diff --git a/library/Phue/Scene.php b/library/Phue/Scene.php index 1a214de..57fc136 100644 --- a/library/Phue/Scene.php +++ b/library/Phue/Scene.php @@ -85,11 +85,13 @@ public function getLightIds() /** * Is active * - * @return bool True if active, false if not + * @deprecated + * + * @return null This is now deprecated */ public function isActive() { - return (bool) $this->attributes->active; + return null; } /** diff --git a/tests/Phue/Test/SceneTest.php b/tests/Phue/Test/SceneTest.php index 7fd638e..c9634a3 100644 --- a/tests/Phue/Test/SceneTest.php +++ b/tests/Phue/Test/SceneTest.php @@ -39,8 +39,7 @@ public function setUp() 2, 3, 5 - ), - 'active' => true + ) ); // Create scene object @@ -77,16 +76,6 @@ public function testGetLightIds() $this->assertEquals($this->attributes->lights, $this->scene->getLightIds()); } - /** - * Test: Is active - * - * @covers \Phue\Scene::isActive - */ - public function testIsActive() - { - $this->assertEquals($this->attributes->active, $this->scene->isActive()); - } - /** * Test: toString *