Completed
Push — master ( b11ab5...575823 )
by Stefano
11:07
created
Core/JarvisBehaviourLanguage.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -17,6 +17,9 @@
 block discarded – undo
17 17
 		}
18 18
 	}
19 19
 
20
+	/**
21
+	 * @param string $sentence
22
+	 */
20 23
 	public function answer($sentence) {
21 24
 		foreach(JarvisBehaviourLanguage::$jbl_set->rules as $rule) {
22 25
 			foreach($rule->matches as $match) {
Please login to merge, or discard this patch.
Plugins/ActualOutsideTemperature_plugin/ActualOutsideTemperature_plugin.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
     /**
56 56
      * Is it the right plugin for the command?
57 57
      * @param string $command
58
-     * @return boolean
58
+     * @return integer
59 59
      */
60 60
     function isLikely($command) {
61 61
         return preg_match(JarvisLanguage::translate('preg_match_activate_plugin',get_called_class()), $command);
Please login to merge, or discard this patch.
Plugins/CheckMail_plugin/CheckMail_plugin.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
     /**
69 69
      * Is it the right plugin for the command?
70 70
      * @param string $command
71
-     * @return boolean
71
+     * @return integer
72 72
      */
73 73
     function isLikely($command) {
74 74
         return preg_match(JarvisLanguage::translate('preg_match_activate_plugin',get_called_class()), $command);
Please login to merge, or discard this patch.
Plugins/Echo_plugin/Echo_plugin.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     /**
49 49
      * Is it the right plugin for the command?
50 50
      * @param string $command
51
-     * @return boolean
51
+     * @return integer
52 52
      */
53 53
     function isLikely($command) {
54 54
         return preg_match(JarvisLanguage::translate('preg_match_activate_plugin',get_called_class()), $command);
Please login to merge, or discard this patch.
Plugins/Gcalendar_plugin/Gcalendar_plugin.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     /**
84 84
      * Is it the right plugin for the command?
85 85
      * @param string $command
86
-     * @return boolean
86
+     * @return integer
87 87
      */
88 88
     function isLikely($command) {
89 89
         return preg_match(JarvisLanguage::translate('preg_match_activate_plugin',get_called_class()), $command);
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
     /**
101 101
      * Returns an authorized API client.
102
-     * @return Google_Client the authorized client object
102
+     * @return null|\Google_Client the authorized client object
103 103
      */
104 104
     function getClient() {
105 105
       $client = new \Google_Client();
Please login to merge, or discard this 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/Hello_plugin/Hello_plugin.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
     /**
57 57
      * Is it the right plugin for the command?
58 58
      * @param string $command
59
-     * @return boolean
59
+     * @return integer
60 60
      */
61 61
     function isLikely($command) {
62 62
         return preg_match(JarvisLanguage::translate('preg_match_activate_plugin',get_called_class()), $command);
Please login to merge, or discard this 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/Info_plugin/Info_plugin.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
     /**
52 52
      * Is it the right plugin for the command?
53 53
      * @param string $command
54
-     * @return boolean
54
+     * @return integer
55 55
      */
56 56
     function isLikely($command) {
57 57
         return preg_match(JarvisLanguage::translate('preg_match_activate_plugin',get_called_class()), $command);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@
 block discarded – undo
30 30
             JarvisPHP::getLogger()->debug('User says: '.$command);
31 31
             $answer = 'Ok, i am on '. php_uname();
32 32
             JarvisSession::terminate();
33
-        }
34
-        else {
33
+        } else {
35 34
             JarvisPHP::getLogger()->debug('Answering to command: "'.$command.'"');
36 35
             $answer = sprintf(JarvisLanguage::translate('my_name_is',get_called_class()),_SYSTEM_NAME, $_SERVER['SERVER_NAME'],$_SERVER['SERVER_ADDR']);
37 36
             
Please login to merge, or discard this patch.
Plugins/InformationOn_plugin/InformationOn_plugin.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     /**
58 58
      * Is it the right plugin for the command?
59 59
      * @param string $command
60
-     * @return boolean
60
+     * @return integer
61 61
      */
62 62
     function isLikely($command) {
63 63
         return preg_match(JarvisLanguage::translate('preg_match_activate_plugin',get_called_class()), $command);
Please login to merge, or discard this patch.
Plugins/Movie_plugin/Movie_plugin.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
     /**
70 70
      * Is it the right plugin for the command?
71 71
      * @param string $command
72
-     * @return boolean
72
+     * @return integer
73 73
      */
74 74
     function isLikely($command) {
75 75
         return preg_match(JarvisLanguage::translate('preg_match_activate_plugin',get_called_class()), $command);
Please login to merge, or discard this patch.