Passed
Push — main ( 4af278...3f64e8 )
by Miaad
01:24
created
types/videoNote.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -8,32 +8,32 @@
 block discarded – undo
8 8
  * This object represents a video message (available in Telegram apps as of v.4.0).
9 9
  */
10 10
 class videoNote extends types {
11
-	/** Keep all of properties which has sub properties */
12
-	private const subs = ['thumb' => 'BPT\types\photoSize'];
11
+    /** Keep all of properties which has sub properties */
12
+    private const subs = ['thumb' => 'BPT\types\photoSize'];
13 13
 
14
-	/** Identifier for this file, which can be used to download or reuse the file */
15
-	public string $file_id;
14
+    /** Identifier for this file, which can be used to download or reuse the file */
15
+    public string $file_id;
16 16
 
17
-	/**
18
-	 * Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be
19
-	 * used to download or reuse the file.
20
-	 */
21
-	public string $file_unique_id;
17
+    /**
18
+     * Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be
19
+     * used to download or reuse the file.
20
+     */
21
+    public string $file_unique_id;
22 22
 
23
-	/** Video width and height (diameter of the video message) as defined by sender */
24
-	public int $length;
23
+    /** Video width and height (diameter of the video message) as defined by sender */
24
+    public int $length;
25 25
 
26
-	/** Duration of the video in seconds as defined by sender */
27
-	public int $duration;
26
+    /** Duration of the video in seconds as defined by sender */
27
+    public int $duration;
28 28
 
29
-	/** Optional. Video thumbnail */
30
-	public photoSize $thumb;
29
+    /** Optional. Video thumbnail */
30
+    public photoSize $thumb;
31 31
 
32
-	/** Optional. File size in bytes */
33
-	public int $file_size;
32
+    /** Optional. File size in bytes */
33
+    public int $file_size;
34 34
 
35 35
 
36
-	public function __construct(stdClass $update) {
37
-		parent::__construct($update, self::subs);
38
-	}
36
+    public function __construct(stdClass $update) {
37
+        parent::__construct($update, self::subs);
38
+    }
39 39
 }
Please login to merge, or discard this patch.
types/loginUrl.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -11,33 +11,33 @@
 block discarded – undo
11 11
  * Telegram apps support these buttons as of version 5.7.
12 12
  */
13 13
 class loginUrl extends types {
14
-	/** Keep all of properties which has sub properties */
15
-	private const subs = [];
16
-
17
-	/**
18
-	 * An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If
19
-	 * the user refuses to provide authorization data, the original URL without information about the user will be
20
-	 * opened. The data added is the same as described in Receiving authorization data.NOTE: You must always check
21
-	 * the hash of the received data to verify the authentication and the integrity of the data as described in
22
-	 * Checking authorization.
23
-	 */
24
-	public string $url;
25
-
26
-	/** Optional. New text of the button in forwarded messages. */
27
-	public string $forward_text;
28
-
29
-	/**
30
-	 * Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details.
31
-	 * If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain
32
-	 * linked with the bot. See Linking your domain to the bot for more details.
33
-	 */
34
-	public string $bot_username;
35
-
36
-	/** Optional. Pass True to request the permission for your bot to send messages to the user. */
37
-	public bool $request_write_access;
38
-
39
-
40
-	public function __construct(stdClass $update) {
41
-		parent::__construct($update, self::subs);
42
-	}
14
+    /** Keep all of properties which has sub properties */
15
+    private const subs = [];
16
+
17
+    /**
18
+     * An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If
19
+     * the user refuses to provide authorization data, the original URL without information about the user will be
20
+     * opened. The data added is the same as described in Receiving authorization data.NOTE: You must always check
21
+     * the hash of the received data to verify the authentication and the integrity of the data as described in
22
+     * Checking authorization.
23
+     */
24
+    public string $url;
25
+
26
+    /** Optional. New text of the button in forwarded messages. */
27
+    public string $forward_text;
28
+
29
+    /**
30
+     * Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details.
31
+     * If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain
32
+     * linked with the bot. See Linking your domain to the bot for more details.
33
+     */
34
+    public string $bot_username;
35
+
36
+    /** Optional. Pass True to request the permission for your bot to send messages to the user. */
37
+    public bool $request_write_access;
38
+
39
+
40
+    public function __construct(stdClass $update) {
41
+        parent::__construct($update, self::subs);
42
+    }
43 43
 }
Please login to merge, or discard this patch.
types/shippingQuery.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,23 +8,23 @@
 block discarded – undo
8 8
  * This object contains information about an incoming shipping query.
9 9
  */
