PHP-CS fixer pass

This commit is contained in:
Franck Allimant
2014-07-01 01:07:56 +02:00
parent f820a09a1a
commit 811e89f740
20 changed files with 48 additions and 63 deletions

View File

@@ -13,7 +13,7 @@ namespace Thelia\Action;
use Thelia\Core\Event\CachedFileEvent; use Thelia\Core\Event\CachedFileEvent;
use Thelia\Core\Event\File\FileCreateOrUpdateEvent; use Thelia\Core\Event\File\FileCreateOrUpdateEvent;
use Thelia\Core\Event\Image\FileDeleteEvent; use Thelia\Core\Event\File\FileDeleteEvent;
use Thelia\Core\Event\UpdateFilePositionEvent; use Thelia\Core\Event\UpdateFilePositionEvent;
use Thelia\Exception\FileException; use Thelia\Exception\FileException;
use Thelia\Files\FileManager; use Thelia\Files\FileManager;
@@ -181,7 +181,6 @@ abstract class BaseCachedFile extends BaseAction
return $path; return $path;
} }
/** /**
* Take care of saving a file in the database and file storage * Take care of saving a file in the database and file storage
* *
@@ -213,7 +212,6 @@ abstract class BaseCachedFile extends BaseAction
$event->setUploadedFile($newUploadedFile); $event->setUploadedFile($newUploadedFile);
} }
/** /**
* Take care of updating file in the database and file storage * Take care of updating file in the database and file storage
* *

View File

@@ -12,13 +12,9 @@
namespace Thelia\Action; namespace Thelia\Action;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Core\Event\Document\DocumentCreateOrUpdateEvent;
use Thelia\Core\Event\Document\DocumentDeleteEvent;
use Thelia\Core\Event\Document\DocumentEvent; use Thelia\Core\Event\Document\DocumentEvent;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\Event\UpdateFilePositionEvent;
use Thelia\Exception\DocumentException; use Thelia\Exception\DocumentException;
use Thelia\Exception\ImageException;
use Thelia\Model\ConfigQuery; use Thelia\Model\ConfigQuery;
use Thelia\Tools\URL; use Thelia\Tools\URL;

View File

@@ -18,12 +18,8 @@ use Imagine\Image\ImageInterface;
use Imagine\Image\ImagineInterface; use Imagine\Image\ImagineInterface;
use Imagine\Image\Point; use Imagine\Image\Point;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Core\Event\File\FileCreateOrUpdateEvent;
use Thelia\Core\Event\Image\ImageCreateOrUpdateEvent;
use Thelia\Core\Event\Image\ImageDeleteEvent;
use Thelia\Core\Event\Image\ImageEvent; use Thelia\Core\Event\Image\ImageEvent;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\Event\UpdateFilePositionEvent;
use Thelia\Exception\ImageException; use Thelia\Exception\ImageException;
use Thelia\Model\ConfigQuery; use Thelia\Model\ConfigQuery;
use Thelia\Tools\URL; use Thelia\Tools\URL;

View File

@@ -15,7 +15,7 @@ namespace Thelia\Controller\Admin;
use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Exception\PropelException;
use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\File\UploadedFile;
use Thelia\Core\Event\File\FileCreateOrUpdateEvent; use Thelia\Core\Event\File\FileCreateOrUpdateEvent;
use Thelia\Core\Event\Image\FileDeleteEvent; use Thelia\Core\Event\File\FileDeleteEvent;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\Event\UpdateFilePositionEvent; use Thelia\Core\Event\UpdateFilePositionEvent;
use Thelia\Core\HttpFoundation\Response; use Thelia\Core\HttpFoundation\Response;
@@ -322,7 +322,6 @@ class FileController extends BaseAdminController
)); ));
} }
/** /**
* Manage how a file is updated * Manage how a file is updated
* *
@@ -421,7 +420,6 @@ class FileController extends BaseAdminController
return $fileModelInstance; return $fileModelInstance;
} }
/** /**
* Manage how an image is updated * Manage how an image is updated
* *
@@ -471,7 +469,6 @@ class FileController extends BaseAdminController
)); ));
} }
/** /**
* Manage how a image has to be deleted (AJAX) * Manage how a image has to be deleted (AJAX)
* *
@@ -546,7 +543,6 @@ class FileController extends BaseAdminController
return new Response($message); return new Response($message);
} }
/** /**
* Manage how a image has to be deleted (AJAX) * Manage how a image has to be deleted (AJAX)
* *

View File

@@ -121,6 +121,7 @@ class BrandUpdateEvent extends BrandCreateEvent
public function setLogoImageId($logo_image_id) public function setLogoImageId($logo_image_id)
{ {
$this->logo_image_id = $logo_image_id; $this->logo_image_id = $logo_image_id;
return $this; return $this;
} }

View File

@@ -12,7 +12,7 @@
namespace Thelia\Core\Event\Document; namespace Thelia\Core\Event\Document;
use Thelia\Core\Event\Image\FileDeleteEvent; use Thelia\Core\Event\File\FileDeleteEvent;
use Thelia\Model\CategoryDocument; use Thelia\Model\CategoryDocument;
use Thelia\Model\ContentDocument; use Thelia\Model\ContentDocument;
use Thelia\Model\FolderDocument; use Thelia\Model\FolderDocument;

View File

@@ -10,7 +10,7 @@
/* file that was distributed with this source code. */ /* file that was distributed with this source code. */
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event\Image; namespace Thelia\Core\Event\File;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;
use Thelia\Files\FileModelInterface; use Thelia\Files\FileModelInterface;

