@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace JarvisPHP\Plugins\ActualOutsideTemperature_plugin; |
4 | 4 | |
5 | -use JarvisPHP\Core\JarvisSession; |
|
6 | 5 | use JarvisPHP\Core\JarvisPHP; |
7 | 6 | use JarvisPHP\Core\JarvisLanguage; |
8 | 7 | use JarvisPHP\Core\JarvisTTS; |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace JarvisPHP\Plugins\Gcalendar_plugin; |
4 | 4 | |
5 | -use JarvisPHP\Core\JarvisSession; |
|
6 | 5 | use JarvisPHP\Core\JarvisPHP; |
7 | 6 | use JarvisPHP\Core\JarvisLanguage; |
8 | 7 | use JarvisPHP\Core\JarvisTTS; |
@@ -39,7 +39,9 @@ |
||
39 | 39 | // Get the API client and construct the service object. |
40 | 40 | $client = Gcalendar_plugin::getClient(); |
41 | 41 | |
42 | - if($client==null) return null; |
|
42 | + if($client==null) { |
|
43 | + return null; |
|
44 | + } |
|
43 | 45 | |
44 | 46 | $service = new \Google_Service_Calendar($client); |
45 | 47 |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace JarvisPHP\Plugins\Hello_plugin; |
4 | 4 | |
5 | -use JarvisPHP\Core\JarvisSession; |
|
6 | 5 | use JarvisPHP\Core\JarvisPHP; |
7 | 6 | use JarvisPHP\Core\JarvisLanguage; |
8 | 7 | use JarvisPHP\Core\JarvisTTS; |
@@ -30,8 +30,7 @@ |
||
30 | 30 | if($hour>5 && $hour<=13) { |
31 | 31 | //Morning |
32 | 32 | $answer = JarvisLanguage::translate('hello_morning',get_called_class()); |
33 | - } |
|
34 | - else if($hour>13 && $hour<18) { |
|
33 | + } else if($hour>13 && $hour<18) { |
|
35 | 34 | //Afternoon |
36 | 35 | $answer = JarvisLanguage::translate('hello_afternoon',get_called_class()); |
37 | 36 | } else { |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace JarvisPHP\Plugins\InformationOn_plugin; |
4 | 4 | |
5 | -use JarvisPHP\Core\JarvisSession; |
|
6 | 5 | use JarvisPHP\Core\JarvisPHP; |
7 | 6 | use JarvisPHP\Core\JarvisLanguage; |
8 | 7 | use JarvisPHP\Core\JarvisTTS; |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace JarvisPHP\Plugins\Movie_plugin; |
4 | 4 | |
5 | -use JarvisPHP\Core\JarvisSession; |
|
6 | 5 | use JarvisPHP\Core\JarvisPHP; |
7 | 6 | use JarvisPHP\Core\JarvisLanguage; |
8 | 7 | use JarvisPHP\Core\JarvisTTS; |
@@ -2,10 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace JarvisPHP\Plugins\Radio_plugin; |
4 | 4 | |
5 | -use JarvisPHP\Core\JarvisSession; |
|
6 | 5 | use JarvisPHP\Core\JarvisPHP; |
7 | 6 | use JarvisPHP\Core\JarvisLanguage; |
8 | -use JarvisPHP\Core\JarvisTTS; |
|
9 | 7 | |
10 | 8 | /** |
11 | 9 | * Radio_plugin |
@@ -52,8 +52,7 @@ discard block |
||
52 | 52 | //Error handling |
53 | 53 | JarvisPHP::getLogger()->warn('Failed to connect!'); |
54 | 54 | $answer = 'Failed to connect!'; |
55 | - } |
|
56 | - else { |
|
55 | + } else { |
|
57 | 56 | $vlc_remote_command = 'stop'.chr(13); |
58 | 57 | $vlc_remote_command = 'quit'.chr(13); |
59 | 58 | socket_write($socket, $vlc_remote_command, strlen($vlc_remote_command)); |
@@ -75,8 +74,7 @@ discard block |
||
75 | 74 | //Error handling |
76 | 75 | JarvisPHP::getLogger()->warn('Failed to connect!'); |
77 | 76 | $answer = 'Failed to connect!'; |
78 | - } |
|
79 | - else { |
|
77 | + } else { |
|
80 | 78 | $vlc_remote_command = 'add '.$stream_url.chr(13); |
81 | 79 | socket_write($socket, $vlc_remote_command, strlen($vlc_remote_command)); |
82 | 80 | socket_close($socket); |
@@ -2,10 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace JarvisPHP\Plugins\RaspPIVolume_plugin; |
4 | 4 | |
5 | -use JarvisPHP\Core\JarvisSession; |
|
6 | 5 | use JarvisPHP\Core\JarvisPHP; |
7 | 6 | use JarvisPHP\Core\JarvisLanguage; |
8 | -use JarvisPHP\Core\JarvisTTS; |
|
9 | 7 | |
10 | 8 | /** |
11 | 9 | * RaspberryPI Volume Control Plugin |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace JarvisPHP\Plugins\Weather_plugin; |
4 | 4 | |
5 | -use JarvisPHP\Core\JarvisSession; |
|
6 | 5 | use JarvisPHP\Core\JarvisPHP; |
7 | 6 | use JarvisPHP\Core\JarvisLanguage; |
8 | 7 | use JarvisPHP\Core\JarvisTTS; |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace JarvisPHP\Plugins\Wemo_plugin; |
4 | 4 | |
5 | -use JarvisPHP\Core\JarvisSession; |
|
6 | 5 | use JarvisPHP\Core\JarvisPHP; |
7 | 6 | use JarvisPHP\Core\JarvisLanguage; |
8 | 7 | use JarvisPHP\Core\JarvisTTS; |
@@ -63,8 +63,7 @@ |
||
63 | 63 | if(!$result) { |
64 | 64 | JarvisPHP::getLogger()->error('Curl error: '.curl_error($ch)); |
65 | 65 | $answer = JarvisLanguage::translate('command_not_sent',get_called_class()); |
66 | - } |
|
67 | - else { |
|
66 | + } else { |
|
68 | 67 | $answer = JarvisLanguage::translate('command_sent_to_light_switch',get_called_class()); |
69 | 68 | } |
70 | 69 |