bakaphp /
phalcon-api
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Gewaer\Notifications\PushNotifications; |
||||
| 4 | |||||
| 5 | use Namshi\Notificator\Notification; |
||||
| 6 | use Gewaer\Contracts\PushNotificationsContract; |
||||
| 7 | use Gewaer\Models\Users; |
||||
| 8 | use Gewaer\Models\Notifications; |
||||
| 9 | use Gewaer\Notifications\PushNotifications\PushNotifications as PushNotifications; |
||||
| 10 | use Gewaer\Traits\NotificationsTrait; |
||||
| 11 | |||||
| 12 | class UsersPushNotifications extends PushNotifications implements PushNotificationsContract |
||||
| 13 | { |
||||
| 14 | /** |
||||
| 15 | * Notifications Trait |
||||
| 16 | */ |
||||
| 17 | use NotificationsTrait; |
||||
| 18 | |||||
| 19 | /** |
||||
| 20 | * Constructor |
||||
| 21 | */ |
||||
| 22 | public function __construct(array $user, string $content, string $systemModule) |
||||
| 23 | { |
||||
| 24 | $this->user = $user; |
||||
|
1 ignored issue
–
show
|
|||||
| 25 | $this->content = $content; |
||||
| 26 | $this->systemModule = $systemModule; |
||||
| 27 | } |
||||
| 28 | |||||
| 29 | /** |
||||
| 30 | * Assemble an Apps Push Notification |
||||
| 31 | * @todo Create specific assembler for apps push notifications |
||||
| 32 | */ |
||||
| 33 | public function assemble() |
||||
| 34 | { |
||||
| 35 | /** |
||||
| 36 | * Create a new database record |
||||
| 37 | */ |
||||
| 38 | self::create($this->user, $this->content, Notifications::USERS, $this->systemModule); |
||||
|
1 ignored issue
–
show
$this->user of type Gewaer\Models\Users is incompatible with the type array expected by parameter $user of Gewaer\Notifications\Pus...Notifications::create().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 39 | |||||
| 40 | return $this->content . " From Users"; |
||||
| 41 | } |
||||
| 42 | } |
||||
| 43 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..