for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace FOS\ElasticaBundle\Propel;
use Glorpen\Propel\PropelBundle\Events\ModelEvent;
use FOS\ElasticaBundle\Doctrine\AbstractListenerBase;
use Glorpen\Propel\PropelBundle\Events\ConnectionEvent;
/**
* Automatically update ElasticSearch based on changes to the Propel source
* data. One listener is generated for each Propel entity / ElasticSearch type.
*/
class Listener extends AbstractListenerBase
{
* Looks for new objects that should be indexed.
*
* @param ModelEvent $eventArgs
$eventArgs
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
public function onModelInsertPost(ModelEvent $event)
$this->doPostPersist($event->getModel());
}
* Looks for objects being updated that should be indexed or removed from the index.
public function onModelUpdatePost(ModelEvent $event)
$this->doPostUpdate($event->getModel());
public function onModelDeletePre(ModelEvent $event)
$this->doPreRemove($event->getModel());
public function onConnectionCommitPost(ConnectionEvent $event)
$event
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$this->doPostFlush();
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.