Completed
Push — master ( 01b1a5...81f493 )
by Michael
04:03
created
class/adsense.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     /**
93 93
      * @param  string $key
94 94
      * @param  string $format
95
-     * @return mixed
95
+     * @return string
96 96
      */
97 97
     public function getVar($key, $format = 's')
98 98
     {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     }
158 158
 
159 159
     /**
160
-     * @return mixed|string
160
+     * @return string
161 161
      */
162 162
     public function generateTag()
163 163
     {
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
31 31
 
32
-include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php';
32
+include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobject.php';
33 33
 
34 34
 /**
35 35
  * Class SmartobjectAdsense
@@ -111,23 +111,23 @@  discard block
 block discarded – undo
111 111
     {
112 112
         global $smartobjectAdsenseHandler;
113 113
         if ($this->getVar('style', 'n') !== '') {
114
-            $ret = '<div style="' . $this->getVar('style', 'n') . '">';
114
+            $ret = '<div style="'.$this->getVar('style', 'n').'">';
115 115
         } else {
116 116
             $ret = '<div>';
117 117
         }
118 118
 
119 119
         $ret .= '<script type="text/javascript"><!--
120
-google_ad_client = "' . $this->getVar('client_id', 'n') . '";
121
-google_ad_width = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['width'] . ';
122
-google_ad_height = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['height'] . ';
123
-google_ad_format = "' . $this->getVar('format', 'n') . '";
120
+google_ad_client = "' . $this->getVar('client_id', 'n').'";
121
+google_ad_width = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['width'].';
122
+google_ad_height = ' . $smartobjectAdsenseHandler->adFormats[$this->getVar('format', 'n')]['height'].';
123
+google_ad_format = "' . $this->getVar('format', 'n').'";
124 124
 google_ad_type = "text";
125 125
 google_ad_channel ="";
126
-google_color_border = "' . $this->getVar('border_color', 'n') . '";
127
-google_color_bg = "' . $this->getVar('background_color', 'n') . '";
128
-google_color_link = "' . $this->getVar('link_color', 'n') . '";
129
-google_color_url = "' . $this->getVar('url_color', 'n') . '";
130
-google_color_text = "' . $this->getVar('text_color', 'n') . '";
126
+google_color_border = "' . $this->getVar('border_color', 'n').'";
127
+google_color_bg = "' . $this->getVar('background_color', 'n').'";
128
+google_color_link = "' . $this->getVar('link_color', 'n').'";
129
+google_color_url = "' . $this->getVar('url_color', 'n').'";
130
+google_color_text = "' . $this->getVar('text_color', 'n').'";
131 131
 //--></script>
132 132
 <script type="text/javascript"
133 133
   src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      */
143 143
     public function getXoopsCode()
144 144
     {
145
-        $ret = '[adsense]' . $this->getVar('tag', 'n') . '[/adsense]';
145
+        $ret = '[adsense]'.$this->getVar('tag', 'n').'[/adsense]';
146 146
 
147 147
         return $ret;
148 148
     }
@@ -234,16 +234,16 @@  discard block
 block discarded – undo
234 234
      */
235 235
     public function getCloneLink()
236 236
     {
237
-        $ret = '<a href="' .
238
-               SMARTOBJECT_URL .
239
-               'admin/adsense.php?op=clone&adsenseid=' .
240
-               $this->getVar('adsenseid') .
241
-               '"><img src="' .
242
-               SMARTOBJECT_IMAGES_ACTIONS_URL .
243
-               'editcopy.png" alt="' .
244
-               _CO_SOBJECT_ADSENSE_CLONE .
245
-               '" title="' .
246
-               _CO_SOBJECT_ADSENSE_CLONE .
237
+        $ret = '<a href="'.
238
+               SMARTOBJECT_URL.
239
+               'admin/adsense.php?op=clone&adsenseid='.
240
+               $this->getVar('adsenseid').
241
+               '"><img src="'.
242
+               SMARTOBJECT_IMAGES_ACTIONS_URL.
243
+               'editcopy.png" alt="'.
244
+               _CO_SOBJECT_ADSENSE_CLONE.
245
+               '" title="'.
246
+               _CO_SOBJECT_ADSENSE_CLONE.
247 247
                '" /></a>';
248 248
 
249 249
         return $ret;
Please login to merge, or discard this patch.
class/customtag.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@
 block discarded – undo
147 147
     }
148 148
 
149 149
     /**
150
-     * @return mixed|string
150
+     * @return string
151 151
      */
152 152
     public function generateTag()
153 153
     {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
31 31
 
32
-include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php';
32
+include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobject.php';
33 33
 
34 34
 /**
35 35
  * Class SmartobjectCustomtag
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     public function getXoopsCode()
124 124
     {
125
-        $ret = '[customtag]' . $this->getVar('tag', 'n') . '[/customtag]';
125
+        $ret = '[customtag]'.$this->getVar('tag', 'n').'[/customtag]';
126 126
 
127 127
         return $ret;
128 128
     }
@@ -132,16 +132,16 @@  discard block
 block discarded – undo
132 132
      */
133 133
     public function getCloneLink()
134 134
     {
135
-        $ret = '<a href="' .
136
-               SMARTOBJECT_URL .
137
-               'admin/customtag.php?op=clone&customtagid=' .
138
-               $this->id() .
139
-               '"><img src="' .
140
-               SMARTOBJECT_IMAGES_ACTIONS_URL .
141
-               'editcopy.png" style="vertical-align: middle;" alt="' .
142
-               _CO_SOBJECT_CUSTOMTAG_CLONE .
143
-               '" title="' .
144
-               _CO_SOBJECT_CUSTOMTAG_CLONE .
135
+        $ret = '<a href="'.
136
+               SMARTOBJECT_URL.
137
+               'admin/customtag.php?op=clone&customtagid='.
138
+               $this->id().
139
+               '"><img src="'.
140
+               SMARTOBJECT_IMAGES_ACTIONS_URL.
141
+               'editcopy.png" style="vertical-align: middle;" alt="'.
142
+               _CO_SOBJECT_CUSTOMTAG_CLONE.
143
+               '" title="'.
144
+               _CO_SOBJECT_CUSTOMTAG_CLONE.
145 145
                '" /></a>';
146 146
 
147 147
         return $ret;
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
             $granted_ids                   = $smartobjectPermissionsHandler->getGrantedItems('view');
279 279
 
280 280
             if ($granted_ids && count($granted_ids) > 0) {
281
-                $criteria->add(new Criteria('customtagid', '(' . implode(', ', $granted_ids) . ')', 'IN'));
281
+                $criteria->add(new Criteria('customtagid', '('.implode(', ', $granted_ids).')', 'IN'));
282 282
                 $customtagsObj = $this->getObjects($criteria, true);
283 283
                 foreach ($customtagsObj as $customtagObj) {
284 284
                     $ret[$customtagObj->getVar('name')] = $customtagObj;
Please login to merge, or discard this patch.
class/form/elements/smartformuploadelement.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
 class SmartFormUploadElement extends XoopsFormFile
13 13
 {
14 14
     /**
15
-     * @param $object
16
-     * @param $key
15
+     * @param string $object
16
+     * @param string $key
17 17
      */
18 18
     public function SmartFormFileElement($object, $key)
19 19
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@
 block discarded – undo
28 28
      */
29 29
     public function render()
30 30
     {
31
-        return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "' />
32
-                <input type='file' name='" . $this->getName() . "' id='" . $this->getName() . "'" . $this->getExtra() . " />
33
-                <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName() . "' />";
31
+        return "<input type='hidden' name='MAX_FILE_SIZE' value='".$this->getMaxFileSize()."' />
32
+                <input type='file' name='" . $this->getName()."' id='".$this->getName()."'".$this->getExtra()." />
33
+                <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName()."' />";
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
class/form/smartobjectform.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -306,8 +306,8 @@
 block discarded – undo
306 306
     }
307 307
 
308 308
     /**
309
-     * @param      $form_name
310
-     * @param      $form_caption
309
+     * @param      string $form_name
310
+     * @param      string $form_caption
311 311
      * @param bool $submit_button_caption
312 312
      */
313 313
     public function createButtons($form_name, $form_caption, $submit_button_caption = false)
Please login to merge, or discard this patch.
Spacing   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 /**
16 16
  * Including the XoopsFormLoader classes
17 17
  */
18
-include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
19
-include_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformsection.php';
20
-include_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformsectionclose.php';
18
+include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
19
+include_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformsection.php';
20
+include_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformsectionclose.php';
21 21
 
22 22
 /**
23 23
  * SmartForm base class
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function __construct(&$target, $form_name, $form_caption, $form_action, $form_fields = null, $submit_button_caption = false, $cancel_js_action = false, $captcha = false)
54 54
     {
55
-        $this->targetObject           =& $target;
55
+        $this->targetObject           = & $target;
56 56
         $this->form_fields            = $form_fields;
57 57
         $this->_cancel_js_action      = $cancel_js_action;
58 58
         $this->_captcha               = $captcha;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
     public function addCaptcha()
82 82
     {
83
-        include_once(SMARTOBJECT_ROOT_PATH . 'include/captcha/formcaptcha.php');
83
+        include_once(SMARTOBJECT_ROOT_PATH.'include/captcha/formcaptcha.php');
84 84
         $this->addElement(new XoopsFormCaptcha(), true);
85 85
     }
86 86
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function addCustomButton($name, $caption, $onclick = false)
93 93
     {
94
-        $custom_button_array    = array(
94
+        $custom_button_array = array(
95 95
             'name'    => $name,
96 96
             'caption' => $caption,
97 97
             'onclick' => $onclick
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         if ($key) {
113 113
             if ($this->targetObject->vars[$key]['readonly']) {
114 114
                 $formElement->setExtra('disabled="disabled"');
115
-                $formElement->setName($key . '-readonly');
115
+                $formElement->setName($key.'-readonly');
116 116
                 // Since this element is disable, we still want to pass it's value in the form
117 117
                 $hidden = new XoopsFormHidden($key, $this->targetObject->vars[$key]['value']);
118 118
                 $this->addElement($hidden);
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                 $this->addElement($hidden);
124 124
                 $otherExtra      = isset($var['form_extra']) ? $var['form_extra'] : '';
125 125
                 $onchangedString = "this.form.elements.changedField.value='$key'; this.form.elements.op.value='changedField'; submit()";
126
-                $formElement->setExtra('onchange="' . $onchangedString . '"' . ' ' . $otherExtra);
126
+                $formElement->setExtra('onchange="'.$onchangedString.'"'.' '.$otherExtra);
127 127
             } else {
128 128
                 if (isset($var['form_extra'])) {
129 129
                     $formElement->setExtra($var['form_extra']);
@@ -290,8 +290,8 @@  discard block
 block discarded – undo
290 290
             asort($group_list);
291 291
             foreach ($permissions as $permission) {
292 292
                 if ($this->targetObject->isNew()) {
293
-                    if (isset($smartModuleConfig['def_perm_' . $permission['perm_name']])) {
294
-                        $groups_value = $smartModuleConfig['def_perm_' . $permission['perm_name']];
293
+                    if (isset($smartModuleConfig['def_perm_'.$permission['perm_name']])) {
294
+                        $groups_value = $smartModuleConfig['def_perm_'.$permission['perm_name']];
295 295
                     }
296 296
                 } else {
297 297
                     $groups_value = $this->targetObject->getGroupPerm($permission['perm_name']);
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
         } else {
324 324
             $butt_create = new XoopsFormButton('', 'modify_button', $submit_button_caption, 'submit');
325 325
         }
326
-        $butt_create->setExtra('onclick="this.form.elements.op.value=\'' . $form_name . '\'"');
326
+        $butt_create->setExtra('onclick="this.form.elements.op.value=\''.$form_name.'\'"');
327 327
         $button_tray->addElement($butt_create);
328 328
 
329 329
         //creating custom buttons
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
             foreach ($this->_custom_button as $custom_button) {
332 332
                 $butt_custom = new XoopsFormButton('', $custom_button['name'], $custom_button['caption'], 'submit');
333 333
                 if ($custom_button['onclick']) {
334
-                    $butt_custom->setExtra('onclick="' . $custom_button['onclick'] . '"');
334
+                    $butt_custom->setExtra('onclick="'.$custom_button['onclick'].'"');
335 335
                 }
336 336
                 $button_tray->addElement($butt_custom);
337 337
                 unset($butt_custom);
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
         // creating the "cancel" button
342 342
         $butt_cancel = new XoopsFormButton('', 'cancel_button', _CO_SOBJECT_CANCEL, 'button');
343 343
         if ($this->_cancel_js_action) {
344
-            $butt_cancel->setExtra('onclick="' . $this->_cancel_js_action . '"');
344
+            $butt_cancel->setExtra('onclick="'.$this->_cancel_js_action.'"');
345 345
         } else {
346 346
             $butt_cancel->setExtra('onclick="history.go(-1)"');
347 347
         }
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
     {
360 360
         switch ($controlName) {
361 361
             case 'check':
362
-                include_once(SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformcheckelement.php');
362
+                include_once(SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformcheckelement.php');
363 363
                 $control    = $this->targetObject->getControl($key);
364 364
                 $controlObj = new SmartFormCheckElement($this->targetObject->vars[$key]['form_caption'], $key, $this->targetObject->getVar($key));
365 365
                 $controlObj->addOptionArray($control['options']);
@@ -426,38 +426,38 @@  discard block
 block discarded – undo
426 426
                 break;
427 427
 
428 428
             case 'urllink':
429
-                include_once(SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformurllinkelement.php');
429
+                include_once(SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformurllinkelement.php');
430 430
 
431 431
                 return new SmartFormUrlLinkElement($this->targetObject->vars[$key]['form_caption'], $key, $this->targetObject->getUrlLinkObj($key));
432 432
                 break;
433 433
 
434 434
             case 'richfile':
435
-                include_once(SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformrichfileelement.php');
435
+                include_once(SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformrichfileelement.php');
436 436
 
437 437
                 return new SmartFormRichFileElement($this->targetObject->vars[$key]['form_caption'], $key, $this->targetObject->getFileObj($key));
438 438
                 break;
439 439
             case 'section':
440
-                include_once(SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformsection.php');
440
+                include_once(SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformsection.php');
441 441
 
442 442
                 return new SmartFormSection($key, $this->targetObject->vars[$key]['form_caption']);
443 443
                 break;
444 444
 
445 445
             default:
446
-                $classname = 'SmartForm' . ucfirst($controlName) . 'Element';
446
+                $classname = 'SmartForm'.ucfirst($controlName).'Element';
447 447
                 if (!class_exists($classname)) {
448
-                    if (file_exists(SMARTOBJECT_ROOT_PATH . 'class/form/elements/' . strtolower($classname) . '.php')) {
449
-                        include_once(SMARTOBJECT_ROOT_PATH . 'class/form/elements/' . strtolower($classname) . '.php');
448
+                    if (file_exists(SMARTOBJECT_ROOT_PATH.'class/form/elements/'.strtolower($classname).'.php')) {
449
+                        include_once(SMARTOBJECT_ROOT_PATH.'class/form/elements/'.strtolower($classname).'.php');
450 450
                     } else {
451 451
                         // perhaps this is a control created by the module
452 452
                         $moduleName             = $this->targetObject->handler->_moduleName;
453
-                        $moduleFormElementsPath = $this->targetObject->handler->_modulePath . 'class/form/elements/';
454
-                        $classname              = ucfirst($moduleName) . ucfirst($controlName) . 'Element';
455
-                        $classFileName          = strtolower($classname) . '.php';
453
+                        $moduleFormElementsPath = $this->targetObject->handler->_modulePath.'class/form/elements/';
454
+                        $classname              = ucfirst($moduleName).ucfirst($controlName).'Element';
455
+                        $classFileName          = strtolower($classname).'.php';
456 456
 
457
-                        if (file_exists($moduleFormElementsPath . $classFileName)) {
458
-                            include_once($moduleFormElementsPath . $classFileName);
457
+                        if (file_exists($moduleFormElementsPath.$classFileName)) {
458
+                            include_once($moduleFormElementsPath.$classFileName);
459 459
                         } else {
460
-                            trigger_error($classname . ' Not found', E_USER_WARNING);
460
+                            trigger_error($classname.' Not found', E_USER_WARNING);
461 461
 
462 462
                             return new XoopsFormLabel(); //Empty object
463 463
                         }
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
         $editor_configs['height'] = '400px';
527 527
 
528 528
         $dhtml            = true;
529
-        $xoopseditorclass = XOOPS_ROOT_PATH . '/class/xoopsform/formeditor.php';
529
+        $xoopseditorclass = XOOPS_ROOT_PATH.'/class/xoopsform/formeditor.php';
530 530
 
531 531
         if (file_exists($xoopseditorclass)) {
532 532
             include_once($xoopseditorclass);
@@ -536,8 +536,8 @@  discard block
 block discarded – undo
536 536
 
537 537
                 case 'tiny':
538 538
                     if (!$xoops22) {
539
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/xoopseditor/tinyeditor/formtinytextarea.php')) {
540
-                            include_once(XOOPS_ROOT_PATH . '/class/xoopseditor/tinyeditor/formtinytextarea.php');
539
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/xoopseditor/tinyeditor/formtinytextarea.php')) {
540
+                            include_once(XOOPS_ROOT_PATH.'/class/xoopseditor/tinyeditor/formtinytextarea.php');
541 541
                             $editor = new XoopsFormTinyTextArea(array('caption' => $caption, 'name' => $name, 'value' => $value, 'width' => '100%', 'height' => '300px'), true);
542 542
                         } else {
543 543
                             if ($dhtml) {
@@ -561,8 +561,8 @@  discard block
 block discarded – undo
561 561
 
562 562
                 case 'fckeditor':
563 563
                     if (!$xoops22) {
564
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/xoopseditor/fckeditor/formfckeditor.php')) {
565
-                            include_once(XOOPS_ROOT_PATH . '/class/xoopseditor/fckeditor/formfckeditor.php');
564
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/xoopseditor/fckeditor/formfckeditor.php')) {
565
+                            include_once(XOOPS_ROOT_PATH.'/class/xoopseditor/fckeditor/formfckeditor.php');
566 566
                             $editor = new XoopsFormFckeditor(array('caption' => $caption, 'name' => $name, 'value' => $value, 'width' => '100%', 'height' => '300px'), true);
567 567
                         } else {
568 568
                             if ($dhtml) {
@@ -578,8 +578,8 @@  discard block
 block discarded – undo
578 578
 
579 579
                 case 'inbetween':
580 580
                     if (!$xoops22) {
581
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/xoopseditor/inbetween/forminbetweentextarea.php')) {
582
-                            include_once(XOOPS_ROOT_PATH . '/class/xoopseditor/inbetween/forminbetweentextarea.php');
581
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/xoopseditor/inbetween/forminbetweentextarea.php')) {
582
+                            include_once(XOOPS_ROOT_PATH.'/class/xoopseditor/inbetween/forminbetweentextarea.php');
583 583
                             $editor = new XoopsFormInbetweenTextArea(array('caption' => $caption, 'name' => $name, 'value' => $value, 'width' => '100%', 'height' => '300px'), true);
584 584
                         } else {
585 585
                             if ($dhtml) {
@@ -595,8 +595,8 @@  discard block
 block discarded – undo
595 595
 
596 596
                 case 'koivi':
597 597
                     if (!$xoops22) {
598
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/wysiwyg/formwysiwygtextarea.php')) {
599
-                            include_once(XOOPS_ROOT_PATH . '/class/wysiwyg/formwysiwygtextarea.php');
598
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/wysiwyg/formwysiwygtextarea.php')) {
599
+                            include_once(XOOPS_ROOT_PATH.'/class/wysiwyg/formwysiwygtextarea.php');
600 600
                             $editor = new XoopsFormWysiwygTextArea($caption, $name, $value, '100%', '400px');
601 601
                         } else {
602 602
                             if ($dhtml) {
@@ -612,8 +612,8 @@  discard block
 block discarded – undo
612 612
 
613 613
                 case 'spaw':
614 614
                     if (!$xoops22) {
615
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/spaw/formspaw.php')) {
616
-                            include_once(XOOPS_ROOT_PATH . '/class/spaw/formspaw.php');
615
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/spaw/formspaw.php')) {
616
+                            include_once(XOOPS_ROOT_PATH.'/class/spaw/formspaw.php');
617 617
                             $editor = new XoopsFormSpaw($caption, $name, $value);
618 618
                         }
619 619
                     } else {
@@ -623,8 +623,8 @@  discard block
 block discarded – undo
623 623
 
624 624
                 case 'htmlarea':
625 625
                     if (!$xoops22) {
626
-                        if (is_readable(XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php')) {
627
-                            include_once(XOOPS_ROOT_PATH . '/class/htmlarea/formhtmlarea.php');
626
+                        if (is_readable(XOOPS_ROOT_PATH.'/class/htmlarea/formhtmlarea.php')) {
627
+                            include_once(XOOPS_ROOT_PATH.'/class/htmlarea/formhtmlarea.php');
628 628
                             $editor = new XoopsFormHtmlarea($caption, $name, $value);
629 629
                         }
630 630
                     } else {
@@ -660,10 +660,10 @@  discard block
 block discarded – undo
660 660
         $size         = $multiple ? 5 : 1;
661 661
         $theme_select = new XoopsFormSelect($var['form_caption'], $key, $this->targetObject->getVar($key), $size, $multiple);
662 662
 
663
-        $handle  = opendir(XOOPS_THEME_PATH . '/');
663
+        $handle  = opendir(XOOPS_THEME_PATH.'/');
664 664
         $dirlist = array();
665 665
         while (false !== ($file = readdir($handle))) {
666
-            if (is_dir(XOOPS_THEME_PATH . '/' . $file) && !preg_match("/^[.]{1,2}$/", $file) && strtolower($file) !== 'cvs') {
666
+            if (is_dir(XOOPS_THEME_PATH.'/'.$file) && !preg_match("/^[.]{1,2}$/", $file) && strtolower($file) !== 'cvs') {
667 667
                 $dirlist[$file] = $file;
668 668
             }
669 669
         }
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
     {
685 685
         foreach ($this->_elements as $eleObj) {
686 686
             if ($eleObj->getName() == $keyname) {
687
-                $ret =& $eleObj;
687
+                $ret = & $eleObj;
688 688
                 break;
689 689
             }
690 690
         }
@@ -702,21 +702,21 @@  discard block
 block discarded – undo
702 702
         $required = $this->getRequired();
703 703
         $ret      = "
704 704
             <form name='" .
705
-                    $this->getName() .
706
-                    "' id='" .
707
-                    $this->getName() .
708
-                    "' action='" .
709
-                    $this->getAction() .
710
-                    "' method='" .
711
-                    $this->getMethod() .
712
-                    "' onsubmit='return xoopsFormValidate_" .
713
-                    $this->getName() .
714
-                    "(this);'" .
715
-                    $this->getExtra() .
705
+                    $this->getName().
706
+                    "' id='".
707
+                    $this->getName().
708
+                    "' action='".
709
+                    $this->getAction().
710
+                    "' method='".
711
+                    $this->getMethod().
712
+                    "' onsubmit='return xoopsFormValidate_".
713
+                    $this->getName().
714
+                    "(this);'".
715
+                    $this->getExtra().
716 716
                     ">
717 717
             <table width='100%' class='outer' cellspacing='1'>
718 718
             <tr><th colspan='2'>" .
719
-                    $this->getTitle() .
719
+                    $this->getTitle().
720 720
                     '</th></tr>
721 721
         ';
722 722
         $hidden   = '';
@@ -726,11 +726,11 @@  discard block
 block discarded – undo
726 726
                 $ret .= $ele;
727 727
             } elseif (!$ele->isHidden()) {
728 728
                 //$class = ( $class == 'even' ) ? 'odd': 'even';
729
-                $ret .= "<tr id='" . $ele->getName() . "' valign='top' align='left'><td class='head'>" . $ele->getCaption();
729
+                $ret .= "<tr id='".$ele->getName()."' valign='top' align='left'><td class='head'>".$ele->getCaption();
730 730
                 if ($ele->getDescription() !== '') {
731
-                    $ret .= '<br><br><span style="font-weight: normal;">' . $ele->getDescription() . '</span>';
731
+                    $ret .= '<br><br><span style="font-weight: normal;">'.$ele->getDescription().'</span>';
732 732
                 }
733
-                $ret .= "</td><td class='$class'>" . $ele->render() . "</td></tr>\n";
733
+                $ret .= "</td><td class='$class'>".$ele->render()."</td></tr>\n";
734 734
             } else {
735 735
                 $hidden .= $ele->render();
736 736
             }
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
             'name'       => $this->getName(),
777 777
             'action'     => $this->getAction(),
778 778
             'method'     => $this->getMethod(),
779
-            'extra'      => 'onsubmit="return xoopsFormValidate_' . $this->getName() . '(this);"' . $this->getExtra(),
779
+            'extra'      => 'onsubmit="return xoopsFormValidate_'.$this->getName().'(this);"'.$this->getExtra(),
780 780
             'javascript' => $js,
781 781
             'elements'   => $elements
782 782
         ));
@@ -844,15 +844,15 @@  discard block
 block discarded – undo
844 844
                         window.alert(\"{$eltmsg}\"); myform['{$eltname}'][0].focus(); return false; }\n";
845 845
                 }
846 846
             } else {
847
-                $js .= "if ( myform.{$eltname}.value == \"\" ) " . "{ window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }\n";
847
+                $js .= "if ( myform.{$eltname}.value == \"\" ) "."{ window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }\n";
848 848
             }
849 849
         }
850 850
         // Now, handle custom validation code
851
-        $elements =& $this->getElements(true);
851
+        $elements = & $this->getElements(true);
852 852
         foreach ($elements as $elt) {
853 853
             if (method_exists($elt, 'renderValidationJS') && strtolower(get_class($elt)) !== 'xoopsformcheckbox') {
854 854
                 if ($eltjs = $elt->renderValidationJS()) {
855
-                    $js .= $eltjs . "\n";
855
+                    $js .= $eltjs."\n";
856 856
                 }
857 857
             }
858 858
         }
Please login to merge, or discard this patch.
class/member.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -237,7 +237,7 @@
 block discarded – undo
237 237
      * Creates a random number with a specified number of $digits
238 238
      *
239 239
      * @param  int $digits number of digits
240
-     * @return return int random number
240
+     * @return string int random number
241 241
      * @author xHelp Team
242 242
      *
243 243
      * @access public
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
 // ------------------------------------------------------------------------- //
31 31
 
32 32
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
33
-require_once XOOPS_ROOT_PATH . '/kernel/user.php';
34
-require_once XOOPS_ROOT_PATH . '/kernel/group.php';
35
-require_once XOOPS_ROOT_PATH . '/kernel/member.php';
33
+require_once XOOPS_ROOT_PATH.'/kernel/user.php';
34
+require_once XOOPS_ROOT_PATH.'/kernel/group.php';
35
+require_once XOOPS_ROOT_PATH.'/kernel/member.php';
36 36
 
37 37
 /**
38 38
  * XOOPS member handler class.
@@ -151,14 +151,14 @@  discard block
 block discarded – undo
151 151
 
152 152
         if ($notifyUser) {
153 153
             // send some notifications
154
-            $xoopsMailer =& getMailer();
154
+            $xoopsMailer = & getMailer();
155 155
             $xoopsMailer->useMail();
156
-            $xoopsMailer->setTemplateDir(SMARTOBJECT_ROOT_PATH . 'language/' . $xoopsConfig['language'] . '/mail_template');
156
+            $xoopsMailer->setTemplateDir(SMARTOBJECT_ROOT_PATH.'language/'.$xoopsConfig['language'].'/mail_template');
157 157
             $xoopsMailer->setTemplate('smartobject_notify_user_added_by_admin.tpl');
158 158
             $xoopsMailer->assign('XOOPS_USER_PASSWORD', $password);
159 159
             $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
160 160
             $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
161
-            $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
161
+            $xoopsMailer->assign('SITEURL', XOOPS_URL.'/');
162 162
             $xoopsMailer->assign('NAME', $userObj->getVar('name'));
163 163
             $xoopsMailer->assign('UNAME', $userObj->getVar('uname'));
164 164
             $xoopsMailer->setToUsers($userObj);
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         if (strlen($name) > 0) {
205 205
             $name = explode(' ', trim($name));
206 206
             if (count($name) > 1) {
207
-                $basename = strtolower(substr($name[0], 0, 1) . $name[count($name) - 1]);
207
+                $basename = strtolower(substr($name[0], 0, 1).$name[count($name) - 1]);
208 208
             } else {
209 209
                 $basename = strtolower($name[0]);
210 210
             }
@@ -221,9 +221,9 @@  discard block
 block discarded – undo
221 221
         while ($i < $count) {
222 222
             $num = $this->genRandNumber();
223 223
             if ($onbasename < 0 && $hasbasename) {
224
-                $names[] = xoops_substr($basename, 0, 58, '') . $num;
224
+                $names[] = xoops_substr($basename, 0, 58, '').$num;
225 225
             } else {
226
-                $names[] = xoops_substr($emailname, 0, 58, '') . $num;
226
+                $names[] = xoops_substr($emailname, 0, 58, '').$num;
227 227
             }
228 228
             $i          = count($names);
229 229
             $onbasename = ~$onbasename;
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
     {
266 266
         static $randCalled = false;
267 267
         if (!$randCalled) {
268
-            mt_srand((double)microtime() * 1000000);
268
+            mt_srand((double) microtime() * 1000000);
269 269
             $randCalled = true;
270 270
         }
271 271
     }
Please login to merge, or discard this patch.
class/smartdbupdater.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     }
142 142
 
143 143
     /**
144
-     * @param $field
144
+     * @param string $field
145 145
      * @return bool
146 146
      */
147 147
     public function fieldExists($field)
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
     /**
624 624
      * Use to update a table
625 625
      *
626
-     * @param object $table {@link SmartDbTable} that will be updated
626
+     * @param SmartDbTable $table {@link SmartDbTable} that will be updated
627 627
      *
628 628
      * @see SmartDbTable
629 629
      *
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
     /**
726 726
      * @param $module
727 727
      * @param $item
728
-     * @return bool
728
+     * @return false|null
729 729
      */
730 730
     public function upgradeObjectItem($module, $item)
731 731
     {
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@  discard block
 block discarded – undo
18 18
  */
19 19
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
20 20
 if (!defined('SMARTOBJECT_ROOT_PATH')) {
21
-    include_once(XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php');
21
+    include_once(XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php');
22 22
 }
23 23
 /**
24 24
  * Include the language constants for the SmartObjectDBUpdater
25 25
  */
26 26
 global $xoopsConfig;
27
-$common_file = SMARTOBJECT_ROOT_PATH . 'language/' . $xoopsConfig['language'] . '/smartdbupdater.php';
27
+$common_file = SMARTOBJECT_ROOT_PATH.'language/'.$xoopsConfig['language'].'/smartdbupdater.php';
28 28
 if (!file_exists($common_file)) {
29
-    $common_file = SMARTOBJECT_ROOT_PATH . 'language/english/smartdbupdater.php';
29
+    $common_file = SMARTOBJECT_ROOT_PATH.'language/english/smartdbupdater.php';
30 30
 }
31 31
 include($common_file);
32 32
 
@@ -123,17 +123,17 @@  discard block
 block discarded – undo
123 123
     public function getExistingFieldsArray()
124 124
     {
125 125
         global $xoopsDB;
126
-        $result = $xoopsDB->query('SHOW COLUMNS FROM ' . $this->name());
126
+        $result = $xoopsDB->query('SHOW COLUMNS FROM '.$this->name());
127 127
         while ($existing_field = $xoopsDB->fetchArray($result)) {
128 128
             $fields[$existing_field['Field']] = $existing_field['Type'];
129 129
             if ($existing_field['Null'] !== 'YES') {
130 130
                 $fields[$existing_field['Field']] .= ' NOT NULL';
131 131
             }
132 132
             if ($existing_field['Extra']) {
133
-                $fields[$existing_field['Field']] .= ' ' . $existing_field['Extra'];
133
+                $fields[$existing_field['Field']] .= ' '.$existing_field['Extra'];
134 134
             }
135 135
             if (!($existing_field['Default'] === null) && ($existing_field['Default'] || $existing_field['Default'] === '' || $existing_field['Default'] == 0)) {
136
-                $fields[$existing_field['Field']] .= " default '" . $existing_field['Default'] . "'";
136
+                $fields[$existing_field['Field']] .= " default '".$existing_field['Default']."'";
137 137
             }
138 138
         }
139 139
 
@@ -219,9 +219,9 @@  discard block
 block discarded – undo
219 219
             $query = sprintf('INSERT INTO %s VALUES (%s)', $this->name(), $data);
220 220
             $ret   = $xoopsDB->query($query);
221 221
             if (!$ret) {
222
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_ADD_DATA_ERR, $this->name()) . '<br>';
222
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_ADD_DATA_ERR, $this->name()).'<br>';
223 223
             } else {
224
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_ADD_DATA, $this->name()) . '<br>';
224
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_ADD_DATA, $this->name()).'<br>';
225 225
             }
226 226
         }
227 227
 
@@ -373,13 +373,13 @@  discard block
 block discarded – undo
373 373
     {
374 374
         global $xoopsDB;
375 375
         $query = $this->getStructure();
376
-        $query = 'CREATE TABLE `' . $this->name() . '` (' . $query . ") ENGINE=MyISAM COMMENT='The SmartFactory <www.smartfactory.ca>'";
376
+        $query = 'CREATE TABLE `'.$this->name().'` ('.$query.") ENGINE=MyISAM COMMENT='The SmartFactory <www.smartfactory.ca>'";
377 377
         //xoops_debug($query);
378 378
         $ret = $xoopsDB->query($query);
379 379
         if (!$ret) {
380
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_CREATE_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
380
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_CREATE_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>';
381 381
         } else {
382
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_CREATE_TABLE, $this->name()) . '<br>';
382
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_CREATE_TABLE, $this->name()).'<br>';
383 383
         }
384 384
 
385 385
         return $ret;
@@ -397,11 +397,11 @@  discard block
 block discarded – undo
397 397
         $query = sprintf('DROP TABLE %s', $this->name());
398 398
         $ret   = $xoopsDB->query($query);
399 399
         if (!$ret) {
400
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_DROP_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
400
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_DROP_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>';
401 401
 
402 402
             return false;
403 403
         } else {
404
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_DROP_TABLE, $this->name()) . '<br>';
404
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_DROP_TABLE, $this->name()).'<br>';
405 405
 
406 406
             return true;
407 407
         }
@@ -427,9 +427,9 @@  discard block
 block discarded – undo
427 427
             $ret   = $ret && $xoopsDB->query($query);
428 428
             if ($alteredField['showerror']) {
429 429
                 if (!$ret) {
430
-                    echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_CHGFIELD_ERR, $alteredField['name'], $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
430
+                    echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_CHGFIELD_ERR, $alteredField['name'], $this->name()).' ('.$xoopsDB->error().')<br>';
431 431
                 } else {
432
-                    echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_CHGFIELD, $alteredField['name'], $this->name()) . '<br>';
432
+                    echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_CHGFIELD, $alteredField['name'], $this->name()).'<br>';
433 433
                 }
