@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | { |
| 26 | 26 | $shop = $this->getShop(); |
| 27 | 27 | |
| 28 | - $this->document->setTitle('Basket evaluation for' . ' ' . $shop->name); |
|
| 28 | + $this->document->setTitle('Basket evaluation for'.' '.$shop->name); |
|
| 29 | 29 | $this->document->options = array($this->url('../') => 'Close'); |
| 30 | 30 | |
| 31 | 31 | $basketevaluation = new Intraface_modules_shop_BasketEvaluation($this->mdb2, $this->getKernel()->intranet, $shop); |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | $data = array('shop' => $shop, 'evaluations' => $evaluations); |
| 35 | 35 | |
| 36 | - $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/evaluation-index'); |
|
| 36 | + $tpl = $this->template->create(dirname(__FILE__).'/../tpl/evaluation-index'); |
|
| 37 | 37 | return $tpl->render($this, $data); |
| 38 | 38 | } |
| 39 | 39 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | { |
| 22 | 22 | $this->document->setTitle($this->getModel()->getName()); |
| 23 | 23 | |
| 24 | - $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/category'); |
|
| 24 | + $tpl = $this->template->create(dirname(__FILE__).'/../tpl/category'); |
|
| 25 | 25 | return $tpl->render($this); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | 'category_object' => $this->getModel(), |
| 35 | 35 | 'regret_link' => $redirect->getRedirect($this->url('../')) |
| 36 | 36 | ); |
| 37 | - $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/categories-edit'); |
|
| 37 | + $tpl = $this->template->create(dirname(__FILE__).'/../tpl/categories-edit'); |
|
| 38 | 38 | return $tpl->render($this, $data); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | 'category_object' => $this->getModel(), |
| 42 | 42 | 'regret_link' => $redirect->getRedirect($this->url('../')) |
| 43 | 43 | ); |
| 44 | - $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/categories-edit'); |
|
| 44 | + $tpl = $this->template->create(dirname(__FILE__).'/../tpl/categories-edit'); |
|
| 45 | 45 | return $tpl->render($this, $data); |
| 46 | 46 | } |
| 47 | 47 | |
@@ -33,11 +33,11 @@ |
||
| 33 | 33 | $this->document->setTitle($shop->name); |
| 34 | 34 | |
| 35 | 35 | $this->document->options = array($this->url('../') => 'Close', |
| 36 | - $this->url(null, array('edit')) => 'Edit', |
|
| 37 | - $this->url('featuredproducts') => 'Choose featured products', |
|
| 38 | - $this->url('categories') => 'Product categories', |
|
| 39 | - $this->url('basketevaluation') => 'Basket evaluation', |
|
| 40 | - $this->url('paymentmethods') => 'Payment methods'); |
|
| 36 | + $this->url(null, array('edit')) => 'Edit', |
|
| 37 | + $this->url('featuredproducts') => 'Choose featured products', |
|
| 38 | + $this->url('categories') => 'Product categories', |
|
| 39 | + $this->url('basketevaluation') => 'Basket evaluation', |
|
| 40 | + $this->url('paymentmethods') => 'Payment methods'); |
|
| 41 | 41 | |
| 42 | 42 | $basketevaluation = new Intraface_modules_shop_BasketEvaluation($this->mdb2, $this->getKernel()->intranet, $shop); |
| 43 | 43 | $evaluations = $basketevaluation->getList(); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | $data = array('shop' => $shop, 'evaluations' => $evaluations); |
| 46 | 46 | |
| 47 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/show'); |
|
| 47 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/show'); |
|
| 48 | 48 | return $tpl->render($this, $data); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -85,8 +85,8 @@ discard block |
||
| 85 | 85 | 'settings' => $settings, |
| 86 | 86 | 'currencies' => $currencies, |
| 87 | 87 | 'languages' => $langs); |
| 88 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/edit'); |
|
| 89 | - return $this->getError()->view() . $tpl->render($this, $data); |
|
| 88 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/edit'); |
|
| 89 | + return $this->getError()->view().$tpl->render($this, $data); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | function postForm() |
@@ -77,8 +77,8 @@ |
||
| 77 | 77 | |
| 78 | 78 | function __construct(k_TemplateFactory $template, Doctrine_Connection_Common $doctrine) |
| 79 | 79 | { |
| 80 | - $this->template = $template; |
|
| 81 | - $this->doctrine = $doctrine; |
|
| 80 | + $this->template = $template; |
|
| 81 | + $this->doctrine = $doctrine; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | function map($name) |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | if (!is_null($options)) { |
| 28 | 28 | $config = HTMLPurifier_Config::createDefault(); |
| 29 | 29 | foreach ($options as $option) { |
| 30 | - $config->set($option[0] . '.' . $option[1], $option[2]); |
|
| 30 | + $config->set($option[0].'.'.$option[1], $option[2]); |
|
| 31 | 31 | } |
| 32 | 32 | } |
| 33 | 33 | $this->_htmlPurifier = new HTMLPurifier($config); |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | { |
| 46 | 46 | $options = array( |
| 47 | 47 | array('Cache', 'SerializerPath', |
| 48 | - PATH_CACHE . '/htmlpurifier' |
|
| 48 | + PATH_CACHE.'/htmlpurifier' |
|
| 49 | 49 | ), |
| 50 | 50 | //array('HTML', 'Doctype', 'XHTML 1.0 Strict'), |
| 51 | 51 | array('HTML', 'Allowed', |
@@ -149,12 +149,12 @@ discard block |
||
| 149 | 149 | $shops = Doctrine::getTable('Intraface_modules_shop_Shop')->findByIntranetId($this->getKernel()->intranet->getId()); |
| 150 | 150 | |
| 151 | 151 | if (count($shops) == 0) { |
| 152 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/empty-table'); |
|
| 152 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/empty-table'); |
|
| 153 | 153 | return $tpl->render($this, array('message' => 'No shops has been created yet.')); |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | $data = array('shops' => $shops); |
| 157 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/shops'); |
|
| 157 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/shops'); |
|
| 158 | 158 | return $tpl->render($this, $data); |
| 159 | 159 | } |
| 160 | 160 | |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | 'settings' => $settings, |
| 193 | 193 | 'currencies' => $currencies, |
| 194 | 194 | 'languages' => $langs); |
| 195 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/edit'); |
|
| 195 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/edit'); |
|
| 196 | 196 | return $tpl->render($this, $data); |
| 197 | 197 | } |
| 198 | 198 | |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | |
| 243 | 243 | function wrapHtml($content) |
| 244 | 244 | { |
| 245 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/content'); |
|
| 245 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/content'); |
|
| 246 | 246 | return $tpl->render($this, array('content' => $content)); |
| 247 | 247 | } |
| 248 | 248 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | 'kernel' => $this->getKernel(), |
| 43 | 43 | 'keywords' => $keywords); |
| 44 | 44 | |
| 45 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/featuredproducts'); |
|
| 45 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/featuredproducts'); |
|
| 46 | 46 | return $tpl->render($this, $data); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | { |
| 13 | 13 | $shop = Doctrine::getTable('Intraface_modules_shop_Shop')->find($this->getShopId()); |
| 14 | 14 | |
| 15 | - $this->document->setTitle('Payment methods for') . ' ' . $shop->name; |
|
| 15 | + $this->document->setTitle('Payment methods for').' '.$shop->name; |
|
| 16 | 16 | |
| 17 | 17 | $this->document->options = array($this->url('../') => 'Close'); |
| 18 | 18 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | $chosen = $this->getPaymentMethodsForShop(); |
| 23 | 23 | |
| 24 | 24 | $data = array('shop' => $shop, 'methods' => $methods, 'chosen' => $chosen); |
| 25 | - $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/paymentmethods-index'); |
|
| 25 | + $tpl = $this->template->create(dirname(__FILE__).'/../tpl/paymentmethods-index'); |
|
| 26 | 26 | return $tpl->render($this, $data); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -319,23 +319,23 @@ |
||
| 319 | 319 | { |
| 320 | 320 | $units = array( |
| 321 | 321 | 1 => array('singular' => '', |
| 322 | - 'plural' => '', |
|
| 323 | - 'combined' => ''), |
|
| 322 | + 'plural' => '', |
|
| 323 | + 'combined' => ''), |
|
| 324 | 324 | 2 => array('singular' => 'unit', |
| 325 | - 'plural' => 'units', |
|
| 326 | - 'combined' => 'unit(s)'), |
|
| 325 | + 'plural' => 'units', |
|
| 326 | + 'combined' => 'unit(s)'), |
|
| 327 | 327 | 3 => array('singular' => 'day', |
| 328 | - 'plural' => 'days', |
|
| 329 | - 'combined' => 'day(s)'), |
|
| 328 | + 'plural' => 'days', |
|
| 329 | + 'combined' => 'day(s)'), |
|
| 330 | 330 | 4 => array('singular' => 'month (singular)', |
| 331 | - 'plural' => 'month (plural)', |
|
| 332 | - 'combined' => 'month (combined)'), |
|
| 331 | + 'plural' => 'month (plural)', |
|
| 332 | + 'combined' => 'month (combined)'), |
|
| 333 | 333 | 5 => array('singular' => 'year', |
| 334 | - 'plural' => 'years', |
|
| 335 | - 'combined' => 'year(s)'), |
|
| 334 | + 'plural' => 'years', |
|
| 335 | + 'combined' => 'year(s)'), |
|
| 336 | 336 | 6 => array('singular' => 'hour', |
| 337 | - 'plural' => 'hours', |
|
| 338 | - 'combined' => 'hour(s)') |
|
| 337 | + 'plural' => 'hours', |
|
| 338 | + 'combined' => 'hour(s)') |
|
| 339 | 339 | ); |
| 340 | 340 | |
| 341 | 341 | if ($key === null) { |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | /** |
| 185 | 185 | * Returns the price of the product |
| 186 | 186 | * |
| 187 | - * @return object Ilib_Variable_Float with price |
|
| 187 | + * @return Ilib_Variable_Float Ilib_Variable_Float with price |
|
| 188 | 188 | */ |
| 189 | 189 | public function getPrice() |
| 190 | 190 | { |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | /** |
| 195 | 195 | * Used to set price |
| 196 | 196 | * |
| 197 | - * @param object $price Ilib_Variable_Float |
|
| 197 | + * @param Ilib_Variable_Float $price Ilib_Variable_Float |
|
| 198 | 198 | * @return void |
| 199 | 199 | */ |
| 200 | 200 | public function setPrice(Ilib_Variable_Float $price) |
@@ -206,9 +206,9 @@ discard block |
||
| 206 | 206 | * Returns the price of the product in given currency |
| 207 | 207 | * |
| 208 | 208 | * @param object $currency Intraface_modules_currency_Currency |
| 209 | - * @param integer $exchange_rage_id |
|
| 209 | + * @param integer $exchange_rate_id |
|
| 210 | 210 | * |
| 211 | - * @return obejct Ilib_Variable_Float with price of the variation in given currency |
|
| 211 | + * @return Ilib_Variable_Float Ilib_Variable_Float with price of the variation in given currency |
|
| 212 | 212 | */ |
| 213 | 213 | public function getPriceInCurrency($currency, $exchange_rate_id = 0) |
| 214 | 214 | { |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | /** |
| 219 | 219 | * Returns price include vat of the product |
| 220 | 220 | * |
| 221 | - * @return object Ilib_Variable_Float with price including vat |
|
| 221 | + * @return Ilib_Variable_Float Ilib_Variable_Float with price including vat |
|
| 222 | 222 | */ |
| 223 | 223 | public function getPriceIncludingVat() |
| 224 | 224 | { |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | * |
| 231 | 231 | * @param object $currency Intraface_modules_currency_Currency |
| 232 | 232 | * @param integer $exchange_rate_id |
| 233 | - * @return object Ilib_Variable_Float with price including vat in given currency |
|
| 233 | + * @return Ilib_Variable_Float Ilib_Variable_Float with price including vat in given currency |
|
| 234 | 234 | */ |
| 235 | 235 | public function getPriceIncludingVatInCurrency($currency, $exchange_rate_id) |
| 236 | 236 | { |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | /** |
| 246 | 246 | * Returns the before price of the product |
| 247 | 247 | * |
| 248 | - * @return object Ilib_Variable_Float with price |
|
| 248 | + * @return Ilib_Variable_Float Ilib_Variable_Float with price |
|
| 249 | 249 | */ |
| 250 | 250 | public function getBeforePrice() |
| 251 | 251 | { |
@@ -256,9 +256,9 @@ discard block |
||
| 256 | 256 | * Returns the before price of the product in given currency |
| 257 | 257 | * |
| 258 | 258 | * @param object $currency Intraface_modules_currency_Currency |
| 259 | - * @param integer $exchange_rage_id |
|
| 259 | + * @param integer $exchange_rate_id |
|
| 260 | 260 | * |
| 261 | - * @return obejct Ilib_Variable_Float with price of the variation in given currency |
|
| 261 | + * @return Ilib_Variable_Float Ilib_Variable_Float with price of the variation in given currency |
|
| 262 | 262 | */ |
| 263 | 263 | public function getBeforePriceInCurrency($currency, $exchange_rate_id = 0) |
| 264 | 264 | { |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | /** |
| 269 | 269 | * Returns before price include vat of the product |
| 270 | 270 | * |
| 271 | - * @return object Ilib_Variable_Float with price including vat |
|
| 271 | + * @return Ilib_Variable_Float Ilib_Variable_Float with price including vat |
|
| 272 | 272 | */ |
| 273 | 273 | public function getBeforePriceIncludingVat() |
| 274 | 274 | { |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | * |
| 281 | 281 | * @param object $currency Intraface_modules_currency_Currency |
| 282 | 282 | * @param integer $exchange_rate_id |
| 283 | - * @return object Ilib_Variable_Float with price including vat in given currency |
|
| 283 | + * @return Ilib_Variable_Float Ilib_Variable_Float with price including vat in given currency |
|
| 284 | 284 | */ |
| 285 | 285 | public function getBeforePriceIncludingVatInCurrency($currency, $exchange_rate_id) |
| 286 | 286 | { |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | |
| 290 | 290 | /** |
| 291 | 291 | * Sets the weight |
| 292 | - * @param object $value Ilib_Value_Float |
|
| 292 | + * @param Ilib_Variable_Float $value Ilib_Value_Float |
|
| 293 | 293 | * @return void |
| 294 | 294 | */ |
| 295 | 295 | public function setWeight(Ilib_Variable_Float $value) |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | /** |
| 301 | 301 | * Returns the weight of the product |
| 302 | 302 | * |
| 303 | - * @return object Ilib_Variable_Float with price |
|
| 303 | + * @return Ilib_Variable_Float Ilib_Variable_Float with price |
|
| 304 | 304 | */ |
| 305 | 305 | public function getWeight() |
| 306 | 306 | { |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | /** |
| 362 | 362 | * Returns the var percenttage of the product |
| 363 | 363 | * |
| 364 | - * @return object Ilib_Variable_Float with vat percent |
|
| 364 | + * @return Ilib_Variable_Float Ilib_Variable_Float with vat percent |
|
| 365 | 365 | */ |
| 366 | 366 | public function getVatPercent() |
| 367 | 367 | { |
@@ -73,15 +73,15 @@ discard block |
||
| 73 | 73 | //->innerJoin('Intraface_modules_product_ProductDoctrine.details AS details') |
| 74 | 74 | //->addWhere('active = 1') |
| 75 | 75 | ->addWhere('active = 1') |
| 76 | - ->addWhere('number = ' . $this->number) |
|
| 77 | - ->addWhere('intranet_id = ' . $this->intranet_id) |
|
| 78 | - ->addWhere('product_id <> ' . $product_id); |
|
| 76 | + ->addWhere('number = '.$this->number) |
|
| 77 | + ->addWhere('intranet_id = '.$this->intranet_id) |
|
| 78 | + ->addWhere('product_id <> '.$product_id); |
|
| 79 | 79 | |
| 80 | 80 | // not necessary to execute query when counting |
| 81 | 81 | //$collection = $dql->execute(); |
| 82 | 82 | |
| 83 | 83 | if ($dql->count() > 0) { |
| 84 | - $this->getErrorStack()->add('number', $this->number . ' has already been added'); |
|
| 84 | + $this->getErrorStack()->add('number', $this->number.' has already been added'); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | return true; |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | public function getPriceInCurrency($currency, $exchange_rate_id = 0) |
| 214 | 214 | { |
| 215 | - return new Ilib_Variable_Float(round($this->getPrice()->getAsIso() / ($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso() / 100), 2)); |
|
| 215 | + return new Ilib_Variable_Float(round($this->getPrice()->getAsIso()/($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso()/100), 2)); |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | /** |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | */ |
| 223 | 223 | public function getPriceIncludingVat() |
| 224 | 224 | { |
| 225 | - return new Ilib_Variable_Float($this->getPrice()->getAsIso(2) * (1 + $this->getVatPercent()->getAsIso()/100)); |
|
| 225 | + return new Ilib_Variable_Float($this->getPrice()->getAsIso(2)*(1 + $this->getVatPercent()->getAsIso()/100)); |
|
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | /** |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | */ |
| 235 | 235 | public function getPriceIncludingVatInCurrency($currency, $exchange_rate_id) |
| 236 | 236 | { |
| 237 | - return new Ilib_Variable_Float($this->getPriceIncludingVat()->getAsIso() / ($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso() / 100)); |
|
| 237 | + return new Ilib_Variable_Float($this->getPriceIncludingVat()->getAsIso()/($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso()/100)); |
|
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | public function setBeforePrice(Ilib_Variable_Float $value) |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | */ |
| 263 | 263 | public function getBeforePriceInCurrency($currency, $exchange_rate_id = 0) |
| 264 | 264 | { |
| 265 | - return new Ilib_Variable_Float(round($this->getBeforePrice($product)->getAsIso() / ($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso() / 100), 2)); |
|
| 265 | + return new Ilib_Variable_Float(round($this->getBeforePrice($product)->getAsIso()/($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso()/100), 2)); |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | /** |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | */ |
| 273 | 273 | public function getBeforePriceIncludingVat() |
| 274 | 274 | { |
| 275 | - return new Ilib_Variable_Float($this->getBeforePrice()->getAsIso(2) * (1 + $this->getVatPercent()->getAsIso()/100)); |
|
| 275 | + return new Ilib_Variable_Float($this->getBeforePrice()->getAsIso(2)*(1 + $this->getVatPercent()->getAsIso()/100)); |
|
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | /** |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | */ |
| 285 | 285 | public function getBeforePriceIncludingVatInCurrency($currency, $exchange_rate_id) |
| 286 | 286 | { |
| 287 | - return new Ilib_Variable_Float($this->getBeforePriceIncludingVat()->getAsIso() / ($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso() / 100)); |
|
| 287 | + return new Ilib_Variable_Float($this->getBeforePriceIncludingVat()->getAsIso()/($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso()/100)); |
|
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | /** |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | 'db' => $this->mdb2 |
| 39 | 39 | ); |
| 40 | 40 | |
| 41 | - $smarty = $this->template->create(dirname(__FILE__) . '/../tpl/show-plain-text'); |
|
| 41 | + $smarty = $this->template->create(dirname(__FILE__).'/../tpl/show-plain-text'); |
|
| 42 | 42 | return $smarty->render($this, $data); |
| 43 | 43 | } |
| 44 | 44 | |