Completed
Push — master ( 8a2856...b82fdb )
by Harald
07:56 queued 04:04
created

cfgm_boxes::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 5
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 5
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/*
3
  $Id$
4
5
  osCommerce, Open Source E-Commerce Solutions
6
  http://www.oscommerce.com
7
8
  Copyright (c) 2010 osCommerce
9
10
  Released under the GNU General Public License
11
*/
12
13
  use OSC\OM\OSCOM;
14
15 View Code Duplication
  class cfgm_boxes {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
16
    var $code = 'boxes';
17
    var $directory;
18
    var $language_directory;
19
    var $site = 'Shop';
20
    var $key = 'MODULE_BOXES_INSTALLED';
21
    var $title;
22
    var $template_integration = true;
23
24
    function __construct() {
25
      $this->directory = OSCOM::getConfig('dir_root', $this->site) . 'includes/modules/boxes/';
26
      $this->language_directory = OSCOM::getConfig('dir_root', $this->site) . 'includes/languages/';
27
      $this->title = MODULE_CFG_MODULE_BOXES_TITLE;
28
    }
29
  }
30
?>
0 ignored issues
show
Best Practice introduced by
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
31