@@ -104,7 +104,7 @@ |
||
104 | 104 | */ |
105 | 105 | public function optional($value) |
106 | 106 | { |
107 | - $this->specOptional = (bool) $value; |
|
107 | + $this->specOptional = (bool)$value; |
|
108 | 108 | return $this; |
109 | 109 | } |
110 | 110 |
@@ -115,7 +115,7 @@ |
||
115 | 115 | $foundColon = strpos($name, ':'); |
116 | 116 | if ($foundColon !== false) { |
117 | 117 | $scheme = substr($name, 0, $foundColon); |
118 | - $baseName = substr($name, $foundColon+1); |
|
118 | + $baseName = substr($name, $foundColon + 1); |
|
119 | 119 | $handler = $this->newSpec()->scheme($scheme)->name($baseName)->optional($optional)->build(); |
120 | 120 | return $handler; |
121 | 121 | } |
@@ -55,14 +55,14 @@ |
||
55 | 55 | } |
56 | 56 | if (!$ele->isHidden()) { |
57 | 57 | $ret .= '<div class="form-group">'; |
58 | - $ret .= '<label>' . $ele->getCaption(); |
|
59 | - $ret .= ($ele->isRequired() ? '<span class="caption-required">*</span>' : '') . '</label>'; |
|
58 | + $ret .= '<label>'.$ele->getCaption(); |
|
59 | + $ret .= ($ele->isRequired() ? '<span class="caption-required">*</span>' : '').'</label>'; |
|
60 | 60 | $ret .= $ele->render(); |
61 | - $ret .= '<small class="text-muted">' . $ele->getDescription() . '</small>'; |
|
62 | - $ret .= '<p class="dsc_pattern_vertical">' . $ele->getPatternDescription() . '</p>'; |
|
63 | - $ret .= '</div>' . "\n"; |
|
61 | + $ret .= '<small class="text-muted">'.$ele->getDescription().'</small>'; |
|
62 | + $ret .= '<p class="dsc_pattern_vertical">'.$ele->getPatternDescription().'</p>'; |
|
63 | + $ret .= '</div>'."\n"; |
|
64 | 64 | } else { |
65 | - $ret .= $ele->render(). "\n"; |
|
65 | + $ret .= $ele->render()."\n"; |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | return $ret; |
@@ -50,8 +50,8 @@ |
||
50 | 50 | { |
51 | 51 | $attributes = $this->renderAttributeString(); |
52 | 52 | |
53 | - return '<input ' . $attributes . ' ' . $this->getExtra() . ' />' |
|
53 | + return '<input '.$attributes.' '.$this->getExtra().' />' |
|
54 | 54 | . '<input type="hidden" name="xoops_upload_file[]" id="xoops_upload_file[]" value="' |
55 | - . $this->getName() . '">'; |
|
55 | + . $this->getName().'">'; |
|
56 | 56 | } |
57 | 57 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | { |
54 | 54 | $this->suppressRender(['name', 'value']); |
55 | 55 | $attributes = $this->renderAttributeString(); |
56 | - $ret = '<div ' . $attributes . '>' . $this->getValue() . '</div>'; |
|
56 | + $ret = '<div '.$attributes.'>'.$this->getValue().'</div>'; |
|
57 | 57 | return $ret; |
58 | 58 | } |
59 | 59 | } |
@@ -35,14 +35,14 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function insertBreak($extra = '', $class = '') |
37 | 37 | { |
38 | - $class = ($class != '' ? " class=\"" . $class . "\"" : " class=\"break\""); |
|
38 | + $class = ($class != '' ? " class=\"".$class."\"" : " class=\"break\""); |
|
39 | 39 | // Fix for $extra tag not showing |
40 | 40 | if ($extra) { |
41 | - $value = '<div' . $class . '>' . $extra . '</div>'; |
|
41 | + $value = '<div'.$class.'>'.$extra.'</div>'; |
|
42 | 42 | $ele = new Raw($value); |
43 | 43 | $this->addElement($ele); |
44 | 44 | } else { |
45 | - $value = '<div' . $class . '> </div>'; |
|
45 | + $value = '<div'.$class.'> </div>'; |
|
46 | 46 | $ele = new Raw($value); |
47 | 47 | $this->addElement($ele); |
48 | 48 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $xoops->tpl()->appendByRef('xo_input', $input); |
96 | 96 | unset($input); |
97 | 97 | } else { |
98 | - $hidden .= $ele->render(). "\n"; |
|
98 | + $hidden .= $ele->render()."\n"; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | } |
@@ -47,14 +47,14 @@ discard block |
||
47 | 47 | } else { |
48 | 48 | parent::__construct($caption, '', $name); |
49 | 49 | $this->set('value', $value); |
50 | - $this->set(':showtime', (int) $showtime); |
|
50 | + $this->set(':showtime', (int)$showtime); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | $workingTime = \Xoops\Core\Locale\Time::cleanTime($this->get('value', 0)); |
54 | 54 | |
55 | 55 | $displayDate = true; |
56 | 56 | $displayTime = true; |
57 | - switch ((int) $this->get(':showtime', static::SHOW_BOTH)) { |
|
57 | + switch ((int)$this->get(':showtime', static::SHOW_BOTH)) { |
|
58 | 58 | case static::SHOW_DATE: |
59 | 59 | $displayTime = false; |
60 | 60 | break; |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | |
66 | 66 | $dateDefinition = [ |
67 | 67 | 'caption' => '', |
68 | - 'name' => $this->get('name') . '[date]', |
|
69 | - 'id' => $this->get('name') . '-date', |
|
68 | + 'name' => $this->get('name').'[date]', |
|
69 | + 'id' => $this->get('name').'-date', |
|
70 | 70 | 'size' => 15, |
71 | 71 | 'value' => $workingTime, |
72 | 72 | ElementFactory::FORM_KEY => $this, |
@@ -80,16 +80,16 @@ discard block |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | $minuteInterval = $this->get(':minuteinterval', 15); |
83 | - $hours = (int) ltrim($workingTime->format('H'), '0'); |
|
84 | - $minutes = (int) ltrim($workingTime->format('i'), '0'); |
|
83 | + $hours = (int)ltrim($workingTime->format('H'), '0'); |
|
84 | + $minutes = (int)ltrim($workingTime->format('i'), '0'); |
|
85 | 85 | |
86 | 86 | $timeDefinition = [ |
87 | 87 | 'caption' => '', |
88 | - 'name' => $this->get('name') . '[time]', |
|
89 | - 'id' => $this->get('name') . '-time', |
|
88 | + 'name' => $this->get('name').'[time]', |
|
89 | + 'id' => $this->get('name').'-time', |
|
90 | 90 | 'size' => 1, |
91 | 91 | 'value' => \Xoops\Core\Locale\Time::formatTime( |
92 | - $hours * 3600 + 60*$minuteInterval * ceil($minutes / $minuteInterval), |
|
92 | + $hours * 3600 + 60 * $minuteInterval * ceil($minutes / $minuteInterval), |
|
93 | 93 | 'short', |
94 | 94 | new \DateTimeZone('UTC') |
95 | 95 | ), |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function __construct($title, $modid, $permname, $permdesc, $url = '', $anonymous = true) |
74 | 74 | { |
75 | - parent::__construct($title, 'groupperm_form', XOOPS_URL . '/modules/system/admin/groupperm.php', 'post'); |
|
75 | + parent::__construct($title, 'groupperm_form', XOOPS_URL.'/modules/system/admin/groupperm.php', 'post'); |
|
76 | 76 | $this->modid = (int)($modid); |
77 | 77 | $this->permName = $permname; |
78 | 78 | $this->permDesc = $permdesc; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | } |
144 | 144 | // get selected item id(s) for each group |
145 | 145 | $selected = $gperm_handler->getItemIds($this->permName, $i, $this->modid); |
146 | - $ele = new GroupFormCheckbox($glist[$i], 'perms[' . $this->permName . ']', $i, $selected); |
|
146 | + $ele = new GroupFormCheckbox($glist[$i], 'perms['.$this->permName.']', $i, $selected); |
|
147 | 147 | $ele->setOptionTree($this->itemTree); |
148 | 148 | $this->addElement($ele); |
149 | 149 | unset($ele); |
@@ -153,13 +153,13 @@ discard block |
||
153 | 153 | $tray->addElement(new Button('', 'reset', \XoopsLocale::A_CANCEL, 'reset')); |
154 | 154 | $this->addElement($tray); |
155 | 155 | |
156 | - $ret = '<h4>' . $this->getTitle() . '</h4>'; |
|
156 | + $ret = '<h4>'.$this->getTitle().'</h4>'; |
|
157 | 157 | if ($this->permDesc) { |
158 | - $ret .= $this->permDesc . '<br /><br />'; |
|
158 | + $ret .= $this->permDesc.'<br /><br />'; |
|
159 | 159 | } |
160 | - $ret .= '<form title="' . str_replace('"', '', $this->getTitle()) . '" name="' |
|
161 | - . $this->getName() . '" id="' . $this->getName() . '" action="' . $this->getAction() |
|
162 | - . '" method="' . $this->getMethod() . '"' . $this->getExtra() . '>' |
|
160 | + $ret .= '<form title="'.str_replace('"', '', $this->getTitle()).'" name="' |
|
161 | + . $this->getName().'" id="'.$this->getName().'" action="'.$this->getAction() |
|
162 | + . '" method="'.$this->getMethod().'"'.$this->getExtra().'>' |
|
163 | 163 | . '<table width="100%" class="outer" cellspacing="1" valign="top">'; |
164 | 164 | $elements = $this->getElements(); |
165 | 165 | $hidden = ''; |
@@ -167,17 +167,17 @@ discard block |
||
167 | 167 | if ($elements[$i] instanceof Raw) { |
168 | 168 | $ret .= $elements[$i]->render(); |
169 | 169 | } elseif (!$elements[$i]->isHidden()) { |
170 | - $ret .= '<tr valign="top" align="left"><td class="head">' . $elements[$i]->getCaption(); |
|
170 | + $ret .= '<tr valign="top" align="left"><td class="head">'.$elements[$i]->getCaption(); |
|
171 | 171 | if ($elements[$i]->getDescription() != "") { |
172 | 172 | $ret .= "<br /><br /><span style='font-weight: normal;'>" |
173 | - . $elements[$i]->getDescription() . "</span>"; |
|
173 | + . $elements[$i]->getDescription()."</span>"; |
|
174 | 174 | } |
175 | - $ret .= '</td>' . '<td class="even">' . $elements[$i]->render() . '</td></tr>' . ''; |
|
175 | + $ret .= '</td>'.'<td class="even">'.$elements[$i]->render().'</td></tr>'.''; |
|
176 | 176 | } else { |
177 | 177 | $hidden .= $elements[$i]->render(); |
178 | 178 | } |
179 | 179 | } |
180 | - $ret .= '</table>' . $hidden . '</form>'; |
|
180 | + $ret .= '</table>'.$hidden.'</form>'; |
|
181 | 181 | $ret .= $this->renderValidationJS(true); |
182 | 182 | return $ret; |
183 | 183 | } |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | */ |
369 | 369 | public function getExtra() |
370 | 370 | { |
371 | - $extra = empty($this->extra) ? '' : ' ' . implode(' ', $this->extra); |
|
371 | + $extra = empty($this->extra) ? '' : ' '.implode(' ', $this->extra); |
|
372 | 372 | return $extra; |
373 | 373 | } |
374 | 374 | |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | $elements = array(); |
480 | 480 | if (count($this->getRequired()) > 0) { |
481 | 481 | $this->elements[] = |
482 | - new Raw("<tr class='foot'><td colspan='2'>* = " . \XoopsLocale::REQUIRED . "</td></tr>"); |
|
482 | + new Raw("<tr class='foot'><td colspan='2'>* = ".\XoopsLocale::REQUIRED."</td></tr>"); |
|
483 | 483 | } |
484 | 484 | foreach ($this->getElements() as $ele) { |
485 | 485 | ++$i; |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | $tpl->assign($this->getName(), array( |
501 | 501 | 'title' => $this->getTitle(), 'name' => $this->getName(), 'action' => $this->getAction(), |
502 | 502 | 'method' => $this->getMethod(), |
503 | - 'extra' => 'onsubmit="return xoopsFormValidate_' . $this->getName() . '();"' . $this->getExtra(), |
|
503 | + 'extra' => 'onsubmit="return xoopsFormValidate_'.$this->getName().'();"'.$this->getExtra(), |
|
504 | 504 | 'javascript' => $js, 'elements' => $elements |
505 | 505 | )); |
506 | 506 | } |