1 | <?php |
||
15 | class ContaBancaria implements \JsonSerializable |
||
16 | { |
||
17 | private $id; |
||
18 | |||
19 | /** |
||
20 | * ContaBancaria constructor. |
||
21 | */ |
||
22 | public function __construct() |
||
25 | |||
26 | /** |
||
27 | * @return mixed |
||
28 | */ |
||
29 | public function getId() |
||
33 | |||
34 | /** |
||
35 | * @param mixed $id |
||
36 | * @return ContaBancaria |
||
37 | */ |
||
38 | public function setId($id) |
||
43 | |||
44 | function jsonSerialize() |
||
50 | |||
51 | |||
52 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.