Completed
Push — master ( 575823...f7fea2 )
by Stefano
02:38
created
Plugins/Hello_plugin/Hello_plugin.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@
 block discarded – undo
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 {
Please login to merge, or discard this patch.
Plugins/Radio_plugin/Radio_plugin.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
Plugins/Gcalendar_plugin/Gcalendar_plugin.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Plugins/Wemo_plugin/Wemo_plugin.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@
 block discarded – undo
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
         
Please login to merge, or discard this patch.
Core/JarvisPHP.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,8 +116,7 @@  discard block
 block discarded – undo
116 116
             JarvisLanguage::loadPluginTranslation($plugin_class);
117 117
             $plugin = new $plugin_class();
118 118
             $plugin->answer($command);
119
-        }
120
-        else {
119
+        } else {
121 120
             //Clear all session variable
122 121
             JarvisSession::reset();
123 122
             JarvisPHP::getLogger()->debug('Active session not detected or expired');
@@ -147,8 +146,7 @@  discard block
 block discarded – undo
147 146
                     JarvisTTS::speak(JarvisLanguage::translate('response_to_magic_words_to_stop_session'));
148 147
                     $response = new \JarvisPHP\Core\JarvisResponse(JarvisLanguage::translate('response_to_magic_words_to_stop_session'));
149 148
                     $response->send();
150
-                }
151
-                else {
149
+                } else {
152 150
                     JarvisBehaviourLanguage::loadBehaviourLanguage();
153 151
                     $answer = JarvisBehaviourLanguage::answer($command);
154 152
                     if($answer) {
Please login to merge, or discard this patch.
Plugins/Info_plugin/Info_plugin.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@
 block discarded – undo
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
         
Please login to merge, or discard this patch.