View File

@@ -223,13 +223,15 @@ class ImageEvent extends CachedFileEvent
public function setImageObject($imageObject) public function setImageObject($imageObject)
{ {
$this->imageObject = $imageObject; $this->imageObject = $imageObject;
return $this; return $this;
} }
/** /**
* @return ImageInterface * @return ImageInterface
*/ */
public function getImageObject() { public function getImageObject()
{
return $this->imageObject; return $this->imageObject;
} }
} }

View File

@@ -21,7 +21,6 @@ class ProductUpdateEvent extends ProductCreateEvent
protected $postscriptum; protected $postscriptum;
protected $brand_id; protected $brand_id;
public function __construct($product_id) public function __construct($product_id)
{ {
$this->product_id = $product_id; $this->product_id = $product_id;
@@ -82,6 +81,7 @@ class ProductUpdateEvent extends ProductCreateEvent
public function setBrandId($brand_id) public function setBrandId($brand_id)
{ {
$this->brand_id = $brand_id; $this->brand_id = $brand_id;
return $this; return $this;
} }

View File

@@ -15,7 +15,6 @@ namespace Thelia\Core\Template\Loop;
use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\Criteria;
use Thelia\Condition\ConditionFactory; use Thelia\Condition\ConditionFactory;
use Thelia\Condition\Implementation\ConditionInterface; use Thelia\Condition\Implementation\ConditionInterface;
use Thelia\Core\HttpFoundation\Request;
use Thelia\Core\Template\Element\BaseI18nLoop; use Thelia\Core\Template\Element\BaseI18nLoop;
use Thelia\Core\Template\Element\LoopResult; use Thelia\Core\Template\Element\LoopResult;
use Thelia\Core\Template\Element\LoopResultRow; use Thelia\Core\Template\Element\LoopResultRow;

View File

@@ -23,7 +23,6 @@ use Propel\Runtime\ActiveQuery\Criteria;
use Thelia\Model\ConfigQuery; use Thelia\Model\ConfigQuery;
use Thelia\Core\Template\Element\LoopResultRow; use Thelia\Core\Template\Element\LoopResultRow;
use Thelia\Core\Template\Element\LoopResult; use Thelia\Core\Template\Element\LoopResult;
use Thelia\Type\EnumType;
use Thelia\Log\Tlog; use Thelia\Log\Tlog;
/** /**

View File

@@ -136,8 +136,7 @@ class SmartyParser extends Smarty implements ParserInterface
'#(([a-z0-9]\s*=\s*(["\'])[^\3]*?\3)|<[a-z0-9_]+)\s+([a-z/>])#is' => '\1 \4', '#(([a-z0-9]\s*=\s*(["\'])[^\3]*?\3)|<[a-z0-9_]+)\s+([a-z/>])#is' => '\1 \4',
'/(^[\n]*|[\n]+)[\s\t]*[\n]+/' => "\n" '/(^[\n]*|[\n]+)[\s\t]*[\n]+/' => "\n"
); );
} } elseif ($compressionMode >= 2) {
else if ($compressionMode >= 2) {
if (preg_match_all('#<!--\[[^\]]+\]>.*?<!\[[^\]]+\]-->#is', $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) { if (preg_match_all('#<!--\[[^\]]+\]>.*?<!\[[^\]]+\]-->#is', $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
foreach ($matches as $match) { foreach ($matches as $match) {
$store[] = $match[0][0]; $store[] = $match[0][0];
@@ -166,8 +165,7 @@ class SmartyParser extends Smarty implements ParserInterface
'#>\s+$#Ss' => '>', '#>\s+$#Ss' => '>',
); );
} } else {
else {
$expressions = array(); $expressions = array();
} }