10 10
 class shippingQuery extends types {
11
-	/** Keep all of properties which has sub properties */
12
-	private const subs = ['from' => 'BPT\types\user', 'shipping_address' => 'BPT\types\shippingAddress'];
11
+    /** Keep all of properties which has sub properties */
12
+    private const subs = ['from' => 'BPT\types\user', 'shipping_address' => 'BPT\types\shippingAddress'];
13 13
 
14
-	/** Unique query identifier */
15
-	public string $id;
14
+    /** Unique query identifier */
15
+    public string $id;
16 16
 
17
-	/** User who sent the query */
18
-	public user $from;
17
+    /** User who sent the query */
18
+    public user $from;
19 19
 
20
-	/** Bot specified invoice payload */
21
-	public string $invoice_payload;
20
+    /** Bot specified invoice payload */
21
+    public string $invoice_payload;
22 22
 
23
-	/** User specified shipping address */
24
-	public shippingAddress $shipping_address;
23
+    /** User specified shipping address */
24
+    public shippingAddress $shipping_address;
25 25
 
26 26
 
27
-	public function __construct(stdClass $update) {
28
-		parent::__construct($update, self::subs);
29
-	}
27
+    public function __construct(stdClass $update) {
28
+        parent::__construct($update, self::subs);
29
+    }
30 30
 }
Please login to merge, or discard this patch.
types/passportElementErrorFrontSide.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -9,26 +9,26 @@
 block discarded – undo
9 9
  * front side of the document changes.
10 10
  */
11 11
 class passportElementErrorFrontSide extends types {
12
-	/** Keep all of properties which has sub properties */
13
-	private const subs = [];
12
+    /** Keep all of properties which has sub properties */
13
+    private const subs = [];
14 14
 
15
-	/** Error source, must be front_side */
16
-	public string $source;
15
+    /** Error source, must be front_side */
16
+    public string $source;
17 17
 
18
-	/**
19
-	 * The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”,
20
-	 * “identity_card”, “internal_passport”
21
-	 */
22
-	public string $type;
18
+    /**
19
+     * The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”,
20
+     * “identity_card”, “internal_passport”
21
+     */
22
+    public string $type;
23 23
 
24
-	/** Base64-encoded hash of the file with the front side of the document */
25
-	public string $file_hash;
24
+    /** Base64-encoded hash of the file with the front side of the document */
25
+    public string $file_hash;
26 26
 
27
-	/** Error message */
28
-	public string $message;
27
+    /** Error message */
28
+    public string $message;
29 29
 
30 30
 
31
-	public function __construct(stdClass $update) {
32
-		parent::__construct($update, self::subs);
33
-	}
31
+    public function __construct(stdClass $update) {
32
+        parent::__construct($update, self::subs);
33
+    }
34 34
 }
Please login to merge, or discard this patch.
types/types.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -8,22 +8,22 @@
 block discarded – undo
8 8
  * base class of all type classes
9 9
  */
