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 $organizationName |
||
63 | * @return $this |
||
64 | */ |
||
65 | public function setOrganization($organizationName) |
||
73 | |||
74 | /** |
||
75 | * @param int $organizationId |
||
76 | * @return $this |
||
77 | */ |
||
78 | public function setOrganizationId($organizationId) |
||
84 | |||
85 | |||
86 | /** |
||
87 | * @return string |
||
88 | */ |
||
89 | public function getOrganizationId() |
||
93 | |||
94 | /** |
||
95 | * @param $organization |
||
96 | * @return bool|array |
||
97 | */ |
||
98 | protected function getOrganizationByName($organization) |
||
110 | } |
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.