<?php

namespace RMS\PushNotificationsBundle\Service;


class EventListener {

    /**
     * @var EventListenerInterface[]
     */
    protected $listeners = [];

    /**
     * @param EventListenerInterface $listener
     */
    public function addListener (EventListenerInterface $listener) {
        $this->listeners[] = $listener;
    }

    /**
     * Call onKernelTerminate on every listener
     */
    public function onKernelTerminate () {
        foreach ($this->listeners as $listener) {
            $listener->onKernelTerminate();
        }
    }
}
<?php

namespace RMS\PushNotificationsBundle\Service;


class EventListener {

    /**
     * @var EventListenerInterface[]
     */
    protected $listeners = array();

    /**
     * @param EventListenerInterface $listener
     */
    public function addListener (EventListenerInterface $listener) {
        $this->listeners[] = $listener;
    }

    /**
     * Call onKernelTerminate on every listener
     */
    public function onKernelTerminate () {
        foreach ($this->listeners as $listener) {
            $listener->onKernelTerminate();
        }
    }
}

Fix use of PHP5.4 array syntax. The library is still valid for use with PHP 5.3
Fix use of PHP5.4 array syntax.
The library is still valid for use with PHP 5.3
