1 | <?php |
||||
2 | |||||
3 | namespace Gewaer\Handlers; |
||||
4 | |||||
5 | use Namshi\Notificator\Notification\Handler\HandlerInterface; |
||||
6 | use Gewaer\Contracts\PushNotifications as PushNotificationsContract; |
||||
7 | use Phalcon\Http\Response; |
||||
8 | use Namshi\Notificator\NotificationInterface; |
||||
9 | use Phalcon\Di; |
||||
10 | use Gewaer\Notifications\PushNotifications\AppsPushNotifications; |
||||
0 ignored issues
–
show
|
|||||
11 | use Gewaer\Notifications\PushNotifications\PushNotifications; |
||||
0 ignored issues
–
show
The type
Gewaer\Notifications\Pus...tions\PushNotifications was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||
12 | use Gewaer\Models\Notifications; |
||||
13 | use Gewaer\Models\SystemModules; |
||||
14 | |||||
15 | class PushNotificationsHandler implements HandlerInterface |
||||
16 | { |
||||
17 | /** |
||||
18 | * Stablishes type of handler |
||||
19 | */ |
||||
20 | public function shouldHandle(NotificationInterface $notification) |
||||
21 | { |
||||
22 | return $notification instanceof PushNotificationsContract; |
||||
23 | } |
||||
24 | |||||
25 | /** |
||||
26 | * Handles actions to take depending of notifications |
||||
27 | * @param NotificationInterface $notification |
||||
28 | */ |
||||
29 | public function handle(NotificationInterface $notification) |
||||
30 | { |
||||
31 | |||||
32 | //Push the notification.In this case we are just logging the info |
||||
33 | Di::getDefault()->getLog()->info($notification->assemble()); |
||||
1 ignored issue
–
show
The method
assemble() does not exist on Namshi\Notificator\NotificationInterface . It seems like you code against a sub-type of Namshi\Notificator\NotificationInterface such as Gewaer\Contracts\PushNotifications or Gewaer\Notifications\Mobile\Mobile .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
34 | } |
||||
35 | } |
||||
36 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths