seregazhuk /
php-pinterest-bot
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace seregazhuk\PinterestBot\Api\Traits; |
||||
| 4 | |||||
| 5 | use seregazhuk\PinterestBot\Api\Providers\Core\Provider; |
||||
| 6 | use seregazhuk\PinterestBot\Api\Providers\User; |
||||
| 7 | use seregazhuk\PinterestBot\Api\ProvidersContainer; |
||||
| 8 | |||||
| 9 | /** |
||||
| 10 | * @property ProvidersContainer container |
||||
| 11 | */ |
||||
| 12 | trait ResolvesCurrentUser |
||||
| 13 | { |
||||
| 14 | /** |
||||
| 15 | * @return string |
||||
| 16 | */ |
||||
| 17 | protected function resolveCurrentUsername() |
||||
| 18 | { |
||||
| 19 | return $this->getUserProvider()->username(); |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 20 | } |
||||
| 21 | |||||
| 22 | /** |
||||
| 23 | * @return string |
||||
| 24 | */ |
||||
| 25 | protected function resolveCurrentUserId() |
||||
| 26 | { |
||||
| 27 | return $this->getUserProvider()->id(); |
||||
|
0 ignored issues
–
show
The method
id() does not exist on seregazhuk\PinterestBot\...Providers\Core\Provider. It seems like you code against a sub-type of seregazhuk\PinterestBot\...Providers\Core\Provider such as seregazhuk\PinterestBot\Api\Providers\User.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 28 | } |
||||
| 29 | |||||
| 30 | /** |
||||
| 31 | * @return Provider|User |
||||
| 32 | */ |
||||
| 33 | protected function getUserProvider() |
||||
| 34 | { |
||||
| 35 | return $this->container->getProvider('user'); |
||||
| 36 | } |
||||
| 37 | } |
||||
| 38 |