Issues (45)

WatchingStrategies/Events/EventListeners.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Imanghafoori\HeyMan\Plugins\WatchingStrategies\Events;
4
5
use Imanghafoori\HeyMan\Contracts\HeymanSentinel;
6
7
class EventListeners implements HeymanSentinel
8
{
9 11
    public function startWatching($data)
10
    {
11 11
        foreach ($data as $event => $callbacks) {
12 10
            foreach ($callbacks as $key => $cbs) {
13 10
                foreach ($cbs as $cb) {
14 10
                    \Event::listen($event, $cb);
0 ignored issues
show
The method listen() does not exist on Event. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

14
                    \Event::/** @scrutinizer ignore-call */ 
15
                            listen($event, $cb);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
15
                }
16
            }
17
        }
18 11
    }
19
}
20