434 434
             }
435 435
         }
@@ -452,9 +452,9 @@  discard block
 block discarded – undo
452 452
             //echo $query;
453 453
             $ret = $ret && $xoopsDB->query($query);
454 454
             if (!$ret) {
455
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_NEWFIELD_ERR, $newField['name'], $this->name()) . '<br>';
455
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_NEWFIELD_ERR, $newField['name'], $this->name()).'<br>';
456 456
             } else {
457
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_NEWFIELD, $newField['name'], $this->name()) . '<br>';
457
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_NEWFIELD, $newField['name'], $this->name()).'<br>';
458 458
             }
459 459
         }
460 460
 
@@ -475,9 +475,9 @@  discard block
 block discarded – undo
475 475
             $query = sprintf('UPDATE %s SET %s = %s', $this->name(), $updatedField['name'], $updatedField['value']);
476 476
             $ret   = $ret && $xoopsDB->query($query);
477 477
             if (!$ret) {
478
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
478
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>';
479 479
             } else {
480
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . '<br>';
480
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()).'<br>';
481 481
             }
482 482
         }
483 483
 
@@ -498,9 +498,9 @@  discard block
 block discarded – undo
498 498
             //echo $query."<br>";
499 499
             $ret = $ret && $xoopsDB->query($query);
