1 | <?php |
||
26 | class Api |
||
27 | { |
||
28 | /** |
||
29 | * @var EndpointsContainer |
||
30 | */ |
||
31 | protected $endpointsContainer; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $organizationId; |
||
37 | |||
38 | public function __construct(EndpointsContainer $endpointsContainer) |
||
42 | |||
43 | /** |
||
44 | * Magic method to access different endpoints. |
||
45 | * |
||
46 | * @param string $endpoint |
||
47 | * |
||
48 | * @return Endpoint |
||
49 | */ |
||
50 | public function __get($endpoint) |
||
60 | |||
61 | /** |
||
62 | * @param string $organization |
||
63 | * @return $this |
||
64 | */ |
||
65 | public function setOrganization($organization) |
||
76 | |||
77 | /** |
||
78 | * @param int $organizationId |
||
79 | * @return $this |
||
80 | */ |
||
81 | public function setOrganizationId($organizationId) |
||
87 | |||
88 | |||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | public function getOrganizationId() |
||
96 | } |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.