remove some unused variables

This commit is contained in:
Manuel Raynaud
2014-01-22 15:50:40 +01:00
parent 1974d3e3c3
commit 1b2c1d53ac
40 changed files with 82 additions and 182 deletions

View File

@@ -74,7 +74,6 @@ class Attribute extends BaseAction implements EventSubscriberInterface
*/
public function update(AttributeUpdateEvent $event)
{
$search = AttributeQuery::create();
if (null !== $attribute = AttributeQuery::create()->findPk($event->getAttributeId())) {

View File

@@ -66,7 +66,6 @@ class AttributeAv extends BaseAction implements EventSubscriberInterface
*/
public function update(AttributeAvUpdateEvent $event)
{
$search = AttributeAvQuery::create();
if (null !== $attribute = AttributeAvQuery::create()->findPk($event->getAttributeAvId())) {

View File

@@ -42,7 +42,7 @@ class Cache extends BaseAction implements EventSubscriberInterface
$directoryBrowser = new \DirectoryIterator($dir);
$fs = new Filesystem();
$fs->remove($dir);
$fs->remove($directoryBrowser);
}

View File

@@ -91,7 +91,7 @@ class Cart extends BaseAction implements EventSubscriberInterface
{
if (null !== $cartItemId = $event->getCartItem()) {
$cart = $event->getCart();
$cartItem = CartItemQuery::create()
CartItemQuery::create()
->filterByCartId($cart->getId())
->filterById($cartItemId)
->delete();

View File

@@ -58,7 +58,6 @@ class Config extends BaseAction implements EventSubscriberInterface
*/
public function setValue(ConfigUpdateEvent $event)
{
$search = ConfigQuery::create();
if (null !== $config = $search->findPk($event->getConfigId())) {
@@ -78,7 +77,6 @@ class Config extends BaseAction implements EventSubscriberInterface
*/
public function modify(ConfigUpdateEvent $event)
{
$search = ConfigQuery::create();
if (null !== $config = ConfigQuery::create()->findPk($event->getConfigId())) {

View File

@@ -95,7 +95,6 @@ class Currency extends BaseAction implements EventSubscriberInterface
*/
public function setDefault(CurrencyUpdateEvent $event)
{
$search = CurrencyQuery::create();
if (null !== $currency = CurrencyQuery::create()->findPk($event->getCurrencyId())) {

View File

@@ -74,7 +74,6 @@ class Feature extends BaseAction implements EventSubscriberInterface
*/
public function update(FeatureUpdateEvent $event)
{
$search = FeatureQuery::create();
if (null !== $feature = FeatureQuery::create()->findPk($event->getFeatureId())) {

View File

@@ -66,7 +66,6 @@ class FeatureAv extends BaseAction implements EventSubscriberInterface
*/
public function update(FeatureAvUpdateEvent $event)
{
$search = FeatureAvQuery::create();
if (null !== $feature = FeatureAvQuery::create()->findPk($event->getFeatureAvId())) {

View File

@@ -355,7 +355,7 @@ class Image extends BaseCachedFile implements EventSubscriberInterface
$delta_x = $delta_y = $border_width = $border_height = 0;
if ($width_diff > 1 AND $height_diff > 1) {
if ($width_diff > 1 && $height_diff > 1) {
$next_width = $width_orig;
$next_height = $height_orig;

View File

@@ -68,7 +68,6 @@ class Message extends BaseAction implements EventSubscriberInterface
*/
public function modify(MessageUpdateEvent $event)
{
$search = MessageQuery::create();
if (null !== $message = MessageQuery::create()->findPk($event->getMessageId())) {

View File

@@ -334,7 +334,7 @@ class Order extends BaseAction implements EventSubscriberInterface
// Build subject and body
$message->build($parser, $instance);
$mail = $this->getMailer()->send($instance);
$this->getMailer()->send($instance);
}
}

View File

@@ -378,7 +378,7 @@ class Product extends BaseAction implements EventSubscriberInterface
*/
public function deleteFeatureProductValue(FeatureProductDeleteEvent $event)
{
$featureProduct = FeatureProductQuery::create()
FeatureProductQuery::create()
->filterByProductId($event->getProductId())
->filterByFeatureId($event->getFeatureId())
->delete()

View File

@@ -74,7 +74,6 @@ class Template extends BaseAction implements EventSubscriberInterface
*/
public function update(TemplateUpdateEvent $event)
{
$search = TemplateQuery::create();
if (null !== $template = TemplateQuery::create()->findPk($event->getTemplateId())) {