Global variable or function should never be used 24

  • Major
  • Architecture

More information: https://insight.symfony.com/what-we-analyse/php.use_global_variable_or_function

  1. * @param $insert_id
  2. * @return email
  3. * @access public
  4. */
  5. public function sendCustomerEmail($insert_id) {
  6. global $CLICSHOPPING_PM;

    $CLICSHOPPING_PM adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  7. $CLICSHOPPING_Customer = Registry::get('Customer');
  8. $CLICSHOPPING_Currencies = Registry::get('Currencies');
  9. $Qorder = $this->db->prepare('select *
  1. return $check;
  2. }
  3. private function getMail() {
  4. global $tracking_id;

    $tracking_id adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Hooks = Registry::get('Hooks');
  6. $CLICSHOPPING_Mail = Registry::get('Mail');
  7. if ($this->oID != 0) {
  1. if (!empty($user_name)) {
  2. $this->_user_name = $user_name;
  3. }
  4. $GLOBALS[$this->_module] = new $module();

    $ adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  5. $GLOBALS[$this->_module]->setIdentifier();
  6. }
  7. public function canPerform() {
  8. if (!is_null($this->_module)) {
  1. include($CLICSHOPPING_Template->getDirectoryPathModuleShop() . '/action_recorder/' . $file);
  2. $class = substr($file, 0, strrpos($file, '.'));
  3. if (class_exists($class)) {
  4. $GLOBALS[$class] = new $class;

    $ adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by clicshopping
  5. }
  6. }
  7. $modules_array = [];
  8. $modules_list_array = array(array('id' => '',
  1. * Generate a form hidden element
  2. *
  3. * @return string session_name(), session_name()
  4. */
  5. public static function hideSessionId() {
  6. global $session_started, $SID;

    $SID adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  7. if (($session_started === true) && (!empty($SID) || !is_null($SID))) {
  8. return static::hiddenField(session_name(), session_name());
  9. }
  10. }
  1. * Generate a form hidden element
  2. *
  3. * @return string session_name(), session_name()
  4. */
  5. public static function hideSessionId() {
  6. global $session_started, $SID;

    $session_started adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  7. if (($session_started === true) && (!empty($SID) || !is_null($SID))) {
  8. return static::hiddenField(session_name(), session_name());
  9. }
  10. }
  1. if (!empty($user_name)) {
  2. $this->_user_name = $user_name;
  3. }
  4. $GLOBALS[$this->_module] = new $module();

    $ adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  5. $GLOBALS[$this->_module]->setIdentifier();
  6. }
  7. }
  1. class PDF extends FPDF {
  2. private $pdf;
  3. private static function getGlobalPdf() {
  4. global $pdf;

    $pdf adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by oitsuki
  5. return $pdf;
  6. }
  7. public function roundedRect($x, $y, $w, $h,$r, $style = '') {
  1. use ClicShopping\Sites\Shop\AddressBook;
  2. class Edit extends \ClicShopping\OM\PagesActionsAbstract {
  3. public function execute() {
  4. global $exists;

    $exists adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Db = Registry::get('Db');
  6. $CLICSHOPPING_Customer = Registry::get('Customer');
  7. $CLICSHOPPING_MessageStack = Registry::get('MessageStack');
  8. $CLICSHOPPING_Hooks = Registry::get('Hooks');
  1. use ClicShopping\Sites\Shop\AddressBook;
  2. class AddressBookProcess extends \ClicShopping\OM\PagesActionsAbstract {
  3. public function execute() {
  4. global $exists;

    $exists adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Customer = Registry::get('Customer');
  6. $CLICSHOPPING_Breadcrumb= Registry::get('Breadcrumb');
  7. $CLICSHOPPING_Template = Registry::get('Template');
  8. $CLICSHOPPING_NavigationHistory = Registry::get('NavigationHistory');
  1. use ClicShopping\Sites\Common\PDF;
  2. class OrderInvoice extends \ClicShopping\OM\PagesActionsAbstract {
  3. public function execute() {
  4. global $pdf;

    $pdf adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Customer = Registry::get('Customer');
  6. $CLICSHOPPING_Currencies = Registry::get('Currencies');
  7. $CLICSHOPPING_NavigationHistory = Registry::get('NavigationHistory');
  8. $CLICSHOPPING_Db = Registry::get('Db');
  1. use ClicShopping\OM\Registry;
  2. class PasswordForgotten extends \ClicShopping\OM\PagesActionsAbstract {
  3. public function execute() {
  4. global $password_reset_initiated;

    $password_reset_initiated adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by oitsuki
  5. $CLICSHOPPING_Breadcrumb= Registry::get('Breadcrumb');
  6. $CLICSHOPPING_Template = Registry::get('Template');
  7. $CLICSHOPPING_Language = Registry::get('Language');
  1. use ClicShopping\Apps\Configuration\TemplateEmail\Classes\Shop\TemplateEmail;
  2. class Process extends \ClicShopping\OM\PagesActionsAbstract {
  3. public function execute() {
  4. global $password_reset_initiated;

    $password_reset_initiated adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by oitsuki
  5. $CLICSHOPPING_Db = Registry::get('Db');
  6. $CLICSHOPPING_MessageStack = Registry::get('MessageStack');
  7. $CLICSHOPPING_Mail = Registry::get('Mail');
  8. $CLICSHOPPING_Hooks = Registry::get('Hooks');
  1. use ClicShopping\Sites\Shop\Payment;
  2. class Confirmation extends \ClicShopping\OM\PagesActionsAbstract {
  3. public function execute() {
  4. global $form_action_url, $CLICSHOPPING_PM;

    $CLICSHOPPING_PM adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Customer = Registry::get('Customer');
  6. $CLICSHOPPING_ShoppingCart = Registry::get('ShoppingCart');
  7. $CLICSHOPPING_NavigationHistory = Registry::get('NavigationHistory');
  8. $CLICSHOPPING_Breadcrumb = Registry::get('Breadcrumb');
  1. use ClicShopping\Sites\Shop\Payment;
  2. class Confirmation extends \ClicShopping\OM\PagesActionsAbstract {
  3. public function execute() {
  4. global $form_action_url, $CLICSHOPPING_PM;

    $form_action_url adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Customer = Registry::get('Customer');
  6. $CLICSHOPPING_ShoppingCart = Registry::get('ShoppingCart');
  7. $CLICSHOPPING_NavigationHistory = Registry::get('NavigationHistory');
  8. $CLICSHOPPING_Breadcrumb = Registry::get('Breadcrumb');
  1. use ClicShopping\Sites\Shop\Shipping;
  2. class Process extends \ClicShopping\OM\PagesActionsAbstract {
  3. public function execute() {
  4. global $CLICSHOPPING_PM;

    $CLICSHOPPING_PM adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Customer = Registry::get('Customer');
  6. $CLICSHOPPING_NavigationHistory = Registry::get('NavigationHistory');
  7. $CLICSHOPPING_Order = Registry::get('Order');
  8. $CLICSHOPPING_ShoppingCart = Registry::get('ShoppingCart');
  1. header('Content-Type: text/xml');
  2. class OpenSearch extends \ClicShopping\OM\PagesActionsAbstract {
  3. public function execute() {
  4. global $output;

    $output adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  5. if ( !defined('MODULE_HEADER_TAGS_OPENSEARCH_STATUS') || (MODULE_HEADER_TAGS_OPENSEARCH_STATUS != 'True') ) {
  6. exit;
  7. }
  1. use ClicShopping\OM\Registry;
  2. class Q extends \ClicShopping\OM\PagesActionsAbstract {
  3. public function execute() {
  4. global $listingTotalRow, $Qlisting;

    $listingTotalRow adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Breadcrumb = Registry::get('Breadcrumb');
  6. $CLICSHOPPING_Template = Registry::get('Template');
  7. $CLICSHOPPING_MessageStack= Registry::get('MessageStack');
  8. $CLICSHOPPING_Search = Registry::get('Search');
  1. use ClicShopping\OM\Registry;
  2. class Q extends \ClicShopping\OM\PagesActionsAbstract {
  3. public function execute() {
  4. global $listingTotalRow, $Qlisting;

    $Qlisting adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Breadcrumb = Registry::get('Breadcrumb');
  6. $CLICSHOPPING_Template = Registry::get('Template');
  7. $CLICSHOPPING_MessageStack= Registry::get('MessageStack');
  8. $CLICSHOPPING_Search = Registry::get('Search');
  1. *
  2. * @return $result : sql sesult
  3. * @access public
  4. */
  5. public function execute() {
  6. global $Qlisting;

    $Qlisting adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  7. $CLICSHOPPING_Customer = Registry::get('Customer');
  8. $CLICSHOPPING_CategoryTree = Registry::get('CategoryTree');
  9. $CLICSHOPPING_Currencies = Registry::get('Currencies');
  10. $CLICSHOPPING_Language = Registry::get('Language');
  1. * Restore the good qty in function B2BC / B2C or not and qty minimal or maximal defined
  2. * string $qty
  3. */
  4. private function getRestoreQty() {
  5. global $qty, $products_id;

    $products_id adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  6. $qty = $this->getCheckGoodQty($products_id, $qty);
  7. return $qty;
  8. }
  1. * Restore the good qty in function B2BC / B2C or not and qty minimal or maximal defined
  2. * string $qty
  3. */
  4. private function getRestoreQty() {
  5. global $qty, $products_id;

    $qty adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  6. $qty = $this->getCheckGoodQty($products_id, $qty);
  7. return $qty;
  8. }
  1. * @return void
  2. */
  3. public function cleanGlobals() {
  4. foreach ( $_GET as $key => $value ) {
  5. if ( array_key_exists ( $key, $GLOBALS ) ) {
  6. $GLOBALS[$key] = $value;

    $ adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  7. }
  8. }
  9. } // end method
  10. } // end class
  1. $this->enabled = (MODULE_SHOPPING_CART_DELAY_SAVE_CART_MESSAGE_STATUS == 'True');
  2. }
  3. }
  4. public function execute() {
  5. global $any_out_of_stock;

    $any_out_of_stock adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by ClicShopping
  6. $CLICSHOPPING_ShoppingCart = Registry::get('ShoppingCart');
  7. $CLICSHOPPING_Template = Registry::get('Template');
  8. if (isset($_GET['Cart']) && $CLICSHOPPING_ShoppingCart->getCountContents() > 0) {

Booleans and null should be compared strictly 5

  • Minor
  • Bugrisk

More information: https://insight.symfony.com/what-we-analyse/php.strict_boolean_comparison_should_be_used

  1. $Qcheck->bindInt(':products_id', $products_id);
  2. $Qcheck->execute();
  3. if ($Qcheck->fetch() !== false) {
  4. if ($notify == true) {

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $_SESSION['new_products_id_inCart'] = $products_id;
  6. }
  7. if ($this->inCart($products_id_string)) {
  8. $this->updateQuantity($products_id_string, $qty, $attributes);
  1. $Qcheck->bindInt(':products_id', $products_id);
  2. $Qcheck->execute();
  3. if ($Qcheck->fetch() !== false) {
  4. if ($notify == true) {

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $_SESSION['new_products_id_inCart'] = $products_id;
  6. }
  7. if ($this->inCart($products_id_string)) {
  8. $this->updateQuantity($products_id_string, $qty, $attributes);
  1. break;
  2. }
  3. }
  4. }
  5. if (is_numeric($products_id) && isset($this->contents[$products_id_string]) && is_numeric($quantity) && ($attributes_pass_check == true)) {

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $this->contents[$products_id_string] = ['qty' => (int)$quantity];
  7. // update database
  8. if ($this->customer->isLoggedOn()) {
  9. $this->db->save('customers_basket', ['customers_basket_quantity' => (int)$quantity],
  10. ['customers_id' => (int)$this->customer->getID(),
  1. public function getButtonViewDetails($constant, $products_id, $icon = null, $button_color = 'info', $params = null, $button_size = 'sm') {
  2. $button = '';
  3. if ($constant == 'False') {
  4. if ($icon == null) {

    With booleans and null, only strict comparison (with === operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $button = HTML::button(CLICSHOPPING::getDef('button_details'), '', $this->rewriteUrl->getProductNameUrl($products_id), $button_color, $params, $button_size);
  6. } else {
  7. $button = HTML::button(null, $icon, $this->rewriteUrl->getProductNameUrl($products_id), $button_color, $params, $button_size);
  8. }
  9. }
  1. $CLICSHOPPING_Payment = Registry::get('Payment');
  2. $content_width = (int)MODULE_CHECKOUT_CONFIRMATION_PROCESS_ORDER_CONTENT_WIDTH;
  3. if (is_array($CLICSHOPPING_Payment->modules)) {
  4. if ($CLICSHOPPING_Payment->process_button() != false) {

    With booleans and null, only strict comparison (with !== operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $process_button = $CLICSHOPPING_Payment->process_button();
  6. } else {
  7. $process_button = HTML::button(CLICSHOPPING::getDef('module_checkout_confirmation_process_order_button_pay', ['total' => $CLICSHOPPING_Currencies->format($CLICSHOPPING_Order->info['total'], true, $CLICSHOPPING_Order->info['currency'], $CLICSHOPPING_Order->info['currency_value'])]), null, null, 'success', ['params' => 'data-button="payNow"']);
  8. }
  9. }

Unused method, property, variable or parameter 100

  • Minor
  • Deadcode

More information: https://insight.symfony.com/what-we-analyse/php.unused_local_variable_or_private_member

  1. } else {
  2. $form_action_url = CLICSHOPPING::link(null, 'Checkout&Process');
  3. }
  4. if (is_array($CLICSHOPPING_Payment->modules)) {
  5. $confirmation = $CLICSHOPPING_Payment->confirmation();

    This confirmation local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. }
  7. // templates
  8. $this->page->setFile('checkout_confirmation.php');
  9. //Content
  1. $CLICSHOPPING_MessageStack->add(CLICSHOPPING::getDef('error_at_least_one_input'), 'danger', 'search');
  2. } else {
  3. $search = $CLICSHOPPING_Search->getResult();
  4. $listingTotalRow = $search['total'];

    This listingTotalRow local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $Qlisting->setPageSet($max_display);
  6. $Qlisting->execute();
  7. }
  1. */
  2. public function getProductsUrlRewrited() {
  3. return $this->rewriteUrl;
  4. }
  5. public function getProductsNameUrl($products_id, $in_stock) {

    This in_stock argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $products_name = HTML::link($this->rewriteUrl->getProductNameUrl($products_id), '<span itemprop="name">' . $this->productsCommon->getProductsName($products_id) .'</span>', 'itemprop="url"');
  7. return $products_name;
  8. }
  1. }
  2. if ($error === false) {
  3. $sql_data_array['image'] = $dir_products_image . $image->getFilename();
  4. } else {
  5. $sql_data_array['image'] = '';

    This sql_data_array local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. }
  7. if ($image->check()) {
  8. $image_name = $image->getFilename();
  9. $CLICSHOPPING_ImageResample->load($CLICSHOPPING_Template->getDirectoryPathTemplateShopImages() . $dir_products_image . $image_name);
  1. if ($products_packaging == 0) $products_packaging = 'null';
  2. if ($products_packaging == 1) $products_packaging = 'http://schema.org/NewCondition';
  3. if ($products_packaging == 2) $products_packaging = 'http://schema.org/RefurbishedCondition';
  4. if ($products_packaging == 3) $products_packaging = 'http://schema.org/UsedCondition';
  5. $ean = $CLICSHOPPING_ProductsCommon->getProductsEAN();

    This ean local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $sku = $CLICSHOPPING_ProductsCommon->getProductsSKU();
  7. $result = '<!-- products json_ltd -->' . "\n";
  8. $result .= '
  9. <script type="application/ld+json">
  1. if($this->createFile == 1) {
  2. // newsletter file inserted in the pub directory
  3. if (function_exists('file_put_contents')) {
  4. $newsletters_id = $Qmail->valueInt('newsletters_id');

    This newsletters_id local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. $file_newsletter = CLICSHOPPING::getConfig('dir_root', 'Shop') . 'sources/public/newsletter/newsletter_'. $this->fileId .'.html';
  6. $directory = '<a href="'. CLICSHOPPING::getConfig('http_server', 'Shop') . '/sources/public/newsletter/newsletter_'. $this->fileId .'.html" target="_blank" rel="noreferrer">'. CLICSHOPPING::getConfig('http_server', 'Shop') . '/sources/public/newsletter/newsletter_'. $this->fileId .'.html</a>';
  7. // ----------------------
  8. // creating document
  9. // ----------------------
  1. } else {
  2. $page_liste_box_secondary .= '<span>' . HTML::link(CLICSHOPPING::link($QPageSecondary->value('externallink')), $QPageSecondary->value('pages_title'), 'target="' . $QPageSecondary->value('links_target') . '"') . '</span><br />';
  3. }
  4. } else {
  5. if ($QPageSecondary->valueInt('pages_id') != 3) {
  6. $link = $this->rewriteUrl->getPageManagerContentUrl($QPageSecondary->valueInt('pages_id'));

    This link local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  7. } else {
  8. $link_secondary = CLICSHOPPING::link(null, 'Info&Contact');
  9. }
  10. if (!empty($QPageSecondary->value('pages_title'))) {
  1. $message_info_admin = $CLICSHOPPING_PageManager->getDef('entry_information_admin');
  2. }
  3. $message_to_admin = $email_subject . ' ' . STORE_NAME . "\n\n" . $message_info_admin . "\n\n" . $CLICSHOPPING_PageManager->getDef('entry_date') . ' ' . $today . "\n". $num_customer_id . "\n". $CLICSHOPPING_PageManager->getDef('entry_order') . ' ' . $order_id . "\n". $CLICSHOPPING_PageManager->getDef('entry_name') . ' ' . $name . "\n". $CLICSHOPPING_PageManager->getDef('entry_email') . ' ' . $email_address . "\n". $CLICSHOPPING_PageManager->getDef('entry_enquiry_customer_information') . ' ' . $enquiry . "\n\n" . $CLICSHOPPING_PageManager->getDef('entry_admin_read_message') . "\n\n";
  4. $CLICSHOPPING_Mail->clicMail(preg_replace('/\<[^*]*/', '', $send_to_array[$send_to]), $send_to_email, $email_subject, $message_to_admin, $name, $email_address);
  5. $contact_department = $send_to_array[$send_to];

    This contact_department local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. // send information to customer
  7. $message_to_customer = $email_subject . ' ' . STORE_NAME . "\n\n" . $CLICSHOPPING_PageManager->getDef('entry_date') . ' ' . $today . "\n". $num_customer_id . "\n\n" . $CLICSHOPPING_PageManager->getDef('entry_order') . ' ' . $order_id . "\n" . $CLICSHOPPING_PageManager->getDef('entry_name') . ' ' . $name . "\n" . $CLICSHOPPING_PageManager->getDef('entry_customers_phone') . ' ' . $customers_telephone . "\n" . $CLICSHOPPING_PageManager->getDef('entry_email') . ' ' . $email_address . "\n" . $CLICSHOPPING_PageManager->getDef('entry_enquiry_customer') . ' ' . $enquiry . "\n\n" . $CLICSHOPPING_PageManager->getDef('entry_additional_information') . "\n\n" . $template_email_footer;
  8. $CLICSHOPPING_Mail->clicMail(STORE_OWNER, $email_address, $CLICSHOPPING_PageManager->getDef('entry_email_object_customer'), $message_to_customer, $name, STORE_OWNER_EMAIL_ADDRESS);
  1. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Modules->getDef('alert_module_install_success'), 'success', 'Modules');
  2. $CLICSHOPPING_Modules->redirect('Configure&module=' . $current_module);
  3. }
  4. private static function installDbMenuAdministration() {

    This installDbMenuAdministration method is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by oitsuki
  5. $CLICSHOPPING_Db = Registry::get('Db');
  6. $CLICSHOPPING_Modules = Registry::get('Modules');
  7. $CLICSHOPPING_Language = Registry::get('Language');
  8. $Qcheck = $CLICSHOPPING_Db->get('administrator_menu', 'app_code', ['app_code' => 'app_configuration_modules']);
  1. public function __construct() {
  2. $this->app = Registry::get('Weight');
  3. }
  4. public function execute() {
  5. $CLICSHOPPING_MessageStack = Registry::get('MessageStack');

    This CLICSHOPPING_MessageStack local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $weight_class_from_id_old = HTML::sanitize($_GET['wID']);
  7. $weight_class_to_id_old = HTML::sanitize($_GET['tID']);
  8. $weight_class_from_id = HTML::sanitize($_POST['weight_class_id']);
  1. $customers_tva_intracom_code_iso = HTML::sanitize($_POST['customers_tva_intracom_code_iso']);
  2. $customers_tva_intracom_code_iso = strtoupper($customers_tva_intracom_code_iso);
  3. $customers_tva_intracom = HTML::sanitize($_POST['customers_tva_intracom']);
  4. // Informations sur le type de facturation
  5. $customers_options_order_taxe = HTML::sanitize($_POST['customers_options_order_taxe']);

    This customers_options_order_taxe local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. $default_address_id = HTML::sanitize($_POST['default_address_id']);
  7. $customers_street_address = HTML::sanitize($_POST['customers_street_address']);
  8. $customers_suburb = HTML::sanitize($_POST['customers_suburb']);
  9. $customers_postcode = HTML::sanitize($_POST['postcode']);
  10. $customers_city = HTML::sanitize($_POST['city']);
  1. $customers_tva_intracom_code_iso = strtoupper($customers_tva_intracom_code_iso);
  2. $customers_tva_intracom = HTML::sanitize($_POST['customers_tva_intracom']);
  3. // Informations sur le type de facturation
  4. $customers_options_order_taxe = HTML::sanitize($_POST['customers_options_order_taxe']);
  5. $default_address_id = HTML::sanitize($_POST['default_address_id']);

    This default_address_id local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. $customers_street_address = HTML::sanitize($_POST['customers_street_address']);
  7. $customers_suburb = HTML::sanitize($_POST['customers_suburb']);
  8. $customers_postcode = HTML::sanitize($_POST['postcode']);
  9. $customers_city = HTML::sanitize($_POST['city']);
  10. $customers_country_id = HTML::sanitize($_POST['country']);
  1. ');
  2. $Qmultiplecustomers->bindInt(':customers_group_id', $QmultipleGroups->valueInt('customers_group_id') );
  3. $Qmultiplecustomers->execute();
  4. if (!($multiple_groups = $Qmultiplecustomers->fetch())) {

    This multiple_groups local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $Qdelete = $CLICSHOPPING_Customers->db->prepare('select
  6. from :table_products_groups
  7. where customers_group_id = :customers_group_id
  8. ');
  9. $Qdelete->bindInt(':customers_group_id', $QmultipleGroups->valueInt('customers_group_id'));
  1. if (strlen($customers_firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
  2. $error = true;
  3. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_firstname'), 'error', 'head');
  4. $entry_firstname_error = true;
  5. } else {
  6. $entry_firstname_error = false;

    This entry_firstname_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by oitsuki
  7. }
  8. if (strlen($customers_lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
  9. $error = true;
  10. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_lastname'), 'error', 'head');
  11. $entry_lastname_error = true;
  1. if (strlen($customers_lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
  2. $error = true;
  3. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_lastname'), 'error', 'head');
  4. $entry_lastname_error = true;
  5. } else {
  6. $entry_lastname_error = false;

    This entry_lastname_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by oitsuki
  7. }
  8. $entry_email_address_error = false;
  9. if (!Is::email($customers_email_address)) {
  1. $entry_lastname_error = true;
  2. } else {
  3. $entry_lastname_error = false;
  4. }
  5. $entry_email_address_error = false;

    This entry_email_address_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. if (!Is::email($customers_email_address)) {
  7. $error = true;
  8. $entry_email_address_check_error = true;
  9. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_email'), 'error', 'head');
  1. if (!Is::email($customers_email_address)) {
  2. $error = true;
  3. $entry_email_address_check_error = true;
  4. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_email'), 'error', 'head');
  5. } else {
  6. $entry_email_address_check_error = false;

    This entry_email_address_check_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by oitsuki
  7. }
  8. if (strlen($customers_street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
  9. $error = true;
  10. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_addess'), 'error', 'head');
  1. if (strlen($customers_street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
  2. $error = true;
  3. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_addess'), 'error', 'head');
  4. $entry_street_address_error = true;
  5. } else {
  6. $entry_street_address_error = false;

    This entry_street_address_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by oitsuki
  7. }
  8. if (strlen($customers_postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
  9. $error = true;
  10. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_postcode'), 'error', 'head');
  1. if (strlen($customers_postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
  2. $error = true;
  3. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_postcode'), 'error', 'head');
  4. $entry_post_code_error = true;
  5. } else {
  6. $entry_post_code_error = false;

    This entry_post_code_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by oitsuki
  7. }
  8. if (strlen($customers_city) < ENTRY_CITY_MIN_LENGTH) {
  9. $error = true;
  10. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_city'), 'error', 'head');
  1. if (strlen($customers_city) < ENTRY_CITY_MIN_LENGTH) {
  2. $error = true;
  3. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_city'), 'error', 'head');
  4. $entry_city_error = true;
  5. } else {
  6. $entry_city_error = false;

    This entry_city_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by oitsuki
  7. }
  8. if ($customers_country_id === false) {
  9. $error = true;
  10. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_country'), 'error', 'header');
  1. if (ACCOUNT_STATE == 'true') {
  2. if ($entry_country_error === true) {
  3. $entry_state_error = true;
  4. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('entry_state_error_select'), 'error', 'header');
  5. } else {
  6. $zone_id = 0;

    This zone_id local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  7. $entry_state_error = false;
  8. $Qcheck = $CLICSHOPPING_Customers->db->get('zones', 'zone_country_id', ['zone_country_id' => (int)$customers_country_id]);
  9. $entry_state_has_zones = $Qcheck->fetch() !== false;
  1. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('entry_state_error_select'), 'error', 'header');
  2. }
  3. } else {
  4. if (strlen($customers_state) < ENTRY_STATE_MIN_LENGTH) {
  5. $error = true;
  6. $entry_state_error = true;

    This entry_state_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  7. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('entry_state_error_select'), 'error', 'header');
  8. }
  9. }
  10. }
  11. }
  1. if ($Qcheck->fetch() !== false) {
  2. $error = true;
  3. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_email_address_exist'), 'error', 'header');
  4. $entry_email_address_exists = true;

    This entry_email_address_exists local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. }
  6. if ($error === false) {
  7. $customers_password = 'clicshopping_' . rand(5, 500);
  1. 'entry_city' => $customers_city
  2. ];
  3. if (ACCOUNT_STATE == 'true') {
  4. if (isset($entry_zone_id) && $entry_zone_id > 0) $entry_state = '';

    This entry_state local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. //$sql_data_array['entry_zone_id'] = $customers_zone_id;
  6. $sql_data_array['entry_zone_id'] = $entry_zone_id;
  7. $sql_data_array['entry_state'] = $customers_state;
  8. } else {
  9. $sql_data_array['entry_zone_id'] = 0;
  1. $template_email_welcome_admin = TemplateEmailAdmin::getTemplateEmailWelcomeAdmin();
  2. $template_email_signature = TemplateEmailAdmin::getTemplateEmailSignature();
  3. $template_email_footer = TemplateEmailAdmin::getTemplateEmailTextFooter();
  4. $email_welcome = html_entity_decode( CLICSHOPPING::getDef('email_welcome', ['store_name' => STORE_NAME]));

    This email_welcome local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $email_subject = html_entity_decode( CLICSHOPPING::getDef('email_subject', ['store_name' => STORE_NAME]));
  6. if (ACCOUNT_GENDER == 'true') {
  7. if ($customers_gender == 'm') {
  1. $QcustomersTva->bindValue(':countries_iso_code_2',$customers_tva_intracom_code_iso );
  2. $QcustomersTva->execute();
  3. if ($QcustomersTva->fetch() ) {
  4. $customers_tva_intracom_code_iso_error = false;

    This customers_tva_intracom_code_iso_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. } else {
  6. $error = true;
  7. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_code_iso'), 'error', 'header');
  8. }
  9. }
  1. if (strlen($customers_firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
  2. $error = true;
  3. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_firstname'), 'error', 'header');
  4. $entry_firstname_error = true;
  5. } else {
  6. $entry_firstname_error = false;

    This entry_firstname_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  7. }
  8. if (strlen($customers_lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
  9. $error = true;
  10. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_lastname'), 'error', 'header');
  1. if (strlen($customers_lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
  2. $error = true;
  3. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_lastname'), 'error', 'header');
  4. $entry_lastname_error = true;
  5. } else {
  6. $entry_lastname_error = false;

    This entry_lastname_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  7. }
  8. // suppression de la date de vérification de l'anniversaire
  9. $entry_email_address_error = false;
  1. $entry_lastname_error = false;
  2. }
  3. // suppression de la date de vérification de l'anniversaire
  4. $entry_email_address_error = false;

    This entry_email_address_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. if (!Is::email($customers_email_address)) {
  6. $error = true;
  7. $entry_email_address_check_error = true;
  8. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_email'), 'error', 'header');
  1. if (!Is::email($customers_email_address)) {
  2. $error = true;
  3. $entry_email_address_check_error = true;
  4. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_email'), 'error', 'header');
  5. } else {
  6. $entry_email_address_check_error = false;

    This entry_email_address_check_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by oitsuki
  7. }
  8. if (strlen($entry_street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
  9. $error = true;
  10. $entry_street_address_error = true;
  1. if (strlen($entry_street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
  2. $error = true;
  3. $entry_street_address_error = true;
  4. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_street_address'), 'error', 'header');
  5. } else {
  6. $entry_street_address_error = false;

    This entry_street_address_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  7. }
  8. if (strlen($entry_postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
  9. $error = true;
  10. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_postcode'), 'error', 'header');
  1. if (strlen($entry_postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
  2. $error = true;
  3. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_postcode'), 'error', 'header');
  4. $entry_post_code_error = true;
  5. } else {
  6. $entry_post_code_error = false;

    This entry_post_code_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by oitsuki
  7. }
  8. if (strlen($entry_city) < ENTRY_CITY_MIN_LENGTH) {
  9. $error = true;
  10. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_city'), 'error', 'header');
  1. if (strlen($entry_city) < ENTRY_CITY_MIN_LENGTH) {
  2. $error = true;
  3. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_city'), 'error', 'header');
  4. $entry_city_error = true;
  5. } else {
  6. $entry_city_error = false;

    This entry_city_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by oitsuki
  7. }
  8. if ($entry_country_id === false) {
  9. $error = true;
  10. $entry_country_error = true;
  1. if (ACCOUNT_STATE == 'true') {
  2. if ($entry_country_error === true) {
  3. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_state'), 'error', 'header');
  4. } else {
  5. $zone_id = 0;

    This zone_id local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. $entry_state_error = false;
  7. $Qcheck = $CLICSHOPPING_Customers->db->get('zones', 'zone_country_id', ['zone_country_id' => (int)$entry_country_id]);
  8. $entry_state_has_zones = $Qcheck->fetch() !== false;
  1. if ($entry_country_error === true) {
  2. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Customers->getDef('error_state'), 'error', 'header');
  3. } else {
  4. $zone_id = 0;
  5. $entry_state_error = false;

    This entry_state_error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. $Qcheck = $CLICSHOPPING_Customers->db->get('zones', 'zone_country_id', ['zone_country_id' => (int)$entry_country_id]);
  7. $entry_state_has_zones = $Qcheck->fetch() !== false;
  8. if ($entry_state_has_zones === true) {
  1. $class = substr($file, 0, strrpos($file, '.'));
  2. if (class_exists($class)) {
  3. $module = new $class;
  4. if ($module->check() > 0) {
  5. $installed_modules[] = $file;

    This installed_modules local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. }
  7. }
  8. if (($cInfo->customers_group_id != 0) && (in_array($module->code, $payments_unallowed))) {
  9. $content .= '<div class="row">';
  1. $customers_group_id = HTML::sanitize($_POST['customers_group_id']);
  2. if (empty($customers_group_id)) $customers_group_id = 0;
  3. $customers_id = HTML::sanitize($_POST['customers_id']);
  4. $customers_options_order_taxe = HTML::sanitize($_POST['customers_options_order_taxe']);

    This customers_options_order_taxe local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $QmultipleGroups = $CLICSHOPPING_Customers->db->prepare('select distinct customers_group_id
  6. from :table_products_groups
  7. ');
  1. 'customers_group_id' => $Qattributes->valueInt('customers_group_id')
  2. ]
  3. );
  4. } elseif (($_POST['price' . $QcustomersGroup->valueInt('customers_group_id')] == $Qattributes->valueInt('customers_group_price') )) {
  5. $attributes = $Qattributes->fetch();

    This attributes local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. }
  7. // Prix + Afficher Prix Public + Afficher Produit + Autoriser Commande
  8. } elseif ($_POST['price' . $QcustomersGroup->valueInt('customers_group_id')] != '') {
  1. use ClicShopping\OM\Registry;
  2. class Edit extends \ClicShopping\OM\PagesActionsAbstract {
  3. public function execute() {
  4. $CLICSHOPPING_Groups = Registry::get('Groups');
  5. $CLICSHOPPING_CategoriesAdmin = Registry::get('CategoriesAdmin');

    This CLICSHOPPING_CategoriesAdmin local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $this->page->setFile('edit.php');
  7. $CLICSHOPPING_Groups->loadDefinitions('Sites/ClicShoppingAdmin/groups');
  8. }
  1. $customers_group_quantity_default = HTML::sanitize($_POST['customers_group_quantity_default']);
  2. $group_order_taxe = HTML::sanitize($_POST['group_order_taxe']);
  3. // Supprimer (|| $customers_group_discount == 0) dans la condition IF pour pouvoir cree un groupe a 0% par defaut
  4. if (strlen($customers_groups_name) == '') {
  5. $error = true;

    This error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. $CLICSHOPPING_MessageStack->add($CLICSHOPPING_Groups->getDef('entry_groups_name_error'));
  7. $CLICSHOPPING_Groups->redirect('Groups&Insert&error=name');
  8. } else {
  1. $CLICSHOPPING_MessageStack = Registry::get('MessageStack');
  2. $customers_group_id = HTML::sanitize($_POST['customers_groups_id']);
  3. if (empty($_POST['upddiscount'])) {
  4. $error = true;

    This error local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. $CLICSHOPPING_MessageStack->add(CLICSHOPPING::getDef('entry_groups_categories_error_zero'));
  6. $CLICSHOPPING_Groups->redirect('Edit&cID=' . $customers_group_id);
  7. } else {
  1. CLICSHOPPING::redirect();
  2. }
  3. $review = $CLICSHOPPING_Reviews->getDataReviews($_GET['reviews_id']);
  4. $date_added = $review['date_added'];

    This date_added local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. $customers_name = HTML::outputProtected(substr($review['customers_name'], 0, -4)) . ' ...';
  6. $reviews_rating = $review['reviews_rating'];
  7. $reviews_text = $review['reviews_text'];
  8. $products_name = HTML::link(CLICSHOPPING::link(null, 'Products&Description&products_id=' . $CLICSHOPPING_ProductsCommon->getID()) . '" itemprop="url" class="productTitle"', '<span itemprop="name">' . HTML::outputProtected($CLICSHOPPING_ProductsCommon->getProductsName()) . '</span>');
  1. }
  2. $review = $CLICSHOPPING_Reviews->getDataReviews($_GET['reviews_id']);
  3. $date_added = $review['date_added'];
  4. $customers_name = HTML::outputProtected(substr($review['customers_name'], 0, -4)) . ' ...';

    This customers_name local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. $reviews_rating = $review['reviews_rating'];
  6. $reviews_text = $review['reviews_text'];
  7. $products_name = HTML::link(CLICSHOPPING::link(null, 'Products&Description&products_id=' . $CLICSHOPPING_ProductsCommon->getID()) . '" itemprop="url" class="productTitle"', '<span itemprop="name">' . HTML::outputProtected($CLICSHOPPING_ProductsCommon->getProductsName()) . '</span>');
  8. // *************************
  1. $review = $CLICSHOPPING_Reviews->getDataReviews($_GET['reviews_id']);
  2. $date_added = $review['date_added'];
  3. $customers_name = HTML::outputProtected(substr($review['customers_name'], 0, -4)) . ' ...';
  4. $reviews_rating = $review['reviews_rating'];

    This reviews_rating local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. $reviews_text = $review['reviews_text'];
  6. $products_name = HTML::link(CLICSHOPPING::link(null, 'Products&Description&products_id=' . $CLICSHOPPING_ProductsCommon->getID()) . '" itemprop="url" class="productTitle"', '<span itemprop="name">' . HTML::outputProtected($CLICSHOPPING_ProductsCommon->getProductsName()) . '</span>');
  7. // *************************
  8. // display the differents prices before button
  1. $review = $CLICSHOPPING_Reviews->getDataReviews($_GET['reviews_id']);
  2. $date_added = $review['date_added'];
  3. $customers_name = HTML::outputProtected(substr($review['customers_name'], 0, -4)) . ' ...';
  4. $reviews_rating = $review['reviews_rating'];
  5. $reviews_text = $review['reviews_text'];

    This reviews_text local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. $products_name = HTML::link(CLICSHOPPING::link(null, 'Products&Description&products_id=' . $CLICSHOPPING_ProductsCommon->getID()) . '" itemprop="url" class="productTitle"', '<span itemprop="name">' . HTML::outputProtected($CLICSHOPPING_ProductsCommon->getProductsName()) . '</span>');
  7. // *************************
  8. // display the differents prices before button
  9. // **************************
  1. $date_added = $review['date_added'];
  2. $customers_name = HTML::outputProtected(substr($review['customers_name'], 0, -4)) . ' ...';
  3. $reviews_rating = $review['reviews_rating'];
  4. $reviews_text = $review['reviews_text'];
  5. $products_name = HTML::link(CLICSHOPPING::link(null, 'Products&Description&products_id=' . $CLICSHOPPING_ProductsCommon->getID()) . '" itemprop="url" class="productTitle"', '<span itemprop="name">' . HTML::outputProtected($CLICSHOPPING_ProductsCommon->getProductsName()) . '</span>');

    This products_name local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. // *************************
  7. // display the differents prices before button
  8. // **************************
  9. $product_price = $CLICSHOPPING_ProductsCommon->getCustomersPrice();
  1. // **************************
  2. $product_price = $CLICSHOPPING_ProductsCommon->getCustomersPrice();
  3. // *************************
  4. // See the button more view details
  5. // *************************
  6. $button_small_view_details = HTML::button(CLICSHOPPING::getDef('button_details'), '', CLICSHOPPING::link(null, 'Products&Description&products_id='. $CLICSHOPPING_ProductsCommon->getID()), 'info', null,'sm');

    This button_small_view_details local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  7. // *************************
  8. // Gestion de l'affichage des images et des zooms
  9. // *************************
  10. if (!is_null($CLICSHOPPING_ProductsCommon->getProductsImage($CLICSHOPPING_ProductsCommon->getID()))) {
  11. $products_image = '<h1>' . HTML::image($CLICSHOPPING_Template->getDirectoryTemplateImages() . $CLICSHOPPING_ProductsCommon->getProductsImage($CLICSHOPPING_ProductsCommon->getID()), $CLICSHOPPING_ProductsCommon->getProductsName($CLICSHOPPING_ProductsCommon->getID()), (int)SMALL_IMAGE_WIDTH, (int)SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"').'</h1>';
  1. $button_small_view_details = HTML::button(CLICSHOPPING::getDef('button_details'), '', CLICSHOPPING::link(null, 'Products&Description&products_id='. $CLICSHOPPING_ProductsCommon->getID()), 'info', null,'sm');
  2. // *************************
  3. // Gestion de l'affichage des images et des zooms
  4. // *************************
  5. if (!is_null($CLICSHOPPING_ProductsCommon->getProductsImage($CLICSHOPPING_ProductsCommon->getID()))) {
  6. $products_image = '<h1>' . HTML::image($CLICSHOPPING_Template->getDirectoryTemplateImages() . $CLICSHOPPING_ProductsCommon->getProductsImage($CLICSHOPPING_ProductsCommon->getID()), $CLICSHOPPING_ProductsCommon->getProductsName($CLICSHOPPING_ProductsCommon->getID()), (int)SMALL_IMAGE_WIDTH, (int)SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"').'</h1>';

    This products_image local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  7. }
  8. // *************************
  9. // End of this file
  10. // *************************
  1. // *************************
  2. // End of this file
  3. // *************************
  4. if ( $CLICSHOPPING_ProductsCommon->getProductsArchive() === 1 && is_numeric($CLICSHOPPING_ProductsCommon->getId()) ) {
  5. $product_price = '';

    This product_price local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $product_not_sell = CLICSHOPPING::getDef('products_not_sell');
  7. }
  8. // templates
  9. $this->page->setFile('reviews_info.php');
  1. // End of this file
  2. // *************************
  3. if ( $CLICSHOPPING_ProductsCommon->getProductsArchive() === 1 && is_numeric($CLICSHOPPING_ProductsCommon->getId()) ) {
  4. $product_price = '';
  5. $product_not_sell = CLICSHOPPING::getDef('products_not_sell');

    This product_not_sell local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. }
  7. // templates
  8. $this->page->setFile('reviews_info.php');
  9. //Content
  1. public function execute() {
  2. $CLICSHOPPING_MessageStack = Registry::get('MessageStack');
  3. $CLICSHOPPING_Reviews = Registry::get('Reviews');
  4. $CLICSHOPPING_Hooks = Registry::get('Hooks');

    This CLICSHOPPING_Hooks local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. if (isset($_POST['action']) && ($_POST['action'] == 'process') && isset($_POST['formid']) && ($_POST['formid'] == $_SESSION['sessiontoken'])) {
  6. $error = false;
  1. $CLICSHOPPING_Hooks = Registry::get('Hooks');
  2. $products_id = HTML::sanitize($_POST['products_id']);
  3. $expdate = HTML::sanitize($_POST['expdate']);
  4. $schdate = HTML::sanitize($_POST['schdate']);
  5. $customers_group_id = HTML::sanitize($_POST['customers_group']);

    This customers_group_id local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $expires_date = '';
  7. if (!empty($expdate)) {
  8. $expires_date = substr($expdate, 0, 4) . substr($expdate, 5, 2) . substr($expdate, 8, 2);
  9. }
  1. $expires_date = '';
  2. if (!empty($expdate)) {
  3. $expires_date = substr($expdate, 0, 4) . substr($expdate, 5, 2) . substr($expdate, 8, 2);
  4. }
  5. $scheduled_date = '';

    This scheduled_date local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. if (!empty($schdate)) {
  7. $schedule_date = substr($schdate, 0, 4) . substr($schdate, 5, 2) . substr($schdate, 8, 2);
  8. }
  9. $CLICSHOPPING_Favorites->db->save('products_favorites', [
  1. $CLICSHOPPING_Hooks = Registry::get('Hooks');
  2. $products_id = HTML::sanitize($_POST['products_id']);
  3. $expdate = HTML::sanitize($_POST['expdate']);
  4. $schdate = HTML::sanitize($_POST['schdate']);
  5. $customers_group_id = HTML::sanitize($_POST['customers_group']);

    This customers_group_id local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $expires_date = '';
  7. if (!empty($expdate)) {
  8. $expires_date = substr($expdate, 0, 4) . substr($expdate, 5, 2) . substr($expdate, 8, 2);
  9. }
  1. $expires_date = '';
  2. if (!empty($expdate)) {
  3. $expires_date = substr($expdate, 0, 4) . substr($expdate, 5, 2) . substr($expdate, 8, 2);
  4. }
  5. $scheduled_date = '';

    This scheduled_date local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. if (!empty($schdate)) {
  7. $schedule_date = substr($schdate, 0, 4) . substr($schdate, 5, 2) . substr($schdate, 8, 2);
  8. }
  9. $CLICSHOPPING_Featured->db->save('products_featured', [
  1. $expires_date = '';
  2. if (!empty($expdate)) {
  3. $expires_date = substr($expdate, 0, 4) . substr($expdate, 5, 2) . substr($expdate, 8, 2);
  4. }
  5. $scheduled_date = '';

    This scheduled_date local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. if (!empty($schdate)) {
  7. $schedule_date = substr($schdate, 0, 4) . substr($schdate, 5, 2) . substr($schdate, 8, 2);
  8. }
  9. $CLICSHOPPING_Specials->db->save('specials', [ 'products_id' => (int)$products_id,
  1. if (!empty($js_array)) {
  2. $js_array = substr($js_array, 0, -1);
  3. }
  4. $chart_label = HTML::output($this->app->getDef('module_admin_dashboard_total_ca_by_year_app_chart_link'));

    This chart_label local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $chart_label_link = CLICSHOPPING::link(null, 'A&Orders\Orders&Orders');
  6. $chart_title = HTML::output($this->app->getDef('module_admin_dashboard_total_ca_by_year_app_chart_link'));
  7. $content_width = 'col-lg-' . (int)MODULE_ADMIN_DASHBOARD_TOTAL_CA_BY_YEAR_APP_CONTENT_WIDTH;
  1. if (!empty($js_array)) {
  2. $js_array = substr($js_array, 0, -1);
  3. }
  4. $chart_label = HTML::output($this->app->getDef('module_admin_dashboard_total_month_app_chart_link'));

    This chart_label local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $chart_label_link = CLICSHOPPING::link(null, 'A&Orders\Orders&Orders');
  6. $chart_title = HTML::output($this->app->getDef('module_admin_dashboard_total_month_app_chart_link'));
  7. $content_width = 'col-lg-' . (int)MODULE_ADMIN_DASHBOARD_TOTAL_MONTH_APP_CONTENT_WIDTH;
  1. if (!empty($js_array)) {
  2. $js_array = substr($js_array, 0, -1);
  3. }
  4. $chart_label = HTML::output($this->app->getDef('module_admin_dashboard_total_revenue_app_chart_link'));

    This chart_label local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $chart_label_link = CLICSHOPPING::link(null, 'A&Orders\Orders&Orders');
  6. $chart_title = HTML::output($this->app->getDef('module_admin_dashboard_total_revenue_app_chart_link'));
  7. $content_width = 'col-lg-' . (int)MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_APP_CONTENT_WIDTH;
  1. if (Registry::exists($code)) {
  2. $CLICSHOPPING_SM = Registry::get($code);
  3. }
  4. } else {
  5. list($module, $method) = explode('_', $_SESSION['shipping']['id']);

    This method local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. if (is_object($GLOBALS[$module])) {
  7. $CLICSHOPPING_SM = $GLOBALS[$module];
  8. }
  9. }
  1. $Qmodules = $this->app->db->get('action_recorder', 'distinct module', null, 'module');
  2. while ($Qmodules->fetch()) {
  3. $modules_array[] = $Qmodules->value('module');
  4. $modules_list_array[] = ['id' => $Qmodules->value('module'),

    This modules_list_array local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. 'text' => (is_object($GLOBALS[$Qmodules->value('module')]) ? $GLOBALS[$Qmodules->value('module')]->title : $Qmodules->value('module'))
  6. ];
  7. }
  8. $expired_entries = 0;
  1. for (($groups[0] == 'Apps' ? $i=3 : $i=1), $n=count($groups)-1; $i<$n; $i++) {
  2. $path_to_file .= $groups[$i] . '/';
  3. }
  4. $file_name = $groups[count($groups)-1] . '.txt';

    This file_name local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $path_name = str_replace("-", "/", substr($content_group, ($groups[0] != 'Apps' ? strlen($groups[0]) : strlen($groups[0] . '-' . $groups[1] . '-' . $groups[2]) ) )) . ".txt";
  6. for ($i=0, $n=count($languages); $i<$n; $i++) {
  1. public static function getSystemInformation() {
  2. $CLICSHOPPING_Db = Registry::get('Db');
  3. $Qdate = $CLICSHOPPING_Db->query('select now() as datetime');
  4. @list($system, $host, $kernel) = preg_split('/[\s,]+/', @exec('uname -a'), 5);

    This host local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $data = [];
  6. $data['clicshopping'] = ['version' => static::getVersion()];
  1. public static function getSystemInformation() {
  2. $CLICSHOPPING_Db = Registry::get('Db');
  3. $Qdate = $CLICSHOPPING_Db->query('select now() as datetime');
  4. @list($system, $host, $kernel) = preg_split('/[\s,]+/', @exec('uname -a'), 5);

    This system local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $data = [];
  6. $data['clicshopping'] = ['version' => static::getVersion()];
  1. * @return string short date
  2. * $date needs to be in this format: YYYY-MM-DD HH:MM:SS
  3. */
  4. public static function validate($date_to_check, $format_string, &$date_array) {
  5. $separator_idx = -1;

    This separator_idx local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $separators = array('-', ' ', '/', '.');
  7. $month_abbr = array('jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec');
  8. $no_of_days = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
  1. if(!preg_match($pattern, $email)){
  2. return false;
  3. }
  4. // Validate the domain exists with a DNS check
  5. // if the checks cannot be made (soft fail over to true)
  6. list($user,$domain) = explode('@',$email);

    This user local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by oitsuki
  7. if( function_exists('checkdnsrr') ) {
  8. if( !checkdnsrr($domain,"MX") ) { // Linux: PHP 4.3.0 and higher & Windows: PHP 5.3.0 and higher
  9. return false;
  10. }
  1. return substr($path, -1) == '/';
  2. }
  3. public function getTree() {
  4. $Tree = array();
  5. $pathArray = array();

    This pathArray local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. for ($i=0; $i < $this->numFiles; $i++) {
  7. $path = $this->getNameIndex($i);
  8. $pathBySlash = array_values(explode('/', $path));
  9. $c = count($pathBySlash);
  10. $temp = &$Tree;
  1. // Iterate queue
  2. $queue = array($path);
  3. for ($i = 0, $j = count($queue); $i < $j; ++$i) {
  4. // Open directory
  5. $parent = $i;

    This parent local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. if (is_dir($queue[$i]) * $dir = @dir($queue[$i])) {
  7. $subdirs = [];
  8. while (false !== ($entry = $dir->read())) {
  9. // Skip pointers
  10. if ($entry == '.' || $entry == '..') {
  1. $found = []; //initialize an array for matching files
  2. $fileTypes = ['php']; // Create an array of file types
  3. $found = []; // Traverse the folder, and add filename to $found array if type matches
  4. $name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value');

    This name local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. foreach ($contents as $item) {
  6. $fileInfo = pathinfo($item);
  7. if (array_key_exists('extension', $fileInfo) && in_array($fileInfo['extension'], $fileTypes)) {
  8. $found[] = $item;
  1. }
  2. public function Header() {
  3. $CLICSHOPPING_Template = Registry::get('Template');
  4. $date = strftime('%A, %d %B %Y');

    This date local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. // Logo
  6. if (is_file(CLICSHOPPING::getConfig('dir_root', 'Shop') . $CLICSHOPPING_Template->getDirectoryTemplateImages() . 'logos/invoice/'. INVOICE_LOGO)) {
  7. $this->Image(HTTP::getShopUrlDomain() . $CLICSHOPPING_Template->getDirectoryTemplateImages() . 'logos/invoice/'. INVOICE_LOGO,5,10,50);
  8. }
  1. */
  2. public static function getCanonicalUrl() {
  3. $domain = HTTP::typeUrlDomain(); // gets the base URL minus the trailing slash
  4. $string = $_SERVER['REQUEST_URI']; // gets the url
  5. $search = '\&clicshopid.*|\?clicshopid.*'; // searches for the session id in the url

    This search local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $replace = ''; // replaces with nothing i.e. deletes
  7. $str = $string;
  8. $chars = preg_split('/&/', $str, -1);
  9. if ($chars[1]) {
  1. $CLICSHOPPING_Hooks = Registry::get('Hooks');
  2. $process = false;
  3. if (isset($_POST['action']) && $_POST['action'] == 'process' && isset($_POST['formid']) && ($_POST['formid'] == $_SESSION['sessiontoken']) ) {
  4. $process = true;

    This process local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $error = false;
  6. if (((ACCOUNT_GENDER == 'true') && ($CLICSHOPPING_Customer->getCustomersGroupID() == 0)) || ((ACCOUNT_GENDER_PRO == 'true') && ($CLICSHOPPING_Customer->getCustomersGroupID() != 0))) {
  7. $gender = HTML::sanitize($_POST['gender']);
  8. }
  1. $CLICSHOPPING_Customer->setDefaultAddressID($_GET['id']);
  2. /// pb avec namespace
  3. // $default_address_id = $CLICSHOPPING_Customer->getDefautlAddressID();
  4. if (isset($_POST['primary']) && ($_POST['primary'] == 'on')) $default_address_id = $new_address_book_id;

    This default_address_id local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $sql_data_array = ['customers_firstname' => $firstname,
  6. 'customers_lastname' => $lastname,
  7. 'customers_cellular_phone' => $cellular_phone,
  8. 'customers_fax' => $fax,
  1. public function execute() {
  2. $CLICSHOPPING_Breadcrumb= Registry::get('Breadcrumb');
  3. $CLICSHOPPING_Template = Registry::get('Template');
  4. $CLICSHOPPING_Language = Registry::get('Language');
  5. $process = false;

    This process local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. // templates
  7. $this->page->setFile('create_account.php');
  8. //Content
  9. $this->page->data['content'] = $CLICSHOPPING_Template->getTemplateFiles('create_account');
  1. }
  2. }
  3. if (count($products_parsed) > 0) {
  4. $products_id_in = array_map(function($k) {

    This products_id_in local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. return ':products_id_' . $k;
  6. }, array_keys($products_parsed));
  7. $Qcheck = $CLICSHOPPING_Db->prepare('select products_id
  8. from :table_products_notifications
  1. }
  2. // Recaptcha
  3. if (defined('MODULES_HEADER_TAGS_GOOGLE_RECAPTCHA_TELL_FRIEND')) {
  4. if (MODULES_HEADER_TAGS_GOOGLE_RECAPTCHA_TELL_FRIEND == 'True') {
  5. $google_recaptcha = $CLICSHOPPING_Hooks->output('AllShop', 'GoogleRecaptchaProcess');

    This google_recaptcha local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. }
  7. }
  8. Registry::set('ActionRecorder', new ActionRecorder('ar_tell_a_friend', ($CLICSHOPPING_Customer->isLoggedOn() ? $CLICSHOPPING_Customer->getID() : null), $from_name));
  9. $CLICSHOPPING_ActionRecorder = Registry::get('ActionRecorder');
  1. */
  2. public function getQuote($method = null, $module = null) {
  3. $quotes_array = [];
  4. if (is_array($this->modules)) {
  5. $shipping_quoted = '';

    This shipping_quoted local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $include_quotes = [];
  7. foreach($this->modules as $value) {
  8. if (strpos($value, '\\') !== false) {
  1. /**
  2. * scan directory to create a dropdown
  3. * @param string $template_selected
  4. * @return string
  5. */
  6. public function getDropDownSelectedTemplateByCustomer($template_selected = 'Default') {

    This template_selected argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  7. $template_directory = CLICSHOPPING::getConfig('dir_root') . $this->_directoryTemplateSources . '/' . $this->_directoryTemplate;
  8. $weeds = ['.', '..', '_notes', 'index.php', 'ExNewTemplate', '.htaccess', 'README'];
  9. $directories = array_diff(scandir($template_directory), $weeds);
  10. $filename_array = [];
  1. namespace ClicShopping\OM\Module\Hooks\Shop\Session;
  2. use ClicShopping\OM\Hash;
  3. class Recreated {
  4. public function execute($parameters) {

    This parameters argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. // reset session token
  6. $_SESSION['sessiontoken'] = md5(Hash::getRandomInt() . Hash::getRandomInt() . Hash::getRandomInt() . Hash::getRandomInt());
  7. }
  8. }
  1. $spider = substr($spider, 0, strlen($spider)-1);
  2. }
  3. if (!empty($spider)) {
  4. if (strpos($user_agent, $spider) !== false) {
  5. $parameters['can_start'] = false;

    This parameters local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. break;
  7. }
  8. }
  9. }
  10. }
  1. public function setIdentifier() {
  2. $this->identifier = HTTP::GetIpAddress();
  3. }
  4. public function canPerform($user_id, $user_name) {

    This user_id argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Db = Registry::get('Db');
  6. $sql_query = 'select id
  7. from :table_action_recorder
  8. where module = :module
  1. public function setIdentifier() {
  2. $this->identifier = HTTP::GetIpAddress();
  3. }
  4. public function canPerform($user_id, $user_name) {

    This user_name argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Db = Registry::get('Db');
  6. $sql_query = 'select id
  7. from :table_action_recorder
  8. where module = :module
  1. public function setIdentifier() {
  2. $this->identifier = HTTP::GetIpAddress();
  3. }
  4. public function canPerform($user_id, $user_name) {

    This user_name argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Db = Registry::get('Db');
  6. $sql_query = 'select id
  7. from :table_action_recorder
  8. where module = :module
  1. public function setIdentifier() {
  2. $this->identifier = HTTP::GetIpAddress();
  3. }
  4. public function canPerform($user_id, $user_name) {

    This user_name argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Db = Registry::get('Db');
  6. $sql_query = 'select id
  7. from :table_action_recorder
  8. where module = :module
  1. public function setIdentifier() {
  2. $this->identifier = HTTP::GetIpAddress();
  3. }
  4. public function canPerform($user_id, $user_name) {

    This user_id argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Db = Registry::get('Db');
  6. $Qcheck = $CLICSHOPPING_Db->prepare('select id
  7. from :table_action_recorder
  8. where module = :module
  1. public function setIdentifier() {
  2. $this->identifier = HTTP::GetIpAddress();
  3. }
  4. public function canPerform($user_id, $user_name) {

    This user_name argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Db = Registry::get('Db');
  6. $sql_query = 'select id
  7. from :table_action_recorder
  8. where module = :module
  1. }
  2. }
  3. $url_string = $CLICSHOPPING_Template->getUrlWithoutSEFU();
  4. $language_code = $CLICSHOPPING_Language->getCode();

    This language_code local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. if (in_array($url_string, $pages_array)) {
  6. $CLICSHOPPING_Template->addBlock('<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/css/bootstrap-datepicker.min.css">' . "\n", 'header_tags');
  1. curl_setopt($curl, CURLOPT_USERPWD, $_SERVER['PHP_AUTH_USER'] . ':' . $_SERVER['PHP_AUTH_PW']);
  2. $this->type = 'warning';
  3. }
  4. $result = curl_exec($curl);

    This result local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $info = curl_getinfo($curl);
  6. curl_close($curl);
  1. curl_setopt($curl, CURLOPT_USERPWD, $_SERVER['PHP_AUTH_USER'] . ':' . $_SERVER['PHP_AUTH_PW']);
  2. $this->type = 'warning';
  3. }
  4. $result = curl_exec($curl);

    This result local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $info = curl_getinfo($curl);
  6. curl_close($curl);
  1. curl_setopt($curl, CURLOPT_FORBID_REUSE, true);
  2. curl_setopt($curl, CURLOPT_FRESH_CONNECT, true);
  3. curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'HEAD');
  4. curl_setopt($curl, CURLOPT_NOBODY, true);
  5. $result = curl_exec($curl);

    This result local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $info = curl_getinfo($curl);
  7. curl_close($curl);
  1. curl_setopt($curl, CURLOPT_FORBID_REUSE, true);
  2. curl_setopt($curl, CURLOPT_FRESH_CONNECT, true);
  3. curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'HEAD');
  4. curl_setopt($curl, CURLOPT_NOBODY, true);
  5. $result = curl_exec($curl);

    This result local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $info = curl_getinfo($curl);
  7. curl_close($curl);
  1. curl_setopt($curl, CURLOPT_FORBID_REUSE, true);
  2. curl_setopt($curl, CURLOPT_FRESH_CONNECT, true);
  3. curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'HEAD');
  4. curl_setopt($curl, CURLOPT_NOBODY, true);
  5. $result = curl_exec($curl);

    This result local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $info = curl_getinfo($curl);
  7. curl_close($curl);
  1. curl_setopt($curl, CURLOPT_FORBID_REUSE, true);
  2. curl_setopt($curl, CURLOPT_FRESH_CONNECT, true);
  3. curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'HEAD');
  4. curl_setopt($curl, CURLOPT_NOBODY, true);
  5. $result = curl_exec($curl);

    This result local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $info = curl_getinfo($curl);
  7. curl_close($curl);
  1. curl_setopt($curl, CURLOPT_FORBID_REUSE, true);
  2. curl_setopt($curl, CURLOPT_FRESH_CONNECT, true);
  3. curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'HEAD');
  4. curl_setopt($curl, CURLOPT_NOBODY, true);
  5. $result = curl_exec($curl);

    This result local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $info = curl_getinfo($curl);
  7. curl_close($curl);
  1. $CLICSHOPPING_Db = Registry::get('Db');
  2. $CLICSHOPPING_Language = Registry::get('Language');
  3. if ((isset($_GET['Account']) && isset($_GET['Main'])) || (isset($_GET['Account']) && isset($_GET['Login']))) {
  4. $content_width = (int)MODULE_ACCOUNT_CUSTOMERS_LIST_ORDER_CONTENT_WIDTH;

    This content_width local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $Qorders = $CLICSHOPPING_Db->prepare('select o.orders_id,
  6. o.date_purchased,
  7. o.delivery_name,
  8. o.delivery_country,
  1. public function buildCategorytree($class='') {
  2. $CLICSHOPPING_CategoryTree = Registry::get('CategoryTree');
  3. $CLICSHOPPING_Category = Registry::get('Category');
  4. $cPath = $CLICSHOPPING_Category->getPath();

    This cPath local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. if (empty($class)) $class = 'nav navbar-nav';
  6. $data = '<ul class="' . $class . '">' . $CLICSHOPPING_CategoryTree->getExTree() . '</ul>';
  1. $CLICSHOPPING_Tax = Registry::get('Tax');
  2. $CLICSHOPPING_Category = Registry::get('Category');
  3. if (isset($_GET['products_id']) && isset($_GET['Products']) ) {
  4. $content_width = (int)MODULE_PRODUCTS_INFO_OPTIONS_CONTENT_WIDTH;

    This content_width local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $text_position = MODULE_PRODUCTS_INFO_OPTIONS_POSITION;
  6. $CLICSHOPPING_ProductsCommon = Registry::get('ProductsCommon');
  7. $CLICSHOPPING_Customer = Registry::get('Customer');
  8. $CLICSHOPPING_Db = Registry::get('Db');
  1. $CLICSHOPPING_Category = Registry::get('Category');
  2. if (isset($_GET['products_id']) && isset($_GET['Products']) ) {
  3. $content_width = (int)MODULE_PRODUCTS_INFO_OPTIONS_CONTENT_WIDTH;
  4. $text_position = MODULE_PRODUCTS_INFO_OPTIONS_POSITION;

    This text_position local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_ProductsCommon = Registry::get('ProductsCommon');
  6. $CLICSHOPPING_Customer = Registry::get('Customer');
  7. $CLICSHOPPING_Db = Registry::get('Db');
  8. $CLICSHOPPING_Template = Registry::get('Template');
  1. while ($QproductsOptions->fetch() !== false) {
  2. $products_options_array[] = ['id' => $QproductsOptions->valueInt('products_options_values_id'),
  3. 'text' => $QproductsOptions->value('products_options_values_name')
  4. ];
  5. $products_options_array_id[] = $QproductsOptions->valueInt('products_options_values_id');

    This products_options_array_id local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $products_options_array_name[] = $QproductsOptions->value('products_options_values_name');
  7. if ($QproductsOptions->valueDecimal('options_values_price') != '0') {
  8. $option_price_display = ' (' . $QproductsOptions->value('price_prefix') . $CLICSHOPPING_Currencies->display_price($QproductsOptions->valueDecimal('options_values_price'), $CLICSHOPPING_Tax->getTaxRate( $CLICSHOPPING_ProductsCommon->getProductsTaxClassId() )) .') ';
  1. $products_options_array[] = ['id' => $QproductsOptions->valueInt('products_options_values_id'),
  2. 'text' => $QproductsOptions->value('products_options_values_name')
  3. ];
  4. $products_options_array_id[] = $QproductsOptions->valueInt('products_options_values_id');
  5. $products_options_array_name[] = $QproductsOptions->value('products_options_values_name');

    This products_options_array_name local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. if ($QproductsOptions->valueDecimal('options_values_price') != '0') {
  7. $option_price_display = ' (' . $QproductsOptions->value('price_prefix') . $CLICSHOPPING_Currencies->display_price($QproductsOptions->valueDecimal('options_values_price'), $CLICSHOPPING_Tax->getTaxRate( $CLICSHOPPING_ProductsCommon->getProductsTaxClassId() )) .') ';
  8. if (PRICES_LOGGED_IN == 'False') {

PHP code should not contain unreachable code

  • Minor
  • Deadcode

More information: https://insight.symfony.com/what-we-analyse/php.unreachable_code

  1. $CLICSHOPPING_Breadcrumb = Registry::get('Breadcrumb');
  2. $CLICSHOPPING_PageManager = Registry::get('PageManager');
  3. exit;
  4. // templates
  5. $this->page->setFile('success.php');
  6. //Content
  7. $this->page->data['content'] = $CLICSHOPPING_Template->getTemplateFiles('contact_success');
  8. $this->page->data['action'] = 'Success';
  9. //language
  10. $CLICSHOPPING_PageManager->loadDefinitions('Sites/Shop/ContactSuccess/contact_success');
  11. $CLICSHOPPING_Breadcrumb->add($CLICSHOPPING_PageManager->getDef('navbar_title_1'), CLICSHOPPING::link(null, 'Info&Contact&Success'));

    This code is unreachable.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by oitsuki
  12. }
  13. }

PHP code should follow PSR-1 basic coding standard 520

  • Info
  • Codestyle

More information: https://insight.symfony.com/what-we-analyse/php.psr1

  1. }
  2. /***********************************************************
  3. * Insert
  4. ***********************************************************/
  5. public function Insert() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. $CLICSHOPPING_Customer = Registry::get('Customer');
  7. $CLICSHOPPING_Prod = Registry::get('Prod');
  8. $CLICSHOPPING_ProductsAttributes = Registry::get('ProductsAttributes');
  9. $CLICSHOPPING_OrderTotal = Registry::get('OrderTotal');
  1. $this->SetCompression(true);
  2. //Set default PDF version number
  3. $this->PDFVersion='1.3';
  4. }
  5. public function SetMargins($left, $top, $right=null)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Set left, top and right margins
  8. $this->lMargin=$left;
  9. $this->tMargin=$top;
  10. if($right===null)
  1. if($right===null)
  2. $right=$left;
  3. $this->rMargin=$right;
  4. }
  5. public function SetLeftMargin($margin)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Set left margin
  8. $this->lMargin=$margin;
  9. if($this->page>0 && $this->x<$margin)
  10. $this->x=$margin;
  1. $this->lMargin=$margin;
  2. if($this->page>0 && $this->x<$margin)
  3. $this->x=$margin;
  4. }
  5. public function SetTopMargin($margin)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Set top margin
  8. $this->tMargin=$margin;
  9. }
  1. {
  2. //Set top margin
  3. $this->tMargin=$margin;
  4. }
  5. public function SetRightMargin($margin)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Set right margin
  8. $this->rMargin=$margin;
  9. }
  1. {
  2. //Set right margin
  3. $this->rMargin=$margin;
  4. }
  5. public function SetAutoPageBreak($auto, $margin=0)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Set auto page break mode and triggering margin
  8. $this->AutoPageBreak=$auto;
  9. $this->bMargin=$margin;
  10. $this->PageBreakTrigger=$this->h-$margin;
  1. $this->AutoPageBreak=$auto;
  2. $this->bMargin=$margin;
  3. $this->PageBreakTrigger=$this->h-$margin;
  4. }
  5. public function SetDisplayMode($zoom, $layout='continuous')

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Set display mode in viewer
  8. if($zoom=='fullpage' || $zoom=='fullwidth' || $zoom=='real' || $zoom=='default' || !is_string($zoom))
  9. $this->ZoomMode=$zoom;
  10. else
  1. $this->LayoutMode=$layout;
  2. else
  3. $this->Error('Incorrect layout display mode: '.$layout);
  4. }
  5. public function SetCompression($compress)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Set page compression
  8. if(function_exists('gzcompress'))
  9. $this->compress=$compress;
  10. else
  1. $this->compress=$compress;
  2. else
  3. $this->compress=false;
  4. }
  5. public function SetTitle($title, $isUTF8=false)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Title of document
  8. if($isUTF8)
  9. $title=$this->_UTF8toUTF16($title);
  10. $this->title=$title;
  1. if($isUTF8)
  2. $title=$this->_UTF8toUTF16($title);
  3. $this->title=$title;
  4. }
  5. public function SetSubject($subject, $isUTF8=false)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Subject of document
  8. if($isUTF8)
  9. $subject=$this->_UTF8toUTF16($subject);
  10. $this->subject=$subject;
  1. if($isUTF8)
  2. $subject=$this->_UTF8toUTF16($subject);
  3. $this->subject=$subject;
  4. }
  5. public function SetAuthor($author, $isUTF8=false)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Author of document
  8. if($isUTF8)
  9. $author=$this->_UTF8toUTF16($author);
  10. $this->author=$author;
  1. if($isUTF8)
  2. $author=$this->_UTF8toUTF16($author);
  3. $this->author=$author;
  4. }
  5. public function SetKeywords($keywords, $isUTF8=false)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Keywords of document
  8. if($isUTF8)
  9. $keywords=$this->_UTF8toUTF16($keywords);
  10. $this->keywords=$keywords;
  1. if($isUTF8)
  2. $keywords=$this->_UTF8toUTF16($keywords);
  3. $this->keywords=$keywords;
  4. }
  5. public function SetCreator($creator, $isUTF8=false)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Creator of document
  8. if($isUTF8)
  9. $creator=$this->_UTF8toUTF16($creator);
  10. $this->creator=$creator;
  1. if($isUTF8)
  2. $creator=$this->_UTF8toUTF16($creator);
  3. $this->creator=$creator;
  4. }
  5. public function AliasNbPages($alias='{nb}')

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Define an alias for total number of pages
  8. $this->AliasNbPages=$alias;
  9. }
  1. {
  2. //Define an alias for total number of pages
  3. $this->AliasNbPages=$alias;
  4. }
  5. public function Error($msg)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Fatal error
  8. die('<b>FPDF error:</b> '.$msg);
  9. }
  1. {
  2. //Fatal error
  3. die('<b>FPDF error:</b> '.$msg);
  4. }
  5. public function Open()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Begin document
  8. $this->state=1;
  9. }
  1. {
  2. //Begin document
  3. $this->state=1;
  4. }
  5. public function Close()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Terminate document
  8. if($this->state==3)
  9. return;
  10. if($this->page==0)
  1. $this->_endpage();
  2. //Close document
  3. $this->_enddoc();
  4. }
  5. public function AddPage($orientation='', $format='')

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Start a new page
  8. if($this->state==0)
  9. $this->Open();
  10. $family=$this->FontFamily;
  1. }
  2. $this->TextColor=$tc;
  3. $this->ColorFlag=$cf;
  4. }
  5. public function Header()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //To be implemented in your own inherited class
  8. }
  9. public function Footer()
  1. public function Header()
  2. {
  3. //To be implemented in your own inherited class
  4. }
  5. public function Footer()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //To be implemented in your own inherited class
  8. }
  9. public function PageNo()
  1. public function Footer()
  2. {
  3. //To be implemented in your own inherited class
  4. }
  5. public function PageNo()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Get current page number
  8. return $this->page;
  9. }
  1. {
  2. //Get current page number
  3. return $this->page;
  4. }
  5. public function SetDrawColor($r, $g=null, $b=null)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Set color for all stroking operations
  8. if(($r==0 && $g==0 && $b==0) || $g===null)
  9. $this->DrawColor=sprintf('%.3F G',$r/255);
  10. else
  1. $this->DrawColor=sprintf('%.3F %.3F %.3F RG',$r/255,$g/255,$b/255);
  2. if($this->page>0)
  3. $this->_out($this->DrawColor);
  4. }
  5. public function SetFillColor($r, $g=null, $b=null)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. {
  7. //Set color for all filling operations
  8. if(($r==0 && $g==0 && $b==0) || $g===null)
  9. $this->FillColor=sprintf('%.3F g',$r/255);
  10. else
  1. $this->ColorFlag=($this->FillColor!=$this->TextColor);
  2. if($this->page>0)
  3. $this->_out($this->FillColor);
  4. }
  5. public function SetTextColor($r, $g=null, $b=null)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Set color for text
  8. if(($r==0 && $g==0 && $b==0) || $g===null)
  9. $this->TextColor=sprintf('%.3F g',$r/255);
  10. else
  1. else
  2. $this->TextColor=sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255);
  3. $this->ColorFlag=($this->FillColor!=$this->TextColor);
  4. }
  5. public function GetStringWidth($s)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Get width of a string in the current font
  8. $s=(string)$s;
  9. $cw=&$this->CurrentFont['cw'];
  10. $w=0;
  1. for($i=0;$i<$l;$i++)
  2. $w+=$cw[$s[$i]];
  3. return $w*$this->FontSize/1000;
  4. }
  5. public function SetLineWidth($width)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Set line width
  8. $this->LineWidth=$width;
  9. if($this->page>0)
  10. $this->_out(sprintf('%.2F w',$width*$this->k));
  1. $this->LineWidth=$width;
  2. if($this->page>0)
  3. $this->_out(sprintf('%.2F w',$width*$this->k));
  4. }
  5. public function Line($x1, $y1, $x2, $y2)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Draw a line
  8. $this->_out(sprintf('%.2F %.2F m %.2F %.2F l S',$x1*$this->k,($this->h-$y1)*$this->k,$x2*$this->k,($this->h-$y2)*$this->k));
  9. }
  1. {
  2. //Draw a line
  3. $this->_out(sprintf('%.2F %.2F m %.2F %.2F l S',$x1*$this->k,($this->h-$y1)*$this->k,$x2*$this->k,($this->h-$y2)*$this->k));
  4. }
  5. public function Rect($x, $y, $w, $h, $style='')

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Draw a rectangle
  8. if($style=='F')
  9. $op='f';
  10. elseif($style=='FD' || $style=='DF')
  1. else
  2. $op='S';
  3. $this->_out(sprintf('%.2F %.2F %.2F %.2F re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$h*$this->k,$op));
  4. }
  5. public function AddFont($family, $style='', $file='')

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Add a TrueType or Type1 font
  8. $family=strtolower($family);
  9. if($file=='')
  10. $file=str_replace(' ','',$family).strtolower($style).'.php';
  1. else
  2. $this->FontFiles[$file]=array('length1'=>$size1, 'length2'=>$size2);
  3. }
  4. }
  5. public function SetFont($family, $style='', $size=0)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Select a font; size given in points
  8. global $fpdf_charwidths;
  9. $family=strtolower($family);
  1. $this->CurrentFont=&$this->fonts[$fontkey];
  2. if($this->page>0)
  3. $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt));
  4. }
  5. public function SetFontSize($size)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Set font size in points
  8. if($this->FontSizePt==$size)
  9. return;
  10. $this->FontSizePt=$size;
  1. $this->FontSize=$size/$this->k;
  2. if($this->page>0)
  3. $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt));
  4. }
  5. public function AddLink()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Create a new internal link
  8. $n=count($this->links)+1;
  9. $this->links[$n]=array(0, 0);
  10. return $n;
  1. $n=count($this->links)+1;
  2. $this->links[$n]=array(0, 0);
  3. return $n;
  4. }
  5. public function SetLink($link, $y=0, $page=-1)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Set destination of internal link
  8. if($y==-1)
  9. $y=$this->y;
  10. if($page==-1)
  1. if($page==-1)
  2. $page=$this->page;
  3. $this->links[$link]=array($page, $y);
  4. }
  5. public function Link($x, $y, $w, $h, $link)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Put a link on the page
  8. $this->PageLinks[$this->page][]=array($x*$this->k, $this->hPt-$y*$this->k, $w*$this->k, $h*$this->k, $link);
  9. }
  1. {
  2. //Put a link on the page
  3. $this->PageLinks[$this->page][]=array($x*$this->k, $this->hPt-$y*$this->k, $w*$this->k, $h*$this->k, $link);
  4. }
  5. public function Text($x, $y, $txt)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Output a string
  8. $s=sprintf('BT %.2F %.2F Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
  9. if($this->underline && $txt!='')
  10. $s.=' '.$this->_dounderline($x,$y,$txt);
  1. if($this->ColorFlag)
  2. $s='q '.$this->TextColor.' '.$s.' Q';
  3. $this->_out($s);
  4. }
  5. public function AcceptPageBreak()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Accept automatic page break or not
  8. return $this->AutoPageBreak;
  9. }
  1. {
  2. //Accept automatic page break or not
  3. return $this->AutoPageBreak;
  4. }
  5. public function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Output a cell
  8. $k=$this->k;
  9. if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak())
  10. {
  1. }
  2. else
  3. $this->x+=$w;
  4. }
  5. public function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Output text with automatic or explicit line breaks
  8. $cw=&$this->CurrentFont['cw'];
  9. if($w==0)
  10. $w=$this->w-$this->rMargin-$this->x;
  1. $b.='B';
  2. $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
  3. $this->x=$this->lMargin;
  4. }
  5. public function Write($h, $txt, $link='')

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Output text in flowing mode
  8. $cw=&$this->CurrentFont['cw'];
  9. $w=$this->w-$this->rMargin-$this->x;
  10. $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
  1. //Last chunk
  2. if($i!=$j)
  3. $this->Cell($l/1000*$this->FontSize,$h,substr($s,$j),0,0,'',0,$link);
  4. }
  5. public function Ln($h=null)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Line feed; default value is last cell height
  8. $this->x=$this->lMargin;
  9. if($h===null)
  10. $this->y+=$this->lasth;
  1. $this->y+=$this->lasth;
  2. else
  3. $this->y+=$h;
  4. }
  5. public function Image($file, $x=null, $y=null, $w=0, $h=0, $type='', $link='')

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Put an image on the page
  8. if(!isset($this->images[$file]))
  9. {
  10. //First use of this image, get info
  1. $this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i']));
  2. if($link)
  3. $this->Link($x,$y,$w,$h,$link);
  4. }
  5. public function GetX()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Get x position
  8. return $this->x;
  9. }
  1. {
  2. //Get x position
  3. return $this->x;
  4. }
  5. public function SetX($x)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Set x position
  8. if($x>=0)
  9. $this->x=$x;
  10. else
  1. $this->x=$x;
  2. else
  3. $this->x=$this->w+$x;
  4. }
  5. public function GetY()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Get y position
  8. return $this->y;
  9. }
  1. {
  2. //Get y position
  3. return $this->y;
  4. }
  5. public function SetY($y)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Set y position and reset x
  8. $this->x=$this->lMargin;
  9. if($y>=0)
  10. $this->y=$y;
  1. $this->y=$y;
  2. else
  3. $this->y=$this->h+$y;
  4. }
  5. public function SetXY($x, $y)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Set x and y positions
  8. $this->SetY($y);
  9. $this->SetX($x);
  10. }
  1. //Set x and y positions
  2. $this->SetY($y);
  3. $this->SetX($x);
  4. }
  5. public function Output($name='', $dest='')

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Output PDF to some destination
  8. if($this->state<3)
  9. $this->Close();
  10. $dest=strtoupper($dest);
  1. /*******************************************************************************
  2. * *
  3. * Protected methods *
  4. * *
  5. *******************************************************************************/
  6. public function _dochecks()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  7. {
  8. //Check availability of %F
  9. if(sprintf('%.1F',1.0)!='1.0')
  10. $this->Error('This version of PHP is not supported');
  11. //Check mbstring overloading
  1. //Check mbstring overloading
  2. if(ini_get('mbstring.func_overload') & 2)
  3. $this->Error('mbstring overloading must be disabled');
  4. }
  5. public function _getpageformat($format)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. $format=strtolower($format);
  8. if(!isset($this->PageFormats[$format]))
  9. $this->Error('Unknown page format: '.$format);
  10. $a=$this->PageFormats[$format];
  1. $this->Error('Unknown page format: '.$format);
  2. $a=$this->PageFormats[$format];
  3. return array($a[0]/$this->k, $a[1]/$this->k);
  4. }
  5. public function _getfontpath()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. if(!defined('FPDF_FONTPATH') && is_dir(__DIR__.'/font'))
  8. define('FPDF_FONTPATH',__DIR__.'/font/');
  9. return defined('FPDF_FONTPATH') ? FPDF_FONTPATH : '';
  10. }
  1. if(!defined('FPDF_FONTPATH') && is_dir(__DIR__.'/font'))
  2. define('FPDF_FONTPATH',__DIR__.'/font/');
  3. return defined('FPDF_FONTPATH') ? FPDF_FONTPATH : '';
  4. }
  5. public function _beginpage($orientation, $format)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. $this->page++;
  8. $this->pages[$this->page]='';
  9. $this->state=2;
  10. $this->x=$this->lMargin;
  1. }
  2. if($orientation!=$this->DefOrientation || $format[0]!=$this->DefPageFormat[0] || $format[1]!=$this->DefPageFormat[1])
  3. $this->PageSizes[$this->page]=array($this->wPt, $this->hPt);
  4. }
  5. public function _endpage()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. $this->state=1;
  8. }
  9. public function _escape($s)
  1. public function _endpage()
  2. {
  3. $this->state=1;
  4. }
  5. public function _escape($s)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Escape special characters in strings
  8. $s=str_replace('\\','\\\\',$s);
  9. $s=str_replace('(','\\(',$s);
  10. $s=str_replace(')','\\)',$s);
  1. $s=str_replace(')','\\)',$s);
  2. $s=str_replace("\r",'\\r',$s);
  3. return $s;
  4. }
  5. public function _textstring($s)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Format a text string
  8. return '('.$this->_escape($s).')';
  9. }
  1. {
  2. //Format a text string
  3. return '('.$this->_escape($s).')';
  4. }
  5. public function _UTF8toUTF16($s)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Convert UTF-8 to UTF-16BE with BOM
  8. $res="\xFE\xFF";
  9. $nb=strlen($s);
  10. $i=0;
  1. }
  2. }
  3. return $res;
  4. }
  5. public function _dounderline($x, $y, $txt)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Underline text
  8. $up=$this->CurrentFont['up'];
  9. $ut=$this->CurrentFont['ut'];
  10. $w=$this->GetStringWidth($txt)+$this->ws*substr_count($txt,' ');
  1. $ut=$this->CurrentFont['ut'];
  2. $w=$this->GetStringWidth($txt)+$this->ws*substr_count($txt,' ');
  3. return sprintf('%.2F %.2F %.2F %.2F re f',$x*$this->k,($this->h-($y-$up/1000*$this->FontSize))*$this->k,$w*$this->k,-$ut/1000*$this->FontSizePt);
  4. }
  5. public function _parsejpg($file)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Extract info from a JPEG file
  8. $a=GetImageSize($file);
  9. if(!$a)
  10. $this->Error('Missing or incorrect image file: '.$file);
  1. $data.=fread($f,8192);
  2. fclose($f);
  3. return array('w'=>$a[0], 'h'=>$a[1], 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'DCTDecode', 'data'=>$data);
  4. }
  5. public function _parsepng($file)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Extract info from a PNG file
  8. $f=fopen($file,'rb');
  9. if(!$f)
  10. $this->Error('Can\'t open image file: '.$file);
  1. $this->Error('Missing palette in '.$file);
  2. fclose($f);
  3. return array('w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'FlateDecode', 'parms'=>$parms, 'pal'=>$pal, 'trns'=>$trns, 'data'=>$data);
  4. }
  5. public function _readstream($f, $n)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Read n bytes from stream
  8. $res='';
  9. while($n>0 && !feof($f))
  10. {
  1. if($n>0)
  2. $this->Error('Unexpected end of stream');
  3. return $res;
  4. }
  5. public function _readint($f)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Read a 4-byte integer from stream
  8. $a=unpack('Ni',$this->_readstream($f,4));
  9. return $a['i'];
  10. }
  1. //Read a 4-byte integer from stream
  2. $a=unpack('Ni',$this->_readstream($f,4));
  3. return $a['i'];
  4. }
  5. public function _parsegif($file)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Extract info from a GIF file (via PNG conversion)
  8. if(!function_exists('imagepng'))
  9. $this->Error('GD extension is required for GIF support');
  10. if(!function_exists('imagecreatefromgif'))
  1. $info=$this->_parsepng($tmp);
  2. unlink($tmp);
  3. return $info;
  4. }
  5. public function _newobj()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Begin a new object
  8. $this->n++;
  9. $this->offsets[$this->n]=strlen($this->buffer);
  10. $this->_out($this->n.' 0 obj');
  1. $this->n++;
  2. $this->offsets[$this->n]=strlen($this->buffer);
  3. $this->_out($this->n.' 0 obj');
  4. }
  5. public function _putstream($s)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. $this->_out('stream');
  8. $this->_out($s);
  9. $this->_out('endstream');
  10. }
  1. $this->_out('stream');
  2. $this->_out($s);
  3. $this->_out('endstream');
  4. }
  5. public function _out($s)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. //Add a line to the document
  8. if($this->state==2)
  9. $this->pages[$this->page].=$s."\n";
  10. else
  1. $this->pages[$this->page].=$s."\n";
  2. else
  3. $this->buffer.=$s."\n";
  4. }
  5. public function _putpages()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. $nb=$this->page;
  8. if(!empty($this->AliasNbPages))
  9. {
  10. //Replace number of pages
  1. $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$wPt,$hPt));
  2. $this->_out('>>');
  3. $this->_out('endobj');
  4. }
  5. public function _putfonts()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. $nf=$this->n;
  8. foreach($this->diffs as $diff)
  9. {
  10. //Encodings
  1. $this->$mtd($font);
  2. }
  3. }
  4. }
  5. public function _putimages()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. $filter=($this->compress) ? '/Filter /FlateDecode ' : '';
  8. //while(list($file,$info)=each($this->images))
  9. foreach ($this->images as $file => $info)
  10. {
  1. $this->_out('endobj');
  2. }
  3. }
  4. }
  5. public function _putxobjectdict()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. foreach($this->images as $image)
  8. $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R');
  9. }
  1. {
  2. foreach($this->images as $image)
  3. $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R');
  4. }
  5. public function _putresourcedict()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. $this->_out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]');
  8. $this->_out('/Font <<');
  9. foreach($this->fonts as $font)
  10. $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R');
  1. $this->_out('/XObject <<');
  2. $this->_putxobjectdict();
  3. $this->_out('>>');
  4. }
  5. public function _putresources()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. $this->_putfonts();
  8. $this->_putimages();
  9. //Resource dictionary
  10. $this->offsets[2]=strlen($this->buffer);
  1. $this->_putresourcedict();
  2. $this->_out('>>');
  3. $this->_out('endobj');
  4. }
  5. public function _putinfo()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. $this->_out('/Producer '.$this->_textstring('FPDF '.FPDF_VERSION));
  8. if(!empty($this->title))
  9. $this->_out('/Title '.$this->_textstring($this->title));
  10. if(!empty($this->subject))
  1. if(!empty($this->creator))
  2. $this->_out('/Creator '.$this->_textstring($this->creator));
  3. $this->_out('/CreationDate '.$this->_textstring('D:'.@date('YmdHis')));
  4. }
  5. public function _putcatalog()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. $this->_out('/Type /Catalog');
  8. $this->_out('/Pages 1 0 R');
  9. if($this->ZoomMode=='fullpage')
  10. $this->_out('/OpenAction [3 0 R /Fit]');
  1. $this->_out('/PageLayout /OneColumn');
  2. elseif($this->LayoutMode=='two')
  3. $this->_out('/PageLayout /TwoColumnLeft');
  4. }
  5. public function _putheader()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. $this->_out('%PDF-'.$this->PDFVersion);
  8. }
  9. public function _puttrailer()
  1. public function _putheader()
  2. {
  3. $this->_out('%PDF-'.$this->PDFVersion);
  4. }
  5. public function _puttrailer()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. $this->_out('/Size '.($this->n+1));
  8. $this->_out('/Root '.$this->n.' 0 R');
  9. $this->_out('/Info '.($this->n-1).' 0 R');
  10. }
  1. $this->_out('/Size '.($this->n+1));
  2. $this->_out('/Root '.$this->n.' 0 R');
  3. $this->_out('/Info '.($this->n-1).' 0 R');
  4. }
  5. public function _enddoc()

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. {
  7. $this->_putheader();
  8. $this->_putpages();
  9. $this->_putresources();
  10. //Info
  1. $this->_out(sprintf('%.2f %.2f l',($x)*$k,($hp-$yc)*$k ));
  2. $this->_Arc($xc - $r, $yc - $r*$MyArc, $xc - $r*$MyArc, $yc - $r, $xc, $yc - $r);
  3. $this->_out($op);
  4. }
  5. public function _Arc($x1, $y1, $x2, $y2, $x3, $y3) {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $h = $this->h;
  7. $this->_out(sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c ', $x1*$this->k, ($h-$y1)*$this->k,
  8. $x2*$this->k, ($h-$y2)*$this->k, $x3*$this->k, ($h-$y3)*$this->k));
  9. }
  1. $h = $this->h;
  2. $this->_out(sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c ', $x1*$this->k, ($h-$y1)*$this->k,
  3. $x2*$this->k, ($h-$y2)*$this->k, $x3*$this->k, ($h-$y3)*$this->k));
  4. }
  5. public function Header() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $CLICSHOPPING_Template = Registry::get('Template');
  7. // Logo
  8. if (file_exists(CLICSHOPPING::getConfig('dir_root', 'Shop') . $CLICSHOPPING_Template->getDirectoryTemplateImages() . 'logos/invoice/'. INVOICE_LOGO)) {
  9. $this->Image(CLICSHOPPING::getConfig('http_server', 'Shop') . $CLICSHOPPING_Template->getDirectoryShopTemplateImages() . 'logos/invoice/'. INVOICE_LOGO, 5, 10, 50);
  1. $this->Cell(-3);
  2. $this->MultiCell(100, 3.5, CLICSHOPPING::getDef('entry_http_site') . ' ' . HTTP::typeUrlDomain(),0,'L');
  3. }
  4. public function Footer() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. // Remerciement
  6. $this->SetY(-55);
  7. $this->SetFont('Arial','B',8);
  8. $this->SetTextColor(INVOICE_RGB);
  9. $this->Cell(0,10, utf8_decode(CLICSHOPPING::getDef('thank_you_customer')), 0,0,'C');
  1. }
  2. /**
  3. * Remove All Items
  4. */
  5. public function remove_all() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. $this->reset();
  7. }
  8. public function get_product_id_list() {
  9. $product_id_list = '';
  1. */
  2. public function remove_all() {
  3. $this->reset();
  4. }
  5. public function get_product_id_list() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. $product_id_list = '';
  7. if (is_array($this->contents)) {
  8. foreach (array_keys($this->contents) as $products_id ) {
  9. $product_id_list .= ', ' . $products_id;
  10. }
  1. }
  2. }
  3. }
  4. public function get_products() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. if (!is_array($this->contents)) return false;
  6. $products_array = [];
  7. foreach (array_keys($this->contents) as $products_id ) {
  1. }
  2. return $products_array;
  3. }
  4. public function show_total() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. $this->calculate();
  6. return $this->total;
  7. }
  1. $this->calculate();
  2. return $this->total;
  3. }
  4. public function show_weight() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. $this->calculate();
  6. return $this->weight;
  7. }
  1. $this->calculate();
  2. return $this->weight;
  3. }
  4. public function generate_cart_id($length = 5) {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. return Hash::getRandomString($length, 'digits');
  6. }
  7. public function get_content_type() {
  1. public function generate_cart_id($length = 5) {
  2. return Hash::getRandomString($length, 'digits');
  3. }
  4. public function get_content_type() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. $this->content_type = false;
  6. if ( (DOWNLOAD_ENABLED == 'true') && ($this->getCountContents() > 0) ) {
  7. foreach (array_keys($this->contents) as $products_id ) {
  1. */
  2. use ClicShopping\OM\Registry;
  3. use ClicShopping\OM\CLICSHOPPING;
  4. class ms_shopping_cart_delay_save_cart_message {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. public $code;
  6. public $group;
  7. public $title;
  8. public $description;
  9. public $sort_order;
  1. use ClicShopping\OM\CLICSHOPPING;
  2. use ClicShopping\Sites\Shop\Payment;
  3. class cc_checkout_confirmation_process_order {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  4. public $code;
  5. public $group;
  6. public $title;
  7. public $description;
  8. public $sort_order;
  1. );
  2. return $Qvalues->value('products_options_values_name');
  3. }
  4. public function UploadImage() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Template = Registry::get('TemplateAdmin');
  6. Registry::set('ImageResample', new ImageResample());
  7. $CLICSHOPPING_ImageResample = Registry::get('ImageResample');
  1. }
  2. return $output;
  3. }
  4. public function Install() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  5. $this->app->db->save('configuration', [
  6. 'configuration_title' => 'Do you want install this module ?',
  7. 'configuration_key' => 'MODULE_HEADER_TAGS_PRODUCTS_STOCK_STATUS',
  8. 'configuration_value' => 'True',
  9. 'configuration_description' => 'Do you want install this module ?',
  1. $this->customerGroupId = HTML::sanitize($_GET['cgID']);
  2. $this->createFile = HTML::sanitize($_GET['ac']);
  3. $this->newsletterNoAccount = HTML::sanitize($_GET['ana']);
  4. }
  5. public function choose_audience() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by clicshopping
  6. return false;
  7. }
  8. public function confirm() {
  1. EOD;
  2. return $output;
  3. }
  4. public function Install() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. if ($this->lang->getId() != 2) {
  6. $this->app->db->save('configuration', [
  7. 'configuration_title' => 'Souhaitez vous activer ce module ?',
  1. EOD;
  2. return $output;
  3. }
  4. public function Install() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. if ($this->lang->getId() != 2) {
  6. $this->app->db->save('configuration', [
  7. 'configuration_title' => 'Souhaitez vous activer ce module ?',
  1. EOD;
  2. return $output;
  3. }
  4. public function Install() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. if ($this->lang->getId() != 2) {
  6. $this->app->db->save('configuration', [
  7. 'configuration_title' => 'Souhaitez vous activer ce module ?',
  1. public static function getBaseNameIndex() {
  2. return basename(static::getIndex());
  3. }
  4. public static function ArrayToString($array , $exclude = '', $equals = '=', $separator = '&') {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. if (!is_array($exclude)) $exclude = [];
  6. $get_string = '';
  7. if (!empty($array)) {
  1. Public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment') {
  2. $this->phpMail->AddAttachment($path, $name, $encoding, $type, $disposition);
  3. }
  4. Public function build_message() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. //out of work function
  6. }
  7. /**
  8. * @param string $to_name
  1. * @param array $files
  2. * @param string $destination
  3. * @param bool $overwrite
  4. * @return bool
  5. */
  6. public static function Create($files = [], $destination = '', $overwrite = false) {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  7. //if the zip file already exists and overwrite is false, return false
  8. if(file_exists($destination) && !$overwrite) {
  9. return false;
  10. }
  1. $this->_out(sprintf('%.2f %.2f l',($x)*$k,($hp-$yc)*$k ));
  2. $this->_Arc($xc - $r, $yc - $r*$MyArc, $xc - $r*$MyArc, $yc - $r, $xc, $yc - $r);
  3. $this->_out($op);
  4. }
  5. public function _Arc($x1, $y1, $x2, $y2, $x3, $y3) {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $h = $this->h;
  7. $this->_out(sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c ', $x1*$this->k, ($h-$y1)*$this->k,
  8. $x2*$this->k, ($h-$y2)*$this->k, $x3*$this->k, ($h-$y3)*$this->k));
  9. }
  1. $h = $this->h;
  2. $this->_out(sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c ', $x1*$this->k, ($h-$y1)*$this->k,
  3. $x2*$this->k, ($h-$y2)*$this->k, $x3*$this->k, ($h-$y3)*$this->k));
  4. }
  5. public function Header() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $CLICSHOPPING_Template = Registry::get('Template');
  7. $date = strftime('%A, %d %B %Y');
  8. // Logo
  1. $this->Ln(0);
  2. $this->Cell(-3);
  3. $this->MultiCell(100, 3.5, CLICSHOPPING::getDef('entry_http_site') . ' ' . HTTP::typeUrlDomain(),0,'L');
  4. }
  5. public function Footer() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. // Remerciement
  7. $this->SetY(-55);
  8. $this->SetFont('Arial','B',8);
  9. $this->SetTextColor(INVOICE_RGB);
  10. $this->Cell(0,10, utf8_decode(CLICSHOPPING::getDef('thank_you_customer')), 0,0,'C');
  1. *
  2. * @param string $languagefiles, file language in function the the file for the template
  3. * @access public
  4. */
  5. public function GetPathDirectoryTemplatetLanguageFiles($name) {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. $CLICSHOPPING_Language = Registry::get('Language');
  7. if (is_file(CLICSHOPPING::getConfig('dir_root', 'Shop') . static::getPathDirectoryTemplateThema() . '/' . 'languages' . '/' . $CLICSHOPPING_Language->get('directory') . '/' . $name . '.php') ) {
  8. $languagefiles = static::getPathDirectoryTemplateThema() . '/' . 'languages' . '/' . $CLICSHOPPING_Language->get('directory') . '/' . $name . '.php';
  9. if (is_file(CLICSHOPPING::getConfig('dir_root', 'Shop') . $this->getSiteTemplateLanguageDirectory() . '/' . $CLICSHOPPING_Language->get('directory') . '/' . $name . '.php')) {
  1. use ClicShopping\OM\CLICSHOPPING;
  2. use ClicShopping\OM\Registry;
  3. use ClicShopping\OM\HTTP;
  4. class ar_admin_login {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. public $code;
  6. public $title;
  7. public $description;
  8. public $sort_order = 0;
  9. public $minutes = 5;
  1. use ClicShopping\OM\CLICSHOPPING;
  2. use ClicShopping\OM\Registry;
  3. use ClicShopping\OM\HTTP;
  4. class ar_contact_us {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. public $code;
  6. public $title;
  7. public $description;
  8. public $sort_order = 0;
  9. public $minutes = 15;
  1. use ClicShopping\OM\CLICSHOPPING;
  2. use ClicShopping\OM\Registry;
  3. use ClicShopping\OM\HTTP;
  4. class ar_create_account {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. public $code;
  6. public $title;
  7. public $description;
  8. public $sort_order = 0;
  9. public $minutes = 90;
  1. use ClicShopping\OM\CLICSHOPPING;
  2. use ClicShopping\OM\Registry;
  3. use ClicShopping\OM\HTTP;
  4. class ar_create_account_pro {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. public $code;
  6. public $title;
  7. public $description;
  8. public $sort_order = 0;
  9. public $minutes = 90;
  1. use ClicShopping\OM\Registry;
  2. use ClicShopping\OM\CLICSHOPPING;
  3. use ClicShopping\OM\HTTP;
  4. class ar_reset_password {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. public $code;
  6. public $title;
  7. public $description;
  8. public $sort_order = 0;
  9. public $minutes = 5;
  1. use ClicShopping\OM\CLICSHOPPING;
  2. use ClicShopping\OM\Registry;
  3. use ClicShopping\OM\HTTP;
  4. class ar_tell_a_friend {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. public $code;
  6. public $title;
  7. public $description;
  8. public $sort_order = 0;
  9. public $minutes = 15;
  1. */
  2. use ClicShopping\OM\Registry;
  3. use ClicShopping\OM\CLICSHOPPING;
  4. class ht_datepicker_jquery {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. public $code;
  6. public $group;
  7. public $title;
  8. public $description;
  9. public $sort_order;
  1. 'MODULE_HEADER_TAGS_DATEPICKER_JQUERY_SORT_ORDER',
  2. 'MODULE_HEADER_TAGS_DATEPICKER_JQUERY_PAGES'
  3. );
  4. }
  5. public function get_default_pages() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  6. return array('Search&AdvancedSearch',
  7. 'Account&Edit',
  8. 'Account&Create',
  9. 'Account&CreatePro'
  10. );
  1. */
  2. use ClicShopping\OM\CLICSHOPPING;
  3. use ClicShopping\OM\Registry;
  4. class securityCheckExtended_admin_backup_directory_listing {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. public $type = 'error';
  6. public $has_doc = true;
  7. public function __construct() {
  8. $CLICSHOPPING_Language = Registry::get('Language');
  1. */
  2. use ClicShopping\OM\CLICSHOPPING;
  3. use ClicShopping\OM\Registry;
  4. class securityCheckExtended_admin_backup_file {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. public $type = 'error';
  6. public $has_doc = true;
  7. public function __construct() {
  8. $CLICSHOPPING_Language = Registry::get('Language');
  1. */
  2. use ClicShopping\OM\CLICSHOPPING;
  3. use ClicShopping\OM\Registry;
  4. class securityCheckExtended_admin_images_directory_listing {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. public $type = 'warning';
  6. public $has_doc = true;
  7. public function __construct() {
  8. $CLICSHOPPING_Language = Registry::get('Language');
  1. */
  2. use ClicShopping\OM\CLICSHOPPING;
  3. use ClicShopping\OM\Registry;
  4. class securityCheckExtended_admin_includes_directory_listing {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. public $type = 'warning';
  6. public $has_doc = true;
  7. public function __construct() {
  8. $CLICSHOPPING_Language = Registry::get('Language');
  1. use ClicShopping\OM\CLICSHOPPING;
  2. use ClicShopping\OM\Registry;
  3. class securityCheckExtended_ext_directory_listing {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  4. public $type = 'warning';
  5. public $has_doc = true;
  6. public function __construct() {
  7. $CLICSHOPPING_Language = Registry::get('Language');
  1. */
  2. use ClicShopping\OM\CLICSHOPPING;
  3. use ClicShopping\OM\Registry;
  4. class securityCheckExtended_images_directory_listing {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. public $type = 'warning';
  6. public $has_doc = true;
  7. public function __construct() {
  8. $CLICSHOPPING_Language = Registry::get('Language');
  1. */
  2. use ClicShopping\OM\CLICSHOPPING;
  3. use ClicShopping\OM\Registry;
  4. class securityCheckExtended_includes_directory_listing {

    Class names should be declared in StudlyCaps.
    You should rename this class to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. public $type = 'warning';
  6. public $has_doc = true;
  7. public function _construct() {
  8. $CLICSHOPPING_Language = Registry::get('Language');
  1. class securityCheckExtended_includes_directory_listing {
  2. public $type = 'warning';
  3. public $has_doc = true;
  4. public function _construct() {

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by ClicShopping
  5. $CLICSHOPPING_Language = Registry::get('Language');
  6. $CLICSHOPPING_Language->loadDefinitions('modules/security_check/extended/includes_directory_listing',null, null, 'Shop');
  7. $this->title = CLICSHOPPING::getDef('module_security_check_extended_includes_directory_listing_title');