for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the bootstrap-bundle package.
*
* (c) 2018 WEBEWEB
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace WBW\Bundle\BootstrapBundle\Event;
use Symfony\Component\EventDispatcher\Event;
* Abstract Bootstrap event.
* @author webeweb <https://github.com/webeweb/>
* @package WBW\Bundle\BootstrapBundle\Event
* @abstract
abstract class AbstractBootstrapEvent extends Event {
* Event name.
* @var string
private $eventName;
* Constructor.
* @param string $eventName The event name.
protected function __construct($eventName) {
$this->setEventName($eventName);
$eventName
string
object<WBW\Bundle\BootstrapBundle\Event\type>
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
}
* Get the event name.
* @return string Returns the event name.
public function getEventName() {
return $this->eventName;
* Set the event name.
* @param type $eventName The event name.
* @return AbstractBootstrapEvent Returns this Bootstrap event.
protected function setEventName($eventName) {
$this->eventName = $eventName;
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..
return $this;
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: