@@ -61,11 +61,11 @@ discard block |
||
61 | 61 | { |
62 | 62 | // Fix for bug #10799: add 'D' modifier to regex |
63 | 63 | if (isset($this->_data[$this->name])) { |
64 | - if (!preg_match($this->_data[$this->name] . 'D', $value)) { |
|
64 | + if (!preg_match($this->_data[$this->name].'D', $value)) { |
|
65 | 65 | return false; |
66 | 66 | } |
67 | 67 | } else { |
68 | - if (!preg_match($regex . 'D', $value)) { |
|
68 | + if (!preg_match($regex.'D', $value)) { |
|
69 | 69 | return false; |
70 | 70 | } |
71 | 71 | } |
@@ -91,11 +91,11 @@ discard block |
||
91 | 91 | |
92 | 92 | // bug #12376, converting unicode escapes and stripping 'u' modifier |
93 | 93 | if ($pos = strpos($regex, 'u', strrpos($regex, '/'))) { |
94 | - $regex = substr($regex, 0, $pos) . substr($regex, $pos + 1); |
|
94 | + $regex = substr($regex, 0, $pos).substr($regex, $pos + 1); |
|
95 | 95 | $regex = preg_replace('/(?<!\\\\)(?>\\\\\\\\)*\\\\x{([a-fA-F0-9]+)}/', '\\u$1', $regex); |
96 | 96 | } |
97 | 97 | |
98 | - return array(" var regex = " . $regex . ";\n", "{jsVar} != '' && !regex.test({jsVar})"); |
|
98 | + return array(" var regex = ".$regex.";\n", "{jsVar} != '' && !regex.test({jsVar})"); |
|
99 | 99 | } // end func getValidationScript |
100 | 100 | |
101 | 101 | } // end class HTML_QuickForm_Rule_Regex |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | // 25 is length of "ole-chainedblockstream://" |
84 | 84 | parse_str(substr($path, 25), $this->params); |
85 | 85 | if (!isset($this->params['oleInstanceId'], |
86 | - $this->params['blockId'], |
|
87 | - $GLOBALS['_OLE_INSTANCES'][$this->params['oleInstanceId']])) { |
|
86 | + $this->params['blockId'], |
|
87 | + $GLOBALS['_OLE_INSTANCES'][$this->params['oleInstanceId']])) { |
|
88 | 88 | |
89 | 89 | if ($options & STREAM_REPORT_ERRORS) { |
90 | 90 | trigger_error('OLE stream not found', E_USER_WARNING); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | if (version_compare(PHP_VERSION, '5.0', '>=') && |
164 | 164 | version_compare(PHP_VERSION, '5.1', '<')) { |
165 | 165 | |
166 | - $eof = !$eof; |
|
166 | + $eof = !$eof; |
|
167 | 167 | } |
168 | 168 | return $eof; |
169 | 169 | } |
@@ -33,98 +33,98 @@ discard block |
||
33 | 33 | class OLE_PPS extends PEAR |
34 | 34 | { |
35 | 35 | /** |
36 | - * The PPS index |
|
37 | - * @var integer |
|
38 | - */ |
|
36 | + * The PPS index |
|
37 | + * @var integer |
|
38 | + */ |
|
39 | 39 | var $No; |
40 | 40 | |
41 | 41 | /** |
42 | - * The PPS name (in Unicode) |
|
43 | - * @var string |
|
44 | - */ |
|
42 | + * The PPS name (in Unicode) |
|
43 | + * @var string |
|
44 | + */ |
|
45 | 45 | var $Name; |
46 | 46 | |
47 | 47 | /** |
48 | - * The PPS type. Dir, Root or File |
|
49 | - * @var integer |
|
50 | - */ |
|
48 | + * The PPS type. Dir, Root or File |
|
49 | + * @var integer |
|
50 | + */ |
|
51 | 51 | var $Type; |
52 | 52 | |
53 | 53 | /** |
54 | - * The index of the previous PPS |
|
55 | - * @var integer |
|
56 | - */ |
|
54 | + * The index of the previous PPS |
|
55 | + * @var integer |
|
56 | + */ |
|
57 | 57 | var $PrevPps; |
58 | 58 | |
59 | 59 | /** |
60 | - * The index of the next PPS |
|
61 | - * @var integer |
|
62 | - */ |
|
60 | + * The index of the next PPS |
|
61 | + * @var integer |
|
62 | + */ |
|
63 | 63 | var $NextPps; |
64 | 64 | |
65 | 65 | /** |
66 | - * The index of it's first child if this is a Dir or Root PPS |
|
67 | - * @var integer |
|
68 | - */ |
|
66 | + * The index of it's first child if this is a Dir or Root PPS |
|
67 | + * @var integer |
|
68 | + */ |
|
69 | 69 | var $DirPps; |
70 | 70 | |
71 | 71 | /** |
72 | - * A timestamp |
|
73 | - * @var integer |
|
74 | - */ |
|
72 | + * A timestamp |
|
73 | + * @var integer |
|
74 | + */ |
|
75 | 75 | var $Time1st; |
76 | 76 | |
77 | 77 | /** |
78 | - * A timestamp |
|
79 | - * @var integer |
|
80 | - */ |
|
78 | + * A timestamp |
|
79 | + * @var integer |
|
80 | + */ |
|
81 | 81 | var $Time2nd; |
82 | 82 | |
83 | 83 | /** |
84 | - * Starting block (small or big) for this PPS's data inside the container |
|
85 | - * @var integer |
|
86 | - */ |
|
84 | + * Starting block (small or big) for this PPS's data inside the container |
|
85 | + * @var integer |
|
86 | + */ |
|
87 | 87 | var $_StartBlock; |
88 | 88 | |
89 | 89 | /** |
90 | - * The size of the PPS's data (in bytes) |
|
91 | - * @var integer |
|
92 | - */ |
|
90 | + * The size of the PPS's data (in bytes) |
|
91 | + * @var integer |
|
92 | + */ |
|
93 | 93 | var $Size; |
94 | 94 | |
95 | 95 | /** |
96 | - * The PPS's data (only used if it's not using a temporary file) |
|
97 | - * @var string |
|
98 | - */ |
|
96 | + * The PPS's data (only used if it's not using a temporary file) |
|
97 | + * @var string |
|
98 | + */ |
|
99 | 99 | var $_data; |
100 | 100 | |
101 | 101 | /** |
102 | - * Array of child PPS's (only used by Root and Dir PPS's) |
|
103 | - * @var array |
|
104 | - */ |
|
102 | + * Array of child PPS's (only used by Root and Dir PPS's) |
|
103 | + * @var array |
|
104 | + */ |
|
105 | 105 | var $children = array(); |
106 | 106 | |
107 | 107 | /** |
108 | - * Pointer to OLE container |
|
109 | - * @var OLE |
|
110 | - */ |
|
108 | + * Pointer to OLE container |
|
109 | + * @var OLE |
|
110 | + */ |
|
111 | 111 | var $ole; |
112 | 112 | |
113 | 113 | /** |
114 | - * The constructor |
|
115 | - * |
|
116 | - * @access public |
|
117 | - * @param integer $No The PPS index |
|
118 | - * @param string $name The PPS name |
|
119 | - * @param integer $type The PPS type. Dir, Root or File |
|
120 | - * @param integer $prev The index of the previous PPS |
|
121 | - * @param integer $next The index of the next PPS |
|
122 | - * @param integer $dir The index of it's first child if this is a Dir or Root PPS |
|
123 | - * @param integer $time_1st A timestamp |
|
124 | - * @param integer $time_2nd A timestamp |
|
125 | - * @param string $data The (usually binary) source data of the PPS |
|
126 | - * @param array $children Array containing children PPS for this PPS |
|
127 | - */ |
|
114 | + * The constructor |
|
115 | + * |
|
116 | + * @access public |
|
117 | + * @param integer $No The PPS index |
|
118 | + * @param string $name The PPS name |
|
119 | + * @param integer $type The PPS type. Dir, Root or File |
|
120 | + * @param integer $prev The index of the previous PPS |
|
121 | + * @param integer $next The index of the next PPS |
|
122 | + * @param integer $dir The index of it's first child if this is a Dir or Root PPS |
|
123 | + * @param integer $time_1st A timestamp |
|
124 | + * @param integer $time_2nd A timestamp |
|
125 | + * @param string $data The (usually binary) source data of the PPS |
|
126 | + * @param array $children Array containing children PPS for this PPS |
|
127 | + */ |
|
128 | 128 | function OLE_PPS($No, $name, $type, $prev, $next, $dir, $time_1st, $time_2nd, $data, $children) |
129 | 129 | { |
130 | 130 | $this->No = $No; |
@@ -145,11 +145,11 @@ discard block |
||
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
148 | - * Returns the amount of data saved for this PPS |
|
149 | - * |
|
150 | - * @access private |
|
151 | - * @return integer The amount of data (in bytes) |
|
152 | - */ |
|
148 | + * Returns the amount of data saved for this PPS |
|
149 | + * |
|
150 | + * @access private |
|
151 | + * @return integer The amount of data (in bytes) |
|
152 | + */ |
|
153 | 153 | function _DataLen() |
154 | 154 | { |
155 | 155 | if (!isset($this->_data)) { |
@@ -165,11 +165,11 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
168 | - * Returns a string with the PPS's WK (What is a WK?) |
|
169 | - * |
|
170 | - * @access private |
|
171 | - * @return string The binary string |
|
172 | - */ |
|
168 | + * Returns a string with the PPS's WK (What is a WK?) |
|
169 | + * |
|
170 | + * @access private |
|
171 | + * @return string The binary string |
|
172 | + */ |
|
173 | 173 | function _getPpsWk() |
174 | 174 | { |
175 | 175 | $ret = $this->Name; |
@@ -177,34 +177,34 @@ discard block |
||
177 | 177 | $ret .= "\x00"; |
178 | 178 | } |
179 | 179 | $ret .= pack("v", strlen($this->Name) + 2) // 66 |
180 | - . pack("c", $this->Type) // 67 |
|
181 | - . pack("c", 0x00) //UK // 68 |
|
182 | - . pack("V", $this->PrevPps) //Prev // 72 |
|
183 | - . pack("V", $this->NextPps) //Next // 76 |
|
184 | - . pack("V", $this->DirPps) //Dir // 80 |
|
185 | - . "\x00\x09\x02\x00" // 84 |
|
186 | - . "\x00\x00\x00\x00" // 88 |
|
187 | - . "\xc0\x00\x00\x00" // 92 |
|
188 | - . "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root |
|
189 | - . "\x00\x00\x00\x00" // 100 |
|
190 | - . OLE::LocalDate2OLE($this->Time1st) // 108 |
|
191 | - . OLE::LocalDate2OLE($this->Time2nd) // 116 |
|
192 | - . pack("V", isset($this->_StartBlock)? |
|
180 | + . pack("c", $this->Type) // 67 |
|
181 | + . pack("c", 0x00) //UK // 68 |
|
182 | + . pack("V", $this->PrevPps) //Prev // 72 |
|
183 | + . pack("V", $this->NextPps) //Next // 76 |
|
184 | + . pack("V", $this->DirPps) //Dir // 80 |
|
185 | + . "\x00\x09\x02\x00" // 84 |
|
186 | + . "\x00\x00\x00\x00" // 88 |
|
187 | + . "\xc0\x00\x00\x00" // 92 |
|
188 | + . "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root |
|
189 | + . "\x00\x00\x00\x00" // 100 |
|
190 | + . OLE::LocalDate2OLE($this->Time1st) // 108 |
|
191 | + . OLE::LocalDate2OLE($this->Time2nd) // 116 |
|
192 | + . pack("V", isset($this->_StartBlock)? |
|
193 | 193 | $this->_StartBlock:0) // 120 |
194 | - . pack("V", $this->Size) // 124 |
|
195 | - . pack("V", 0); // 128 |
|
194 | + . pack("V", $this->Size) // 124 |
|
195 | + . pack("V", 0); // 128 |
|
196 | 196 | return $ret; |
197 | 197 | } |
198 | 198 | |
199 | 199 | /** |
200 | - * Updates index and pointers to previous, next and children PPS's for this |
|
201 | - * PPS. I don't think it'll work with Dir PPS's. |
|
202 | - * |
|
203 | - * @access private |
|
204 | - * @param array &$pps_array Reference to the array of PPS's for the whole OLE |
|
205 | - * container |
|
206 | - * @return integer The index for this PPS |
|
207 | - */ |
|
200 | + * Updates index and pointers to previous, next and children PPS's for this |
|
201 | + * PPS. I don't think it'll work with Dir PPS's. |
|
202 | + * |
|
203 | + * @access private |
|
204 | + * @param array &$pps_array Reference to the array of PPS's for the whole OLE |
|
205 | + * container |
|
206 | + * @return integer The index for this PPS |
|
207 | + */ |
|
208 | 208 | function _savePpsSetPnt(&$pps_array) |
209 | 209 | { |
210 | 210 | $pps_array[count($pps_array)] = &$this; |
@@ -189,10 +189,10 @@ |
||
189 | 189 | . "\x00\x00\x00\x00" // 100 |
190 | 190 | . OLE::LocalDate2OLE($this->Time1st) // 108 |
191 | 191 | . OLE::LocalDate2OLE($this->Time2nd) // 116 |
192 | - . pack("V", isset($this->_StartBlock)? |
|
193 | - $this->_StartBlock:0) // 120 |
|
192 | + . pack("V", isset($this->_StartBlock) ? |
|
193 | + $this->_StartBlock : 0) // 120 |
|
194 | 194 | . pack("V", $this->Size) // 124 |
195 | - . pack("V", 0); // 128 |
|
195 | + . pack("V", 0); // 128 |
|
196 | 196 | return $ret; |
197 | 197 | } |
198 | 198 |
@@ -76,7 +76,7 @@ |
||
76 | 76 | public static function factory($driver) |
77 | 77 | { |
78 | 78 | $driver = basename($driver); |
79 | - $class = 'Text_CAPTCHA_Driver_' . $driver; |
|
79 | + $class = 'Text_CAPTCHA_Driver_'.$driver; |
|
80 | 80 | /*$file = str_replace('_', '/', $class) . '.php'; |
81 | 81 | //check if it exists and can be loaded |
82 | 82 | if (!@fclose(@fopen($file, 'r', true))) { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $this->_length = 4; |
71 | 71 | } |
72 | 72 | if (isset($options['phrase']) && !empty($options['phrase'])) { |
73 | - $this->setPhrase((string)$options['phrase']); |
|
73 | + $this->setPhrase((string) $options['phrase']); |
|
74 | 74 | } else { |
75 | 75 | $this->createPhrase(); |
76 | 76 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | if ($this->_mode == 'single') { |
117 | 117 | $phraseArr = str_split($phrase); |
118 | 118 | for ($i = 0; $i < strlen($phrase); $i++) { |
119 | - $res .= ' ' . $numberWords->toWords($phraseArr[$i], $this->_locale); |
|
119 | + $res .= ' '.$numberWords->toWords($phraseArr[$i], $this->_locale); |
|
120 | 120 | } |
121 | 121 | } else { |
122 | 122 | $res = $numberWords->toWords($phrase, $this->_locale); |
@@ -167,17 +167,17 @@ |
||
167 | 167 | $outputString = $figlet->lineEcho($this->getPhrase()); |
168 | 168 | |
169 | 169 | switch ($this->_output) { |
170 | - case 'text': |
|
171 | - $this->setCaptcha($outputString); |
|
172 | - break; |
|
173 | - case 'html': |
|
174 | - $this->setCaptcha($this->_getCAPTCHAAsHTML($outputString)); |
|
175 | - break; |
|
176 | - case 'javascript': |
|
177 | - $this->setCaptcha($this->_getCAPTCHAAsJavascript($outputString)); |
|
178 | - break; |
|
179 | - default: |
|
180 | - throw new Text_CAPTCHA_Exception('Invalid output option given'); |
|
170 | + case 'text': |
|
171 | + $this->setCaptcha($outputString); |
|
172 | + break; |
|
173 | + case 'html': |
|
174 | + $this->setCaptcha($this->_getCAPTCHAAsHTML($outputString)); |
|
175 | + break; |
|
176 | + case 'javascript': |
|
177 | + $this->setCaptcha($this->_getCAPTCHAAsJavascript($outputString)); |
|
178 | + break; |
|
179 | + default: |
|
180 | + throw new Text_CAPTCHA_Exception('Invalid output option given'); |
|
181 | 181 | } |
182 | 182 | } |
183 | 183 |
@@ -80,13 +80,13 @@ discard block |
||
80 | 80 | public function initDriver($options = array()) |
81 | 81 | { |
82 | 82 | if (!empty($options['output'])) { |
83 | - $this->_output = (string)$options['output']; |
|
83 | + $this->_output = (string) $options['output']; |
|
84 | 84 | } else { |
85 | 85 | $this->_output = 'html'; |
86 | 86 | } |
87 | 87 | |
88 | 88 | if (isset($options['width']) && $options['width']) { |
89 | - $this->_width = (int)$options['width']; |
|
89 | + $this->_width = (int) $options['width']; |
|
90 | 90 | } else { |
91 | 91 | $this->_width = 200; |
92 | 92 | } |
@@ -201,11 +201,11 @@ discard block |
||
201 | 201 | } |
202 | 202 | |
203 | 203 | $htmlOutput = '<div style="font-family: courier; |
204 | - font-size: ' . $textSize . 'px; |
|
205 | - width:' . $this->_width . 'px; |
|
204 | + font-size: ' . $textSize.'px; |
|
205 | + width:' . $this->_width.'px; |
|
206 | 206 | text-align:center;">'; |
207 | - $htmlOutput .= '<div style="' . $cssOutput . 'margin:0px;"> |
|
208 | - <pre style="padding: 0px; margin: 0px;">' . $data . '</pre></div></div>'; |
|
207 | + $htmlOutput .= '<div style="'.$cssOutput.'margin:0px;"> |
|
208 | + <pre style="padding: 0px; margin: 0px;">' . $data.'</pre></div></div>'; |
|
209 | 209 | |
210 | 210 | return $htmlOutput; |
211 | 211 | } |
@@ -140,20 +140,20 @@ |
||
140 | 140 | public function createCAPTCHA() |
141 | 141 | { |
142 | 142 | switch ($this->_severity) { |
143 | - case 1: |
|
144 | - list($equation, $phrase) = $this->_createSimpleEquation(); |
|
145 | - break; |
|
146 | - case 2: |
|
147 | - list($eq1, $sol1) = $this->_createSimpleEquation(); |
|
148 | - list($eq2, $sol2) = $this->_createSimpleEquation(); |
|
149 | - $op3 = $this->_operators[mt_rand(0, count($this->_operators) - 1)]; |
|
150 | - list(, $phrase) = $this->_solveSimpleEquation($sol1, $sol2, $op3); |
|
151 | - $equation = sprintf($op3, '(' . $eq1 . ')', '(' . $eq2 . ')'); |
|
152 | - break; |
|
153 | - default: |
|
154 | - throw new Text_CAPTCHA_Exception( |
|
155 | - 'Equation complexity of ' . $this->_severity . ' not supported' |
|
156 | - ); |
|
143 | + case 1: |
|
144 | + list($equation, $phrase) = $this->_createSimpleEquation(); |
|
145 | + break; |
|
146 | + case 2: |
|
147 | + list($eq1, $sol1) = $this->_createSimpleEquation(); |
|
148 | + list($eq2, $sol2) = $this->_createSimpleEquation(); |
|
149 | + $op3 = $this->_operators[mt_rand(0, count($this->_operators) - 1)]; |
|
150 | + list(, $phrase) = $this->_solveSimpleEquation($sol1, $sol2, $op3); |
|
151 | + $equation = sprintf($op3, '(' . $eq1 . ')', '(' . $eq2 . ')'); |
|
152 | + break; |
|
153 | + default: |
|
154 | + throw new Text_CAPTCHA_Exception( |
|
155 | + 'Equation complexity of ' . $this->_severity . ' not supported' |
|
156 | + ); |
|
157 | 157 | } |
158 | 158 | $this->setCaptcha($equation); |
159 | 159 | $this->setPhrase($phrase); |
@@ -97,27 +97,27 @@ discard block |
||
97 | 97 | public function initDriver($options = array()) |
98 | 98 | { |
99 | 99 | if (isset($options['min'])) { |
100 | - $this->_min = (int)$options['min']; |
|
100 | + $this->_min = (int) $options['min']; |
|
101 | 101 | } else { |
102 | 102 | $this->_min = 1; |
103 | 103 | } |
104 | 104 | if (isset($options['max'])) { |
105 | - $this->_max = (int)$options['max']; |
|
105 | + $this->_max = (int) $options['max']; |
|
106 | 106 | } else { |
107 | 107 | $this->_max = 10; |
108 | 108 | } |
109 | 109 | if (isset($options['numbersToText'])) { |
110 | - $this->_numbersToText = (bool)$options['numbersToText']; |
|
110 | + $this->_numbersToText = (bool) $options['numbersToText']; |
|
111 | 111 | } else { |
112 | 112 | $this->_numbersToText = false; |
113 | 113 | } |
114 | 114 | if (isset($options['locale'])) { |
115 | - $this->_locale = (string)$options['locale']; |
|
115 | + $this->_locale = (string) $options['locale']; |
|
116 | 116 | } else { |
117 | 117 | $this->_locale = ''; |
118 | 118 | } |
119 | 119 | if (isset($options['severity'])) { |
120 | - $this->_severity = (int)$options['severity']; |
|
120 | + $this->_severity = (int) $options['severity']; |
|
121 | 121 | } else { |
122 | 122 | $this->_severity = 1; |
123 | 123 | } |
@@ -148,11 +148,11 @@ discard block |
||
148 | 148 | list($eq2, $sol2) = $this->_createSimpleEquation(); |
149 | 149 | $op3 = $this->_operators[mt_rand(0, count($this->_operators) - 1)]; |
150 | 150 | list(, $phrase) = $this->_solveSimpleEquation($sol1, $sol2, $op3); |
151 | - $equation = sprintf($op3, '(' . $eq1 . ')', '(' . $eq2 . ')'); |
|
151 | + $equation = sprintf($op3, '('.$eq1.')', '('.$eq2.')'); |
|
152 | 152 | break; |
153 | 153 | default: |
154 | 154 | throw new Text_CAPTCHA_Exception( |
155 | - 'Equation complexity of ' . $this->_severity . ' not supported' |
|
155 | + 'Equation complexity of '.$this->_severity.' not supported' |
|
156 | 156 | ); |
157 | 157 | } |
158 | 158 | $this->setCaptcha($equation); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | { |
189 | 189 | $equation = sprintf($operator, $one, $two); |
190 | 190 | |
191 | - $function = create_function('', 'return ' . $equation . ';'); |
|
191 | + $function = create_function('', 'return '.$equation.';'); |
|
192 | 192 | |
193 | 193 | if ($this->_numbersToText) { |
194 | 194 | $numberWords = new Numbers_Words(); |
@@ -241,17 +241,17 @@ |
||
241 | 241 | { |
242 | 242 | $this->_setOperation(); |
243 | 243 | switch ($this->_operator) { |
244 | - case '+': |
|
245 | - $this->_doAdd(); |
|
246 | - break; |
|
247 | - case '-': |
|
248 | - $this->_doSubtract(); |
|
249 | - break; |
|
250 | - default: |
|
251 | - $this->_operator = "+"; |
|
252 | - $this->_setOperation(); |
|
253 | - $this->_doAdd(); |
|
254 | - break; |
|
244 | + case '+': |
|
245 | + $this->_doAdd(); |
|
246 | + break; |
|
247 | + case '-': |
|
248 | + $this->_doSubtract(); |
|
249 | + break; |
|
250 | + default: |
|
251 | + $this->_operator = "+"; |
|
252 | + $this->_setOperation(); |
|
253 | + $this->_doAdd(); |
|
254 | + break; |
|
255 | 255 | } |
256 | 256 | } |
257 | 257 |
@@ -88,12 +88,12 @@ discard block |
||
88 | 88 | public function initDriver($options = array()) |
89 | 89 | { |
90 | 90 | if (isset($options['minValue'])) { |
91 | - $this->_minValue = (int)$options['minValue']; |
|
91 | + $this->_minValue = (int) $options['minValue']; |
|
92 | 92 | } else { |
93 | 93 | $this->_minValue = 1; |
94 | 94 | } |
95 | 95 | if (isset($options['maxValue'])) { |
96 | - $this->_maxValue = (int)$options['maxValue']; |
|
96 | + $this->_maxValue = (int) $options['maxValue']; |
|
97 | 97 | } else { |
98 | 98 | $this->_maxValue = 50; |
99 | 99 | } |
@@ -103,12 +103,12 @@ discard block |
||
103 | 103 | $this->_operator = ''; |
104 | 104 | } |
105 | 105 | if (isset($options['firstValue'])) { |
106 | - $this->_firstNumber = (int)$options['firstValue']; |
|
106 | + $this->_firstNumber = (int) $options['firstValue']; |
|
107 | 107 | } else { |
108 | 108 | $this->_firstNumber = 0; |
109 | 109 | } |
110 | 110 | if (isset($options['secondValue'])) { |
111 | - $this->_secondNumber = (int)$options['secondValue']; |
|
111 | + $this->_secondNumber = (int) $options['secondValue']; |
|
112 | 112 | } else { |
113 | 113 | $this->_secondNumber = 0; |
114 | 114 | } |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | private function _setOperation() |
156 | 156 | { |
157 | 157 | $this->setCaptcha( |
158 | - $this->_firstNumber . ' ' . $this->_operator . ' ' . $this->_secondNumber |
|
158 | + $this->_firstNumber.' '.$this->_operator.' '.$this->_secondNumber |
|
159 | 159 | ); |
160 | 160 | } |
161 | 161 |
@@ -51,7 +51,7 @@ |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | //require_once 'Text/Diff/Engine/' . $engine . '.php'; |
54 | - $class = 'Text_Diff_Engine_' . $engine; |
|
54 | + $class = 'Text_Diff_Engine_'.$engine; |
|
55 | 55 | $diff_engine = new $class(); |
56 | 56 | |
57 | 57 | $this->_edits = call_user_func_array(array($diff_engine, 'diff'), $params); |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | function _getTempDir() |
228 | 228 | { |
229 | 229 | $tmp_locations = array('/tmp', '/var/tmp', 'c:\WUTemp', 'c:\temp', |
230 | - 'c:\windows\temp', 'c:\winnt\temp'); |
|
230 | + 'c:\windows\temp', 'c:\winnt\temp'); |
|
231 | 231 | |
232 | 232 | /* Try PHP's upload_tmp_dir directive. */ |
233 | 233 | $tmp = ini_get('upload_tmp_dir'); |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | * of elements as $to_lines. |
310 | 310 | */ |
311 | 311 | function Text_MappedDiff($from_lines, $to_lines, |
312 | - $mapped_from_lines, $mapped_to_lines) |
|
312 | + $mapped_from_lines, $mapped_to_lines) |
|
313 | 313 | { |
314 | 314 | assert(count($from_lines) == count($mapped_from_lines)); |
315 | 315 | assert(count($to_lines) == count($mapped_to_lines)); |