1 | <?php |
||
13 | class FS_Payment extends FS_Entity { |
||
14 | |||
15 | #region Properties |
||
16 | |||
17 | /** |
||
18 | * @var number |
||
19 | */ |
||
20 | public $plugin_id; |
||
21 | /** |
||
22 | * @var number |
||
23 | */ |
||
24 | public $user_id; |
||
25 | /** |
||
26 | * @var number |
||
27 | */ |
||
28 | public $install_id; |
||
29 | /** |
||
30 | * @var number |
||
31 | */ |
||
32 | public $subscription_id; |
||
33 | /** |
||
34 | * @var number |
||
35 | */ |
||
36 | public $plan_id; |
||
37 | /** |
||
38 | * @var number |
||
39 | */ |
||
40 | public $license_id; |
||
41 | /** |
||
42 | * @var float |
||
43 | */ |
||
44 | public $gross; |
||
45 | /** |
||
46 | * @var number |
||
47 | */ |
||
48 | public $bound_payment_id; |
||
49 | /** |
||
50 | * @var string |
||
51 | */ |
||
52 | public $external_id; |
||
53 | /** |
||
54 | * @var string |
||
55 | */ |
||
56 | public $gateway; |
||
57 | /** |
||
58 | * @var string ISO 3166-1 alpha-2 - two-letter country code. |
||
59 | * |
||
60 | * @link http://www.wikiwand.com/en/ISO_3166-1_alpha-2 |
||
61 | */ |
||
62 | public $country_code; |
||
63 | /** |
||
64 | * @var string |
||
65 | */ |
||
66 | public $vat_id; |
||
67 | /** |
||
68 | * @var float Actual Tax / VAT in $$$ |
||
69 | */ |
||
70 | public $vat; |
||
71 | /** |
||
72 | * @var int Payment source. |
||
73 | */ |
||
74 | public $source = 0; |
||
75 | |||
76 | #endregion Properties |
||
77 | |||
78 | /** |
||
79 | * @param object|bool $payment |
||
80 | */ |
||
81 | function __construct( $payment = false ) { |
||
84 | |||
85 | static function get_type() { |
||
88 | |||
89 | /** |
||
90 | * @author Vova Feldman (@svovaf) |
||
91 | * @since 1.0.0 |
||
92 | * |
||
93 | * @return bool |
||
94 | */ |
||
95 | function is_refund() { |
||
98 | |||
99 | /** |
||
100 | * Checks if the payment was migrated from another platform. |
||
101 | * |
||
102 | * @author Vova Feldman (@svovaf) |
||
103 | * @since 2.0.2 |
||
104 | * |
||
105 | * @return bool |
||
106 | */ |
||
107 | function is_migrated() { |
||
110 | } |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.