10 10
 class types {
11
-	public function __toString(): string {
12
-		return json_encode($this);
13
-	}
11
+    public function __toString(): string {
12
+        return json_encode($this);
13
+    }
14 14
 
15 15
 
16
-	public function __construct(stdClass $update, array $subs = []) {
17
-		foreach ($update as $key=>$value) {
18
-		    if (isset($subs[$key])) {
19
-		        $this->$key = new ($subs[$key]) ($value);
20
-		    }
21
-		    else {
22
-		        $this->$key = $value;
23
-		        if (ucfirst($key) === basename(get_class($this)).'_id') {
24
-		            $this->{'id'} = $value;
25
-		        }
26
-		    }
27
-		}
28
-	}
16
+    public function __construct(stdClass $update, array $subs = []) {
17
+        foreach ($update as $key=>$value) {
18
+            if (isset($subs[$key])) {
19
+                $this->$key = new ($subs[$key]) ($value);
20
+            }
21
+            else {
22
+                $this->$key = $value;
23
+                if (ucfirst($key) === basename(get_class($this)).'_id') {
24
+                    $this->{'id'} = $value;
25
+                }
26
+            }
27
+        }
28
+    }
29 29
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
 		foreach ($update as $key=>$value) {
18 18
 		    if (isset($subs[$key])) {
19 19
 		        $this->$key = new ($subs[$key]) ($value);
20
-		    }
21
-		    else {
20
+		    } else {
22 21
 		        $this->$key = $value;
23 22
 		        if (ucfirst($key) === basename(get_class($this)).'_id') {
24 23
 		            $this->{'id'} = $value;
Please login to merge, or discard this patch.
types/menuButton.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@
 block discarded – undo
8 8
  * This object describes the bot's menu button in a private chat. It should be one of
9 9
  */
10 10
 class menuButton extends types {
11
-	/** Keep all of properties which has sub properties */
12
-	private const subs = [];
11
+    /** Keep all of properties which has sub properties */
12
+    private const subs = [];
13 13
 
14
-	public function __construct(stdClass $update) {
15
-		parent::__construct($update, self::subs);
16
-	}
14
+    public function __construct(stdClass $update) {
15
+        parent::__construct($update, self::subs);
16
+    }
17 17
 }
Please login to merge, or discard this patch.
types/passportElementErrorUnspecified.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,23 +8,23 @@
 block discarded – undo
8 8
  * Represents an issue in an unspecified place. The error is considered resolved when new data is added.
9 9
  */
10 10
 class passportElementErrorUnspecified extends types {
11
-	/** Keep all of properties which has sub properties */
12
-	private const subs = [];
11
+    /** Keep all of properties which has sub properties */
12
+    private const subs = [];
13 13
 
14
-	/** Error source, must be unspecified */
15
-	public string $source;
14
+    /** Error source, must be unspecified */
15
+    public string $source;
16 16
 
17
-	/** Type of element of the user's Telegram Passport which has the issue */
18
-	public string $type;
17
+    /** Type of element of the user's Telegram Passport which has the issue */
18
+    public string $type;
19 19
 
20
-	/** Base64-encoded element hash */
21
-	public string $element_hash;
20
+    /** Base64-encoded element hash */
21
+    public string $element_hash;
22 22
 
23
-	/** Error message */
24
-	public string $message;
23
+    /** Error message */
24
+    public string $message;
25 25
 
26 26
 
27
-	public function __construct(stdClass $update) {
28
-		parent::__construct($update, self::subs);
29
-	}
27
+    public function __construct(stdClass $update) {
28
+        parent::__construct($update, self::subs);
29
+    }
30 30
 }
Please login to merge, or discard this patch.
types/maskPosition.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -8,32 +8,32 @@
 block discarded – undo
8 8
  * This object describes the position on faces where a mask should be placed by default.
9 9
  */
10 10
 class maskPosition extends types {
11
-	/** Keep all of properties which has sub properties */
12
-	private const subs = [];
13
-
14
-	/**
15
-	 * The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”,
16
-	 * “mouth”, or “chin”.
17
-	 */
18
-	public string $point;
19
-
20
-	/**
21
-	 * Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example,
22
-	 * choosing -1.0 will place mask just to the left of the default mask position.
23
-	 */
24
-	public float $x_shift;
25
-
26
-	/**
27
-	 * Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0
28
-	 * will place the mask just below the default mask position.
29
-	 */
30
-	public float $y_shift;
31
-
32
-	/** Mask scaling coefficient. For example, 2.0 means double size. */
33
-	public float $scale;
34
-
35
-
36
-	public function __construct(stdClass $update) {
37
-		parent::__construct($update, self::subs);
38
-	}
11
+    /** Keep all of properties which has sub properties */
12
+    private const subs = [];
13
+
14
+    /**
15
+     * The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”,
16
+     * “mouth”, or “chin”.
17
+     */
18
+    public string $point;
19
+
20
+    /**
21
+     * Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example,
22
+     * choosing -1.0 will place mask just to the left of the default mask position.
23
+     */
24
+    public float $x_shift;
25
+
26
+    /**
27
+     * Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0
28
+     * will place the mask just below the default mask position.
29
+     */
30
+    public float $y_shift;
31
+
32
+    /** Mask scaling coefficient. For example, 2.0 means double size. */
33
+    public float $scale;
34
+
35
+
36
+    public function __construct(stdClass $update) {
37
+        parent::__construct($update, self::subs);
38
+    }
39 39
 }
Please login to merge, or discard this patch.
types/shippingOption.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -8,20 +8,20 @@
 block discarded – undo
8 8
  * This object represents one shipping option.
9 9
  */
10 10
 class shippingOption extends types {
11
-	/** Keep all of properties which has sub properties */
12
-	private const subs = [];
11
+    /** Keep all of properties which has sub properties */
12
+    private const subs = [];
13 13
 
14
-	/** Shipping option identifier */
15
-	public string $id;
14
+    /** Shipping option identifier */
15
+    public string $id;
16 16
 
17
-	/** Option title */
18
-	public string $title;
17
+    /** Option title */
18
+    public string $title;
19 19
 
20
-	/** List of price portions */
21
-	public array $prices;
20
+    /** List of price portions */
21
+    public array $prices;
22 22
 
23 23
 
24
-	public function __construct(stdClass $update) {
25
-		parent::__construct($update, self::subs);
26
-	}
24
+    public function __construct(stdClass $update) {
25
+        parent::__construct($update, self::subs);
26
+    }
27 27
 }
Please login to merge, or discard this patch.