@@ -1,13 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -use Route4Me\Common; |
|
5 | -/** |
|
6 | - * class MyQ |
|
7 | - * |
|
8 | - * Offers authentication to MyQ API, and access to garage door open/close/status functions |
|
9 | - * |
|
10 | - */ |
|
4 | + |
|
11 | 5 | class MyQException extends \Exception {} |
12 | 6 | class MyQ { |
13 | 7 |
@@ -167,16 +167,16 @@ |
||
167 | 167 | $this->_deviceId = $device->MyQDeviceId; |
168 | 168 | foreach ($device->Attributes as $attr) { |
169 | 169 | switch ($attr->AttributeDisplayName) { |
170 | - case 'desc': |
|
171 | - $this->_doorName = $attr->Value; |
|
172 | - break; |
|
173 | - case 'doorstate': |
|
174 | - $this->_doorState = $attr->Value; |
|
175 | - // UpdatedTime is a timestamp in ms, so we truncate |
|
176 | - $this->_doorStateTime = (int)$attr->UpdatedTime / 1000; |
|
177 | - break; |
|
178 | - default: |
|
179 | - continue; |
|
170 | + case 'desc': |
|
171 | + $this->_doorName = $attr->Value; |
|
172 | + break; |
|
173 | + case 'doorstate': |
|
174 | + $this->_doorState = $attr->Value; |
|
175 | + // UpdatedTime is a timestamp in ms, so we truncate |
|
176 | + $this->_doorStateTime = (int)$attr->UpdatedTime / 1000; |
|
177 | + break; |
|
178 | + default: |
|
179 | + continue; |
|
180 | 180 | } |
181 | 181 | } |
182 | 182 | } |