500 500
             if (!$ret) {
501
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
501
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>';
502 502
             } else {
503
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . '<br>';
503
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()).'<br>';
504 504
             }
505 505
         }
506 506
 
@@ -521,9 +521,9 @@  discard block
 block discarded – undo
521 521
             $query = sprintf('ALTER TABLE %s DROP %s', $this->name(), $droppedField);
522 522
             $ret   = $ret && $xoopsDB->query($query);
523 523
             if (!$ret) {
524
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_DROPFIELD_ERR, $droppedField, $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
524
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_DROPFIELD_ERR, $droppedField, $this->name()).' ('.$xoopsDB->error().')<br>';
525 525
             } else {
526
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_DROPFIELD, $droppedField, $this->name()) . '<br>';
526
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_DROPFIELD, $droppedField, $this->name()).'<br>';
527 527
             }
528 528
         }
529 529
 
@@ -610,11 +610,11 @@  discard block
 block discarded – undo
610 610
         $query = sprintf('ALTER TABLE %s RENAME %s', $from, $to);
611 611
         $ret   = $xoopsDB->query($query);
612 612
         if (!$ret) {
613
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_RENAME_TABLE_ERR, $from) . '<br>';
613
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_RENAME_TABLE_ERR, $from).'<br>';
614 614
 
