remove unused code

This commit is contained in:
Manuel Raynaud
2014-03-10 11:57:58 +01:00
parent 210eb6dd72
commit 81a09e1a98
35 changed files with 17 additions and 199 deletions

View File

@@ -91,8 +91,6 @@ class HttpException extends BaseAction implements EventSubscriberInterface
// Define the template thant shoud be used // Define the template thant shoud be used
$this->parser->setTemplateDefinition(TemplateHelper::getInstance()->getActiveFrontTemplate()); $this->parser->setTemplateDefinition(TemplateHelper::getInstance()->getActiveFrontTemplate());
//$event->getRequest()->attributes->set('_view', ConfigQuery::getPageNotFoundView());
$response = new Response($this->parser->render(ConfigQuery::getPageNotFoundView()), 404); $response = new Response($this->parser->render(ConfigQuery::getPageNotFoundView()), 404);
$event->setResponse($response); $event->setResponse($response);

View File

@@ -112,8 +112,6 @@ class Image extends BaseCachedFile implements EventSubscriberInterface
throw new \InvalidArgumentException("Cache sub-directory and source file path cannot be null"); throw new \InvalidArgumentException("Cache sub-directory and source file path cannot be null");
} }
// echo basename($source_file).": ";
// Find cached file path // Find cached file path
$cacheFilePath = $this->getCacheFilePath($subdir, $source_file, $event->isOriginalImage(), $event->getOptionsHash()); $cacheFilePath = $this->getCacheFilePath($subdir, $source_file, $event->isOriginalImage(), $event->getOptionsHash());
@@ -391,8 +389,6 @@ class Image extends BaseCachedFile implements EventSubscriberInterface
$image->resize(new Box($next_width, $next_height)); $image->resize(new Box($next_width, $next_height));
// echo "w=$dest_width, h=$dest_height, nw=$next_width, nh=$next_height, dx=$delta_x, dy=$delta_y, bw=$border_width, bh=$border_height\n";
if ($resize_mode == self::EXACT_RATIO_WITH_BORDERS) { if ($resize_mode == self::EXACT_RATIO_WITH_BORDERS) {
$border_width = intval(($dest_width - $next_width) / 2); $border_width = intval(($dest_width - $next_width) / 2);

View File

@@ -83,7 +83,7 @@ class CreateAdminUser extends ContainerAwareCommand
{ {
$output->writeln('Please enter the admin user information:'); $output->writeln('Please enter the admin user information:');
$admin = $this->getAdminInfo($input, $output); // new Admin(); $admin = $this->getAdminInfo($input, $output);
$admin->save(); $admin->save();

View File

@@ -198,9 +198,6 @@ class Install extends ContainerAwareCommand
file_put_contents($configFile, $configContent); file_put_contents($configFile, $configContent);
// FA - no, as no further install will be possible
// $fs->remove($sampleConfigFile);
$fs->remove($this->getContainer()->getParameter("kernel.cache_dir")); $fs->remove($this->getContainer()->getParameter("kernel.cache_dir"));
} }

View File

@@ -23,7 +23,6 @@
namespace Thelia\Condition\Implementation; namespace Thelia\Condition\Implementation;
use InvalidArgumentException;
/** /**
* Allow every one, perform no check * Allow every one, perform no check

View File

@@ -23,8 +23,6 @@
namespace Thelia\Condition\Implementation; namespace Thelia\Condition\Implementation;
use InvalidArgumentException;
use Thelia\Condition\Operators; use Thelia\Condition\Operators;
use Thelia\Exception\InvalidConditionOperatorException; use Thelia\Exception\InvalidConditionOperatorException;
use Thelia\Exception\InvalidConditionValueException; use Thelia\Exception\InvalidConditionValueException;

View File

@@ -340,24 +340,6 @@ class CategoryController extends AbstractSeoCrudController
return $response; return $response;
} }
// $content_id = intval($this->getRequest()->get('content_id'));
//
// if ($content_id > 0) {
//
// $event = new CategoryAddContentEvent(
// $this->getExistingObject(),
// $content_id
// );
//
// try {
// $this->dispatch(TheliaEvents::CATEGORY_ADD_CONTENT, $event);
// }
// catch (\Exception $ex) {
// // Any error
// return $this->errorPage($ex);
// }
// }
$this->redirectToEditionTemplate(); $this->redirectToEditionTemplate();
} }

View File

@@ -83,27 +83,13 @@ class SystemLogController extends BaseAdminController
} }
} }
/**
* @return mixed|\Thelia\Core\HttpFoundation\Response
*/
public function defaultAction() public function defaultAction()
{ {
if (null !== $response = $this->checkAuth(AdminResources::SYSTEM_LOG, array(), AccessManager::VIEW)) return $response; if (null !== $response = $this->checkAuth(AdminResources::SYSTEM_LOG, array(), AccessManager::VIEW)) return $response;
/*
const VAR_LEVEL = "tlog_level";
const VAR_DESTINATIONS = "tlog_destinations";
const VAR_PREFIXE = "tlog_prefix";
const VAR_FILES = "tlog_files";
const VAR_IP = "tlog_ip";
const VAR_SHOW_REDIRECT = "tlog_show_redirect";
const DEFAULT_LEVEL = self::DEBUG;
const DEFAUT_DESTINATIONS = "Thelia\Log\Destination\TlogDestinationFile";
const DEFAUT_PREFIXE = "#NUM: #NIVEAU [#FICHIER:#FONCTION()] {#LIGNE} #DATE #HEURE: ";
const DEFAUT_FILES = "*";
const DEFAUT_IP = "";
const DEFAUT_SHOW_REDIRECT = 0;
*/
// Hydrate the general configuration form // Hydrate the general configuration form
$systemLogForm = new SystemLogConfigurationForm($this->getRequest(), 'form', array( $systemLogForm = new SystemLogConfigurationForm($this->getRequest(), 'form', array(
'level' => ConfigQuery::read(Tlog::VAR_LEVEL, Tlog::DEFAULT_LEVEL), 'level' => ConfigQuery::read(Tlog::VAR_LEVEL, Tlog::DEFAULT_LEVEL),

View File

@@ -22,7 +22,7 @@
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event\Address; namespace Thelia\Core\Event\Address;
use Symfony\Component\EventDispatcher\Event;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;
use Thelia\Model\Address; use Thelia\Model\Address;
use Thelia\Model\Customer; use Thelia\Model\Customer;

View File

@@ -22,7 +22,7 @@
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event\Address; namespace Thelia\Core\Event\Address;
use Symfony\Component\EventDispatcher\Event;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;
use Thelia\Model\Address; use Thelia\Model\Address;

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Cart; namespace Thelia\Core\Event\Cart;
use Symfony\Component\EventDispatcher\Event;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;
use Thelia\Model\Cart; use Thelia\Model\Cart;

View File

@@ -22,9 +22,6 @@
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event\Customer; namespace Thelia\Core\Event\Customer;
use Symfony\Component\EventDispatcher\Event;
use Thelia\Model\Customer;
/** /**
* Class CustomerCreateOrUpdateEvent * Class CustomerCreateOrUpdateEvent
* @package Thelia\Core\Event * @package Thelia\Core\Event

View File

@@ -23,7 +23,6 @@
namespace Thelia\Core\Event\Customer; namespace Thelia\Core\Event\Customer;
use Thelia\Model\Customer;
class CustomerLoginEvent extends CustomerEvent class CustomerLoginEvent extends CustomerEvent
{ {

View File

@@ -22,7 +22,6 @@
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event\FeatureProduct; namespace Thelia\Core\Event\FeatureProduct;
use Thelia\Model\FeatureProduct;
class FeatureProductDeleteEvent extends FeatureProductEvent class FeatureProductDeleteEvent extends FeatureProductEvent
{ {

View File

@@ -22,7 +22,7 @@
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event\FeatureProduct; namespace Thelia\Core\Event\FeatureProduct;
use Thelia\Model\FeatureProduct;
class FeatureProductUpdateEvent extends FeatureProductEvent class FeatureProductUpdateEvent extends FeatureProductEvent
{ {

View File

@@ -219,7 +219,6 @@ final class TheliaEvents
const COUNTRY_UPDATE = "action.updateCountry"; const COUNTRY_UPDATE = "action.updateCountry";
const COUNTRY_DELETE = "action.deleteCountry"; const COUNTRY_DELETE = "action.deleteCountry";
const COUNTRY_TOGGLE_DEFAULT = "action.toggleCountryDefault"; const COUNTRY_TOGGLE_DEFAULT = "action.toggleCountryDefault";
//const COUNTRY_UPDATE_POSITION = "action.updateFolderPosition";
const BEFORE_CREATECOUNTRY = "action.before_createCountry"; const BEFORE_CREATECOUNTRY = "action.before_createCountry";
const AFTER_CREATECOUNTRY = "action.after_createCountry"; const AFTER_CREATECOUNTRY = "action.after_createCountry";

View File

@@ -1,72 +0,0 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
namespace Thelia\Core\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
use Thelia\Core\Factory\ActionEventFactory;
use Thelia\Core\Template\ParserContext;
/**
*
* Action are dispatched here.
*
* A factory is used for creating appropriate action object
*
* Class ControllerListener
* @package Thelia\Core\EventListener
* @author Manuel Raynaud <mraynaud@openstudio.fr>
*/
class ControllerListener implements EventSubscriberInterface
{
/**
* @var ParserContext the parser context
*/
protected $parserContext;
public function __construct(ParserContext $parserContext)
{
$this->parserContext = $parserContext;
}
public function onKernelController(FilterControllerEvent $event)
{
$dispatcher = $event->getDispatcher();
$request = $event->getRequest();
if (false !== $action = $request->get("action")) {
//search corresponding action
$event = new ActionEventFactory($request, $action, $event->getKernel()->getContainer()->getParameter("thelia.actionEvent"));
$actionEvent = $event->createActionEvent();
$dispatcher->dispatch("action.".$action, $actionEvent);
}
}
public static function getSubscribedEvents()
{
return array(
KernelEvents::CONTROLLER => array('onKernelController', 0)
);
}
}

View File

@@ -32,7 +32,6 @@ use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\RouterInterface; use Symfony\Component\Routing\RouterInterface;
use Thelia\Exception\RedirectException;
use Thelia\Exception\UrlRewritingException; use Thelia\Exception\UrlRewritingException;
use Thelia\Model\ConfigQuery; use Thelia\Model\ConfigQuery;
use Thelia\Tools\Redirect; use Thelia\Tools\Redirect;
@@ -161,7 +160,6 @@ class RewritingRouter implements RouterInterface, RequestMatcherInterface
* *
* @throws \Exception|\Thelia\Exception\UrlRewritingException * @throws \Exception|\Thelia\Exception\UrlRewritingException
* @throws \Symfony\Component\Routing\Exception\ResourceNotFoundException * @throws \Symfony\Component\Routing\Exception\ResourceNotFoundException
* @throws \Thelia\Exception\RedirectException
* @return array An array of parameters * @return array An array of parameters
* *
*/ */

View File

@@ -30,7 +30,6 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Core\Template\Loop\Argument\Argument; use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Model\AccessoryQuery; use Thelia\Model\AccessoryQuery;
use Thelia\Type;
/** /**
* *

View File

@@ -31,7 +31,6 @@ use Thelia\Core\Template\Loop\Argument\Argument;
use Thelia\Model\ProductAssociatedContentQuery; use Thelia\Model\ProductAssociatedContentQuery;
use Thelia\Model\CategoryAssociatedContentQuery; use Thelia\Model\CategoryAssociatedContentQuery;
use Thelia\Type;
/** /**
* *

View File

@@ -36,7 +36,6 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
use Thelia\Coupon\Type\CouponInterface; use Thelia\Coupon\Type\CouponInterface;
use Thelia\Model\Coupon as MCoupon; use Thelia\Model\Coupon as MCoupon;
use Thelia\Model\CouponQuery; use Thelia\Model\CouponQuery;
use Thelia\Type;
/** /**
* Coupon Loop * Coupon Loop

View File

@@ -165,8 +165,6 @@ class Document extends BaseI18nLoop implements PropelSearchLoopInterface
$source_id = $this->getSourceId(); $source_id = $this->getSourceId();
$id = $this->getId(); $id = $this->getId();
// echo "source = ".$this->getSource().", id=".$source_id." - ".$this->getArg('source_id')->getValue()."<br />";
if (is_null($source_id) && is_null($id)) { if (is_null($source_id) && is_null($id)) {
throw new \InvalidArgumentException("If 'source' argument is specified, 'id' or 'source_id' argument should be specified"); throw new \InvalidArgumentException("If 'source' argument is specified, 'id' or 'source_id' argument should be specified");
} }

View File

@@ -180,8 +180,6 @@ class Image extends BaseI18nLoop implements PropelSearchLoopInterface
$source_id = $this->getSourceId(); $source_id = $this->getSourceId();
$id = $this->getId(); $id = $this->getId();
//echo "source = ".$this->getSourceId()."source_id=$source_id, id=$id<br />";
if (is_null($source_id) && is_null($id)) { if (is_null($source_id) && is_null($id)) {
throw new \InvalidArgumentException("If 'source' argument is specified, 'id' or 'source_id' argument should be specified"); throw new \InvalidArgumentException("If 'source' argument is specified, 'id' or 'source_id' argument should be specified");
} }
@@ -235,7 +233,6 @@ class Image extends BaseI18nLoop implements PropelSearchLoopInterface
if (!is_null($exclude)) if (!is_null($exclude))
$search->filterById($exclude, Criteria::NOT_IN); $search->filterById($exclude, Criteria::NOT_IN);
// echo "sql=".$search->toString();
return $search; return $search;
} }
@@ -273,10 +270,6 @@ class Image extends BaseI18nLoop implements PropelSearchLoopInterface
} }
foreach ($loopResult->getResultDataCollection() as $result) { foreach ($loopResult->getResultDataCollection() as $result) {
// Create image processing event
// ERO : following is duplicated, guess it's useless at this point
//$event = new ImageEvent($this->request);
// Setup required transformations // Setup required transformations
if (! is_null($width)) $event->setWidth($width); if (! is_null($width)) $event->setWidth($width);

View File

@@ -78,19 +78,11 @@ class OrderCoupon extends BaseLoop implements PropelSearchLoopInterface
/** @var OrderCoupon $orderCoupon */ /** @var OrderCoupon $orderCoupon */
foreach ($loopResult->getResultDataCollection() as $orderCoupon) { foreach ($loopResult->getResultDataCollection() as $orderCoupon) {
$loopResultRow = new LoopResultRow($orderCoupon); $loopResultRow = new LoopResultRow($orderCoupon);
/*$conditions = $conditionFactory->unserializeConditionCollection(
$orderCoupon->getSerializedConditions()
);*/
$now = time(); $now = time();
$datediff = $orderCoupon->getExpirationDate()->getTimestamp() - $now; $datediff = $orderCoupon->getExpirationDate()->getTimestamp() - $now;
$daysLeftBeforeExpiration = floor($datediff/(60*60*24)); $daysLeftBeforeExpiration = floor($datediff/(60*60*24));
/*$cleanedConditions = array();
foreach ($conditions->getConditions() as $condition) {
$cleanedConditions[] = $condition->getToolTip();
}*/
$loopResultRow->set("ID", $orderCoupon->getId()) $loopResultRow->set("ID", $orderCoupon->getId())
->set("CODE", $orderCoupon->getCode()) ->set("CODE", $orderCoupon->getCode())
->set("TITLE", $orderCoupon->getTitle()) ->set("TITLE", $orderCoupon->getTitle())
@@ -100,8 +92,6 @@ class OrderCoupon extends BaseLoop implements PropelSearchLoopInterface
->set("IS_CUMULATIVE", $orderCoupon->getIsCumulative()) ->set("IS_CUMULATIVE", $orderCoupon->getIsCumulative())
->set("IS_REMOVING_POSTAGE", $orderCoupon->getIsRemovingPostage()) ->set("IS_REMOVING_POSTAGE", $orderCoupon->getIsRemovingPostage())
->set("IS_AVAILABLE_ON_SPECIAL_OFFERS", $orderCoupon->getIsAvailableOnSpecialOffers()) ->set("IS_AVAILABLE_ON_SPECIAL_OFFERS", $orderCoupon->getIsAvailableOnSpecialOffers())
//->set("AMOUNT", $orderCoupon->getAmount())
//->set("APPLICATION_CONDITIONS", $cleanedConditions)
->set("DAY_LEFT_BEFORE_EXPIRATION", $daysLeftBeforeExpiration) ->set("DAY_LEFT_BEFORE_EXPIRATION", $daysLeftBeforeExpiration)
; ;
$loopResult->addRow($loopResultRow); $loopResult->addRow($loopResultRow);

View File

@@ -170,12 +170,6 @@ class DataAccessFunctions extends AbstractSmartyPlugin
{ {
switch ($params["ask"]) { switch ($params["ask"]) {
case "default": case "default":
/*if (array_key_exists('defaultCountry', self::$dataAccessCache)) {
$defaultCountry = self::$dataAccessCache['defaultCountry'];
} else {
$defaultCountry = CountryQuery::create()->findOneByByDefault(1);
self::$dataAccessCache['defaultCountry'] = $defaultCountry;
}*/
$defaultCountry = CountryQuery::create()->filterByByDefault(1)->limit(1); $defaultCountry = CountryQuery::create()->filterByByDefault(1)->limit(1);
return $this->dataAccessWithI18n("defaultCountry", $params, $defaultCountry); return $this->dataAccessWithI18n("defaultCountry", $params, $defaultCountry);

View File

@@ -186,7 +186,6 @@ class UrlGenerator extends AbstractSmartyPlugin
protected function getCurrentUrl() protected function getCurrentUrl()
{ {
//return URL::getInstance()->retrieveCurrent($this->request)->toString();
return $this->request->getUri(); return $this->request->getUri();
} }

View File

@@ -82,8 +82,6 @@ class SmartyParser extends Smarty implements ParserInterface
$this->setForceCompile(false); $this->setForceCompile(false);
} }
//$this->enableSecurity();
// The default HTTP status // The default HTTP status
$this->status = 200; $this->status = 200;

View File

@@ -79,7 +79,6 @@ class TheliaHttpKernel extends HttpKernel
*/ */
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{ {
//$request->headers->set('X-Php-Ob-Level', ob_get_level());
if ($type == HttpKernelInterface::MASTER_REQUEST) { if ($type == HttpKernelInterface::MASTER_REQUEST) {
$request = $this->initSession($request); $request = $this->initSession($request);
$this->initParam($request); $this->initParam($request);

View File

@@ -66,8 +66,8 @@ class Database
); );
} }
} }
$size = count($sql);
for ($i = 0; $i < count($sql); $i ++) { for ($i = 0; $i < $size; $i ++) {
if (!empty($sql[$i])) { if (!empty($sql[$i])) {
$this->connection->query($sql[$i]); $this->connection->query($sql[$i]);
} }
@@ -87,8 +87,8 @@ class Database
$query = array(); $query = array();
$tab = explode(";\n", $sql); $tab = explode(";\n", $sql);
$size = count($tab);
for ($i=0; $i<count($tab); $i++) { for ($i=0; $i<$size; $i++) {
$queryTemp = str_replace("-CODE-", ";',", $tab[$i]); $queryTemp = str_replace("-CODE-", ";',", $tab[$i]);
$queryTemp = str_replace("|", ";", $queryTemp); $queryTemp = str_replace("|", ";", $queryTemp);
$query[] = $queryTemp; $query[] = $queryTemp;

View File

@@ -73,7 +73,8 @@ class Update
$logger->debug("begin transaction"); $logger->debug("begin transaction");
$database = new Database($con->getWrappedConnection()); $database = new Database($con->getWrappedConnection());
try { try {
for ($i = ++$index; $i < count(self::$version); $i++) { $size = count(self::$version);
for ($i = ++$index; $i < $size; $i++) {
$this->updateToVersion(self::$version[$i], $database, $logger); $this->updateToVersion(self::$version[$i], $database, $logger);
$updatedVersions[] = self::$version[$i]; $updatedVersions[] = self::$version[$i];
} }

View File

@@ -5,7 +5,6 @@ namespace Thelia\Model;
use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\Join; use Propel\Runtime\ActiveQuery\Join;
use Propel\Runtime\Propel;
use Thelia\Model\Base\OrderQuery as BaseOrderQuery; use Thelia\Model\Base\OrderQuery as BaseOrderQuery;
use Thelia\Model\Map\OrderProductTableMap; use Thelia\Model\Map\OrderProductTableMap;

View File

@@ -91,8 +91,6 @@ trait UrlRewritingTrait
$urlFilePart = rtrim($cleanString, '.-~_') . ".html"; $urlFilePart = rtrim($cleanString, '.-~_') . ".html";
// TODO :
// check if URL url already exists, and add a numeric suffix, or the like
try { try {
$i=0; $i=0;
while (URL::getInstance()->resolve($urlFilePart)) { while (URL::getInstance()->resolve($urlFilePart)) {

View File

@@ -216,31 +216,6 @@ class Calculator
$untaxedPrice -= $currentFixTax; $untaxedPrice -= $currentFixTax;
$untaxedPrice = $untaxedPrice / (1+$currentTaxFactor); $untaxedPrice = $untaxedPrice / (1+$currentTaxFactor);
/*do {
$taxType = $taxRule->getTypeInstance();
$taxType->loadRequirements( $taxRule->getRequirements() );
$untaxedPrice -= $taxType->fixAmountRetriever();
} while ($taxRule = $this->taxRulesCollection->getPrevious());
$taxRule = $this->taxRulesCollection->getLast();
$currentTaxFactor = 0;
do {
$taxType = $taxRule->getTypeInstance();
$taxType->loadRequirements( $taxRule->getRequirements() );
$currentTaxFactor += $taxType->pricePercentRetriever($untaxedPrice);
$toto = true;
} while ($taxRule = $this->taxRulesCollection->getPrevious());
$untaxedPrice = $untaxedPrice / (1+$currentTaxFactor);*/
return $untaxedPrice; return $untaxedPrice;
} }
} }

View File

@@ -89,7 +89,8 @@ class IntToCombinedIntsListType extends BaseType
$openingParenthesesCount = 0; $openingParenthesesCount = 0;
$closingParenthesesCount = 0; $closingParenthesesCount = 0;
for ($i=0; $i<strlen($noSpaceString); $i++) { $length = strlen($noSpaceString);
for ($i=0; $i< $length; $i++) {
$char = $noSpaceString[$i]; $char = $noSpaceString[$i];
if ($char == '(') { if ($char == '(') {
/* must be : /* must be :

View File

@@ -89,7 +89,8 @@ class IntToCombinedStringsListType extends BaseType
$openingParenthesesCount = 0; $openingParenthesesCount = 0;
$closingParenthesesCount = 0; $closingParenthesesCount = 0;
for ($i=0; $i<strlen($noSpaceString); $i++) { $length = strlen($noSpaceString);
for ($i=0; $i< $length; $i++) {
$char = $noSpaceString[$i]; $char = $noSpaceString[$i];
if ($char == '(') { if ($char == '(') {
/* must be : /* must be :