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

@@ -115,7 +115,7 @@ class ViewListener implements EventSubscriberInterface
{
$request = $this->container->get('request');
if (null === $view = $request->attributes->get('_view')) {
if (null === $request->attributes->get('_view')) {
$request->attributes->set('_view', $this->findView($request));
}

View File

@@ -34,11 +34,6 @@ use Symfony\Component\HttpFoundation\Request as BaseRequest;
class Request extends BaseRequest
{
private $excludeContent = array(
'username',
'password'
);
public function getProductId()
{
return $this->get("product_id");

View File

@@ -104,12 +104,8 @@ class SecurityContext
// Check if user's roles matches required roles
$userRoles = $user->getRoles();
$roleFound = false;
foreach ($userRoles as $role) {
if (in_array($role, $roles)) {
$roleFound = true;
return true;
}
}

View File

@@ -58,8 +58,6 @@ class Argument
public function setValue($value)
{
$x = $value === null;
if ($value === null) {
$this->value = null;
} else {
@@ -70,7 +68,6 @@ class Argument
$this->value = (string) $value;
}
}
//$this->value = $value === null ? null : (string) $value;
}
public static function createAnyTypeArgument($name, $default=null, $mandatory=false, $empty=true)

View File

@@ -79,10 +79,6 @@ class Attribute extends BaseI18nLoop implements PropelSearchLoopInterface
{
$search = AttributeQuery::create();
$backendContext = $this->getBackend_context();
$lang = $this->getLang();
/* manage translations */
$this->configureI18nProcessing($search);

View File

@@ -219,9 +219,6 @@ class Document extends BaseI18nLoop implements PropelSearchLoopInterface
if (!is_null($exclude))
$search->filterById($exclude, Criteria::NOT_IN);
// Create document processing event
$event = new DocumentEvent($this->request);
return $search;
}

View File

@@ -62,12 +62,8 @@ class ProductTemplate extends BaseI18nLoop implements PropelSearchLoopInterface
{
$search = TemplateQuery::create();
$backendContext = $this->getBackend_context();
$lang = $this->getLang();
/* manage translations */
$this->configureI18nProcessing($search, $columns = array('NAME'));
$this->configureI18nProcessing($search, array('NAME'));
$id = $this->getId();

View File

@@ -242,7 +242,7 @@ class DataAccessFunctions extends AbstractSmartyPlugin
return $this->dataAccess("Lang", $params, $this->request->getSession()->getLang());
}
public function ConfigDataAccess($params, $smarty)
public function configDataAccess($params, $smarty)
{
$key = $this->getParam($params, 'key', false);
@@ -253,7 +253,7 @@ class DataAccessFunctions extends AbstractSmartyPlugin
return ConfigQuery::read($key, $default);
}
public function StatsAccess($params, $smarty)
public function statsAccess($params, $smarty)
{
if (false === array_key_exists("key", $params)) {
throw new \InvalidArgumentException(sprintf("missing key attribute in stats access function"));
@@ -459,8 +459,8 @@ class DataAccessFunctions extends AbstractSmartyPlugin
new SmartyPluginDescriptor('function', 'lang', $this, 'langDataAccess'),
new SmartyPluginDescriptor('function', 'cart', $this, 'cartDataAccess'),
new SmartyPluginDescriptor('function', 'order', $this, 'orderDataAccess'),
new SmartyPluginDescriptor('function', 'config', $this, 'ConfigDataAccess'),
new SmartyPluginDescriptor('function', 'stats', $this, 'StatsAccess'),
new SmartyPluginDescriptor('function', 'config', $this, 'configDataAccess'),
new SmartyPluginDescriptor('function', 'stats', $this, 'statsAccess'),
);
}