Completed
Push — master ( ed6650...694f1b )
by Danilo
02:12
created
src/Commands/CommandHandler.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,15 +5,15 @@
 block discarded – undo
5 5
 // Use to sort _command_types based on prior
6 6
 function sortingPrior($a, $b) {
7 7
 
8
-    if($a['prior'] > $b['prior'])
8
+    if ($a['prior'] > $b['prior'])
9 9
 
10 10
         return 1;
11 11
 
12
-    if($a['prior'] < $b['prior'])
12
+    if ($a['prior'] < $b['prior'])
13 13
 
14 14
         return -1;
15 15
 
16
-    if($a['prior'] == $b['prior'])
16
+    if ($a['prior'] == $b['prior'])
17 17
 
18 18
         return 0;
19 19
 
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,17 +5,20 @@
 block discarded – undo
5 5
 // Use to sort _command_types based on prior
6 6
 function sortingPrior($a, $b) {
7 7
 
8
-    if($a['prior'] > $b['prior'])
9
-
8
+    if($a['prior'] > $b['prior']) {
9
+    
10 10
         return 1;
11
+    }
11 12
 
12
-    if($a['prior'] < $b['prior'])
13
-
13
+    if($a['prior'] < $b['prior']) {
14
+    
14 15
         return -1;
16
+    }
15 17
 
16
-    if($a['prior'] == $b['prior'])
17
-
18
+    if($a['prior'] == $b['prior']) {
19
+    
18 20
         return 0;
21
+    }
19 22
 
20 23
 }
21 24
 
Please login to merge, or discard this patch.
src/Entities/EntityAccess.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,9 @@
 block discarded – undo
36 36
         $method = Text::camelCase("get $offset");
37 37
 
38 38
         // If it exists, call it and return its return value
39
-        if (method_exists($this, $method)) return $this->{$method}();
39
+        if (method_exists($this, $method)) {
40
+            return $this->{$method}();
41
+        }
40 42
 
41 43
         // If not return the data from the array after checking it is set
42 44
         return isset($this->container[$offset]) ? $this->container[$offset] : null;
Please login to merge, or discard this patch.
src/Core/Send.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,6 +4,9 @@  discard block
 block discarded – undo
4 4
 
5 5
 trait Send {
6 6
 
7
+    /**
8
+     * @param string $url
9
+     */
7 10
     abstract protected function exec_curl_request($url, $method);
8 11
 
9 12
     /**
@@ -200,7 +203,7 @@  discard block
 block discarded – undo
200 203
      * - <code>record_audio</code> or <code>upload_audio</code> for audio files
201 204
      * - <code>upload_document</code> for general files
202 205
      * - <code>find_location</code> for location data
203
-     * @return True on success.
206
+     * @return boolean on success.
204 207
      */
205 208
     public function sendChatAction(string $action) : bool {
206 209
 
Please login to merge, or discard this patch.
src/Core/Updates.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -4,6 +4,9 @@
 block discarded – undo
4 4
 
5 5
 trait Updates {
6 6
 
7
+    /**
8
+     * @param string $url
9
+     */
7 10
     abstract protected function exec_curl_request($url, $method);
8 11
 
9 12
     /**
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 
82 82
         // Exec getUpdates
83 83
         $this->exec_curl_request('getUpdates?' . http_build_query($parameters)
84
-                                               . '&allowed_updates=' . json_encode($allowed_updates));
84
+                                                . '&allowed_updates=' . json_encode($allowed_updates));
85 85
 
86 86
     }
87 87
 
Please login to merge, or discard this patch.
src/Localization/File.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      * \brief Load a localization file into the localized strings array.
34 34
      * @param $lang Language to load.
35 35
      * @param $dir Directory in which there are the JSON files.
36
-     * @return True if loaded. False if already loaded.
36
+     * @return boolean if loaded. False if already loaded.
37 37
      */
38 38
     protected function loadSingleLanguage(string $lang = 'en', $dir = './localization') : bool {
39 39
 
Please login to merge, or discard this patch.
src/Localization/Language.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
      * It also change $language parameter of the bot to the language returned.
87 87
      * @param $default_language <i>Optional</i>. Default language to return in case of errors.
88 88
      * @param $expiring_time <i>Optional</i>. Set the expiring time for the language on redis each time it is took from the sql database.
89
-     * @return Language for the current user, $default_language on errors.
89
+     * @return string for the current user, $default_language on errors.
90 90
      */
91 91
     public function getLanguageRedis($default_language = 'en', $expiring_time = '86400') : string {
92 92
 
Please login to merge, or discard this patch.
src/Core/Chat.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -4,6 +4,9 @@
 block discarded – undo
4 4
 
5 5
 trait Updates {
6 6
 
7
+    /**
8
+     * @param string $url
9
+     */
7 10
     abstract protected function exec_curl_request($url, $method);
8 11
 
9 12
     /**
Please login to merge, or discard this patch.
src/Core/Edit.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -4,6 +4,9 @@
 block discarded – undo
4 4
 
5 5
 trait Updates {
6 6
 
7
+    /**
8
+     * @param string $url
9
+     */
7 10
     abstract protected function exec_curl_request($url, $method);
8 11
 
9 12
     /**
Please login to merge, or discard this patch.
src/Core/Inline.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -4,6 +4,9 @@
 block discarded – undo
4 4
 
5 5
 trait Updates {
6 6
 
7
+    /**
8
+     * @param string $url
9
+     */
7 10
     abstract protected function exec_curl_request($url, $method);
8 11
 
9 12
     /**
Please login to merge, or discard this patch.