615 615
             return false;
616 616
         } else {
617
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_RENAME_TABLE, $from, $to) . '<br>';
617
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_RENAME_TABLE, $from, $to).'<br>';
618 618
 
619 619
             return true;
620 620
         }
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
             return false;
735 735
         }
736 736
 
737
-        $table      = new SmartDbTable($module . '_' . $item);
737
+        $table      = new SmartDbTable($module.'_'.$item);
738 738
         $object     = $moduleHandler->create();
739 739
         $objectVars = $object->getVars();
740 740
 
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
 ";
756 756
                 }
757 757
             }
758
-            $structure .= 'PRIMARY KEY  (`' . $moduleHandler->keyName . '`)
758
+            $structure .= 'PRIMARY KEY  (`'.$moduleHandler->keyName.'`)
759 759
 ';
760 760
             $table->setStructure($structure);
761 761
             if (!$this->updateTable($table)) {
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
 
816 816
         ob_start();
817 817
 
818
-        $table = new SmartDbTable($dirname . '_meta');
818
+        $table = new SmartDbTable($dirname.'_meta');
819 819
         if (!$table->exists()) {
820 820
             $table->setStructure("
821 821
               `metakey` varchar(50) NOT NULL default '',
@@ -833,20 +833,20 @@  discard block
 block discarded – undo
833 833
         if (!$dbVersion) {
834 834
             $dbVersion = 0;
835 835
         }
836
-        $newDbVersion = constant(strtoupper($dirname . '_db_version')) ?: 0;
837
-        echo 'Database version: ' . $dbVersion . '<br>';
838
-        echo 'New database version: ' . $newDbVersion . '<br>';
836
+        $newDbVersion = constant(strtoupper($dirname.'_db_version')) ?: 0;
837
+        echo 'Database version: '.$dbVersion.'<br>';
838
+        echo 'New database version: '.$newDbVersion.'<br>';
839 839
 
840 840
         if ($newDbVersion > $dbVersion) {
841 841
             for ($i = $dbVersion + 1; $i <= $newDbVersion; ++$i) {
842
-                $upgrade_function = $dirname . '_db_upgrade_' . $i;
842
+                $upgrade_function = $dirname.'_db_upgrade_'.$i;
843 843
                 if (function_exists($upgrade_function)) {
844 844
                     $upgrade_function();
845 845
                 }
846 846
             }
847 847
         }
848 848
 
849
-        echo '<code>' . _SDU_UPDATE_UPDATING_DATABASE . '<br>';
849
+        echo '<code>'._SDU_UPDATE_UPDATING_DATABASE.'<br>';
850 850
 
851 851
         // if there is a function to execute for this DB version, let's do it
852 852
         //$function_
Please login to merge, or discard this patch.
class/smartexport.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
     /**
198 198
      * @param $val
199 199
      * @param $separator
200
-     * @param $trimFunction
200
+     * @param false|string $trimFunction
201 201
      * @return mixed|string
202 202
      */
203 203
     public function valToCsvHelper($val, $separator, $trimFunction)
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     }
249 249
 
250 250
     /**
251
-     * @param $content
251
+     * @param string $content
252 252
      */
253 253
     public function saveExportFile($content)
254 254
     {
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     public function valToCsvHelper($val, $separator, $trimFunction)
204 204
     {
205 205
         if ($trimFunction) {
206
-            $val = $trimFunction ($val);
206
+            $val = $trimFunction($val);
207 207
         }
208 208
         //If there is a separator (;) or a quote (") or a linebreak in the string, we need to quote it.
209 209
         $needQuote = false;
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
             }
224 224
         } while (false);
225 225
         if ($needQuote) {
226
-            $val = '"' . $val . '"';
226
+            $val = '"'.$val.'"';
227 227
         }
228 228
 
229 229
         return $val;
@@ -237,10 +237,10 @@  discard block
 block discarded – undo
237 237
             case 'csv':
238 238
                 $separator = isset($this->options['separator']) ? $this->options['separator'] : ';';
239 239
                 $firstRow  = implode($separator, $this->data['columnsHeaders']);
240
-                $exportFileData .= $firstRow . "\r\n";
240
+                $exportFileData .= $firstRow."\r\n";
241 241
 
242 242
                 foreach ($this->data['rows'] as $cols) {
243
-                    $exportFileData .= $this->arrayToCsvString($cols, $separator) . "\r\n";
243
+                    $exportFileData .= $this->arrayToCsvString($cols, $separator)."\r\n";
244 244
                 }
245 245
                 break;
246 246
         }
@@ -265,19 +265,19 @@  discard block
 block discarded – undo
265 265
     public function saveCsv($content)
266 266
     {
267 267
         if (!$this->filepath) {
268
-            $this->filepath = XOOPS_UPLOAD_PATH . '/';
268
+            $this->filepath = XOOPS_UPLOAD_PATH.'/';
269 269
         }
270 270
         if (!$this->filename) {
271 271
             $this->filename .= time();
272 272
             $this->filename .= '.csv';
273 273
         }
274 274
 
275
-        $fullFileName = $this->filepath . $this->filename;
275
+        $fullFileName = $this->filepath.$this->filename;
276 276
 
277 277
         if (!$handle = fopen($fullFileName, 'a+')) {
278
-            trigger_error('Unable to open ' . $fullFileName, E_USER_WARNING);
278
+            trigger_error('Unable to open '.$fullFileName, E_USER_WARNING);
279 279
         } elseif (fwrite($handle, $content) === false) {
280
-            trigger_error('Unable to write in ' . $fullFileName, E_USER_WARNING);
280
+            trigger_error('Unable to write in '.$fullFileName, E_USER_WARNING);
281 281
         } else {
282 282
             $mimeType  = 'text/csv';
283 283
             $file      = strrev($this->filename);
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
             } else {
288 288
                 $file_name = $temp_name;
289 289
             }
290
-            $fullFileName = $this->filepath . stripslashes(trim($this->filename));
290
+            $fullFileName = $this->filepath.stripslashes(trim($this->filename));
291 291
 
292 292
             if (ini_get('zlib.output_compression')) {
293 293
                 ini_set('zlib.output_compression', 'Off');
@@ -298,10 +298,10 @@  discard block
 block discarded – undo
298 298
             header('Cache-Control: private', false);
299 299
             header('Content-Transfer-Encoding: binary');
300 300
             if (isset($mimeType)) {
301
-                header('Content-Type: ' . $mimeType);
301
+                header('Content-Type: '.$mimeType);
302 302
             }
303 303
 
304
-            header('Content-Disposition: attachment; filename=' . $file_name);
304
+            header('Content-Disposition: attachment; filename='.$file_name);
305 305
 
306 306
             if (isset($mimeType) && false !== strpos($mimeType, 'text/')) {
307 307
                 $fp = fopen($fullFileName, 'r');
Please login to merge, or discard this patch.
class/smartmetagen.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     }
166 166
 
167 167
     /**
168
-     * @param $keywords
168
+     * @param string|boolean $keywords
169 169
      */
170 170
     public function setKeywords($keywords)
171 171
     {
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     }
174 174
 
175 175
     /**
176
-     * @param $categoryPath
176
+     * @param boolean $categoryPath
177 177
      */
178 178
     public function setCategoryPath($categoryPath)
179 179
     {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     }
183 183
 
184 184
     /**
185
-     * @param $description
185
+     * @param boolean $description
186 186
      */
187 187
     public function setDescription($description)
188 188
     {
@@ -242,8 +242,8 @@  discard block
 block discarded – undo
242 242
     }
243 243
 
244 244
     /**
245
-     * @param $text
246
-     * @param $minChar
245
+     * @param string $text
246
+     * @param integer $minChar
247 247
      * @return array
248 248
      */
249 249
     public function findMetaKeywords($text, $minChar)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -325,7 +325,7 @@
 block discarded – undo
325 325
     public function createMetaKeywords()
326 326
     {
327 327
         global $xoopsModuleConfig;
328
-        $keywords = $this->findMetaKeywords($this->_original_title . ' ' . $this->_description, $this->_minChar);
328
+        $keywords = $this->findMetaKeywords($this->_original_title.' '.$this->_description, $this->_minChar);
329 329
         if (isset($xoopsModuleConfig) && isset($xoopsModuleConfig['moduleMetaKeywords']) && $xoopsModuleConfig['moduleMetaKeywords'] !== '') {
330 330
             $moduleKeywords = explode(',', $xoopsModuleConfig['moduleMetaKeywords']);
331 331
             $keywords       = array_merge($keywords, $moduleKeywords);
Please login to merge, or discard this patch.
class/smartobjectlink.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      * @access public
62 62
      * @param  string $key    key of the object's variable to be returned
63 63
      * @param  string $format format to use for the output
64
-     * @return mixed  formatted value of the variable
64
+     * @return integer  formatted value of the variable
65 65
      */
66 66
     public function getVar($key, $format = 's')
67 67
     {
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 // -------------------------------------------------------------------------//
29 29
 
30 30
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
31
-include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php';
31
+include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobject.php';
32 32
 
33 33
 /**
34 34
  * Class SmartobjectLink
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
             return $ret;
119 119
         } else {
120
-            $ret = '<a href="' . $ret . '" alt="' . $this->getVar('link', 'e') . '" title="' . $this->getVar('link', 'e') . '">' . _AM_SOBJECT_SENT_LINKS_GOTO . '</a>';
120
+            $ret = '<a href="'.$ret.'" alt="'.$this->getVar('link', 'e').'" title="'.$this->getVar('link', 'e').'">'._AM_SOBJECT_SENT_LINKS_GOTO.'</a>';
121 121
 
122 122
             return $ret;
123 123
         }
@@ -128,16 +128,16 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public function getViewItemLink()
130 130
     {
131
-        $ret = '<a href="' .
132
-               SMARTOBJECT_URL .
133
-               'admin/link.php?op=view&linkid=' .
134
-               $this->getVar('linkid') .
135
-               '"><img src="' .
136
-               SMARTOBJECT_IMAGES_ACTIONS_URL .
137
-               'mail_find.png" alt="' .
138
-               _AM_SOBJECT_SENT_LINK_VIEW .
139
-               '" title="' .
140
-               _AM_SOBJECT_SENT_LINK_VIEW .
131
+        $ret = '<a href="'.
132
+               SMARTOBJECT_URL.
133
+               'admin/link.php?op=view&linkid='.
134
+               $this->getVar('linkid').
135
+               '"><img src="'.
136
+               SMARTOBJECT_IMAGES_ACTIONS_URL.
137
+               'mail_find.png" alt="'.
138
+               _AM_SOBJECT_SENT_LINK_VIEW.
139
+               '" title="'.
140
+               _AM_SOBJECT_SENT_LINK_VIEW.
141 141
                '" /></a>';
142 142
 
143 143
         return $ret;
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
         if ($this->getVar('from_uid')) {
154 154
             $user = smart_getLinkedUnameFromId($this->getVar('from_uid'));
155 155
             if ($user == $GLOBALS['xoopsConfig']['anonymous']) {
156
-                $user = '<a href="mailto:' . $this->getVar('from_email') . '">' . $this->getVar('from_email') . '</a>';
156
+                $user = '<a href="mailto:'.$this->getVar('from_email').'">'.$this->getVar('from_email').'</a>';
157 157
             }
158 158
         } else {
159
-            $user = '<a href="mailto:' . $this->getVar('from_email') . '">' . $this->getVar('from_email') . '</a>';
159
+            $user = '<a href="mailto:'.$this->getVar('from_email').'">'.$this->getVar('from_email').'</a>';
160 160
         }
161 161
 
162 162
         return $user;
@@ -185,10 +185,10 @@  discard block
 block discarded – undo
185 185
         if ($this->getVar('to_uid')) {
186 186
             $user = smart_getLinkedUnameFromId($this->getVar('to_uid'));
187 187
             if ($user == $GLOBALS['xoopsConfig']['anonymous']) {
188
-                $user = '<a href="mailto:' . $this->getVar('to_email') . '">' . $this->getVar('to_email') . '</a>';
188
+                $user = '<a href="mailto:'.$this->getVar('to_email').'">'.$this->getVar('to_email').'</a>';
189 189
             }
190 190
         } else {
191
-            $user = '<a href="mailto:' . $this->getVar('to_email') . '">' . $this->getVar('to_email') . '</a>';
191
+            $user = '<a href="mailto:'.$this->getVar('to_email').'">'.$this->getVar('to_email').'</a>';
192 192
         }
193 193
 
194 194
         return $user;
Please login to merge, or discard this patch.