Completed
Push — master ( 54d687...7bf2c4 )
by
unknown
02:04
created
src/Core/Send.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     /** \brief Add a user to the database.
20 20
      * \details Add a user to the database in Bot::$user_table table and Bot::$id_column column using Bot::$pdo connection.
21 21
      * @param $chat_id chat_id of the user to add.
22
-     * @return True on success.
22
+     * @return boolean on success.
23 23
      */
24 24
     public function addUser($chat_id) : bool {
25 25
 
Please login to merge, or discard this patch.
src/Database/DatabaseHandler.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
      * \details Provides a simpler way to initialize a database connection 
9 9
      *  and create a PDO instance.
10 10
      * @param $params Parameters for initialize connection.
11
-     * @return True on success.
11
+     * @return boolean on success.
12 12
      */
13 13
     public function connect($params) {
14 14
         try {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     /** \brief Add a user to the database.
68 68
      * \details Add a user to the database in Bot::$user_table table and Bot::$id_column column using Bot::$pdo connection.
69 69
      * @param $chat_id chat_id of the user to add.
70
-     * @return True on success.
70
+     * @return boolean on success.
71 71
      */
72 72
     public function addUser($chat_id) : bool {
73 73
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     }
27 27
 
28 28
     protected function mergeWithDefaults($params) {
29
-        $DEFAULTS = [ 'adapter' => 'mysql', 'host' => 'localhost' ];
29
+        $DEFAULTS = ['adapter' => 'mysql', 'host' => 'localhost'];
30 30
         return array_merge($DEFAULTS, $params);
31 31
     }
32 32
 
Please login to merge, or discard this patch.
src/Database/LongPolling.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      * \brief (<i>Internal</i>)Get first update offset in redis.
15 15
      * \details Called by getUpdatesRedis to get the offset saved in redis or to get it from telegram and save it in redis.
16 16
      * @param $offset_key Name of the variable where the offset is saved on Redis
17
-     * @return Id of the first update to process.
17
+     * @return integer of the first update to process.
18 18
      */
19 19
     protected function getUpdateOffsetRedis(string $offset_key) : int {
20 20
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      * \details Called by getUpdatesDatabase to get the offset saved in database or to get it from telegram and save it in database.
103 103
      * @param $table_name Name of the table where offset is saved in the database
104 104
      * @param $column_name Name of the column where the offset is saved in the database
105
-     * @return Id of the first update to process.
105
+     * @return integer of the first update to process.
106 106
      */
107 107
     protected function getUpdateOffsetDatabase(string $table_name, string $column_name) : int {
108 108
 
Please login to merge, or discard this patch.
src/Core/Updates.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -462,7 +462,7 @@
 block discarded – undo
462 462
 
463 463
         // Exec getUpdates
464 464
         $this->exec_curl_request('getUpdates?' . http_build_query($parameters)
465
-                                               . '&allowed_updates=' . $updates_string);
465
+                                                . '&allowed_updates=' . $updates_string);
466 466
 
467 467
     }
468 468
 
Please login to merge, or discard this patch.
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.