Eventsub may not trigger

I’ll have a look at the error states, but at the moment I’m doing the following:

if ($headers['twitch-eventsub-message-type'] == 'notification') {
            // lets parse the data from the notification into an object
                        mylog('Notification!');
            $data = json_decode($raw_data);
            // and check the data parse
            if (json_last_error() == JSON_ERROR_NONE) {
                // we passed all the checks
                // tell Twitch it's OK
                echo 'Ok';
                // and now do something with the $data
                notes(file_get_contents('php://input'));
                // $data is an object, not an array

                // end doing something with the $data
                exit;
            }
        }

Ideally I’d love to be able to split the event logs up, so all of the cheers get put into one, and the subs get put in the other, but as always… not a coder… I have no idea how to check the contents of the data before I start posting the logs.