Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Bug #14989 - PHPCS

  • Loading branch information...
commit 33d40935cd3c9b27437ac8800495dda3d3f327fb 1 parent 8f567d1
Firman Wandayandi authored

Showing 1 changed file with 57 additions and 70 deletions. Show diff stats Hide diff stats

  1. +57 70 Math/Numerical/RootFinding/Common.php
127 Math/Numerical/RootFinding/Common.php
... ... @@ -1,11 +1,7 @@
1 1 <?php
2   -/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
3   -
4   -// {{{ Header
5   -
6 2 /**
7   - * File contains abstract class Math_Numerical_RootFinding_Common for all
8   - * method classes.
  3 + * File contains abstract class Math_Numerical_RootFinding_Common for all method
  4 + * classes.
9 5 *
10 6 * PHP versions 4 and 5
11 7 *
@@ -20,39 +16,31 @@
20 16 * obtain it through the world-wide-web, please send an email
21 17 * to pear-dev@list.php.net so we can send you a copy immediately.
22 18 *
23   - * @category Math
24   - * @package Math_Numerical_RootFinding
25   - * @subpackage Methods
26   - * @author Firman Wandayandi <firman@php.net>
27   - * @copyright Copyright (c) 2004-2008 Firman Wandayandi
28   - * @license http://www.opensource.org/licenses/bsd-license.php
29   - * BSD License
30   - * @version CVS: $Id$
  19 + * @category Math
  20 + * @package Math_Numerical_RootFinding
  21 + * @subpackage Methods
  22 + * @author Firman Wandayandi <firman@php.net>
  23 + * @copyright 2004-2008 Firman Wandayandi
  24 + * @license http://www.opensource.org/licenses/bsd-license.php BSD License
  25 + * @version CVS: $Id$
31 26 */
32 27
33   -// }}}
34   -// {{{ Dependencies
35   -
36 28 /**
37 29 * PEAR
38 30 */
39 31 require_once 'PEAR.php';
40 32
41   -// }}}
42   -// {{{ Class: Math_Numerical_RootFinding_Common
43   -
44 33 /**
45   - * Abstract class contains common properties and methods for specified
46   - * method classes.
  34 + * Abstract class contains common properties and methods for specified method
  35 + * classes.
47 36 *
48   - * @category Math
49   - * @package Math_Numerical_RootFinding
50   - * @subpackage Methods
51   - * @author Firman Wandayandi <firman@php.net>
52   - * @copyright Copyright (c) 2004-2008 Firman Wandayandi
53   - * @license http://www.opensource.org/licenses/bsd-license.php
54   - * BSD License
55   - * @version Release: @package_version@
  37 + * @category Math
  38 + * @package Math_Numerical_RootFinding
  39 + * @subpackage Methods
  40 + * @author Firman Wandayandi <firman@php.net>
  41 + * @copyright 2004-2008 Firman Wandayandi
  42 + * @license http://www.opensource.org/licenses/bsd-license.php BSD License
  43 + * @version Release: @package_version@
56 44 * @abstract
57 45 */
58 46 class Math_Numerical_RootFinding_Common
@@ -63,10 +51,10 @@ class Math_Numerical_RootFinding_Common
63 51 * Options.
64 52 * Available options:
65 53 * <pre>
66   - * max_iteration int Maximum iteration count.
67   - * err_tolerance float Error tolerance.
68   - * divergent_skip bool Flag whether to skip the current iteration if
69   - * divergent rows detected or not.
  54 + * max_iteration int Maximum iteration count.
  55 + * err_tolerance float Error tolerance.
  56 + * divergent_skip bool Flag whether to skip the current iteration if divergent
  57 + * rows detected or not.
70 58 * </pre>
71 59 *
72 60 * @var array
@@ -74,7 +62,7 @@ class Math_Numerical_RootFinding_Common
74 62 */
75 63 var $options = array(
76 64 'max_iteration' => 30,
77   - 'err_tolerance' => 0.00001, // Equals to 1.0E-5
  65 + 'err_tolerance' => 0.00001, // Equals to 1.0E-5
78 66 'divergent_skip' => true
79 67 );
80 68
@@ -108,10 +96,10 @@ class Math_Numerical_RootFinding_Common
108 96 /**
109 97 * Constructor.
110 98 *
111   - * @param array $options (optional) Options.
  99 + * @param array $options (optional) Options.
112 100 *
113   - * @access public
114   - * @see set()
  101 + * @access public
  102 + * @see set()
115 103 */
116 104 function Math_Numerical_RootFinding_Common($options = null)
117 105 {
@@ -128,14 +116,15 @@ function Math_Numerical_RootFinding_Common($options = null)
128 116 *
129 117 * Set a single option or multiple options.
130 118 *
131   - * @param mixed $option A string with option name as value for single
132   - * option or An associative array contains options
133   - * array('<option>' => <value>) for multiple options.
134   - * @param mixed $value (optional) Option value. Require when $option is
135   - * string (single option mode).
  119 + * @param mixed $option A string with option name as value for single
  120 + * option or an associative array contains
  121 + * options. array('<option>' => <value>) for
  122 + * multiple options.
  123 + * @param mixed $value (optional) Option value. Require when $option is string
  124 + * (single option mode).
136 125 *
137   - * @return bool|PEAR_Error TRUE on success or PEAR_Error on failure.
138   - * @access public
  126 + * @return bool|PEAR_Error TRUE on success or PEAR_Error on failure.
  127 + * @access public
139 128 */
140 129 function set($option, $value = null)
141 130 {
@@ -172,10 +161,10 @@ function set($option, $value = null)
172 161 /**
173 162 * Get the option value.
174 163 *
175   - * @param $option Option name.
  164 + * @param $option Option name.
176 165 *
177   - * @return mixed Value of the option or PEAR_Error on failure.
178   - * @since Method available since Release 1.1.0a1
  166 + * @return mixed Value of the option or PEAR_Error on failure.
  167 + * @since Method available since Release 1.1.0a1
179 168 */
180 169 function get($option)
181 170 {
@@ -211,8 +200,8 @@ function compute()
211 200 /**
212 201 * Get root value.
213 202 *
214   - * @return float Root value.
215   - * @access public
  203 + * @return float Root value.
  204 + * @access public
216 205 */
217 206 function getRoot()
218 207 {
@@ -225,8 +214,8 @@ function getRoot()
225 214 /**
226 215 * Get iteration count.
227 216 *
228   - * @return int Iteration count.
229   - * @access public
  217 + * @return int Iteration count.
  218 + * @access public
230 219 */
231 220 function getIterationCount()
232 221 {
@@ -239,8 +228,8 @@ function getIterationCount()
239 228 /**
240 229 * Get epsilon error.
241 230 *
242   - * @return float Epsilon error.
243   - * @access public
  231 + * @return float Epsilon error.
  232 + * @access public
244 233 */
245 234 function getEpsError()
246 235 {
@@ -253,13 +242,13 @@ function getEpsError()
253 242 /**
254 243 * Detect for divergent rows.
255 244 *
256   - * Compare 3 rows of last epsilon errors, if no.3 bigger than no.2 and
257   - * no.2 bigger than no.1, rows are divergent.
  245 + * Compare 3 rows of last epsilon errors, if no.3 bigger than no.2 and no.2
  246 + * bigger than no.1, rows are divergent.
258 247 *
259   - * @param array $epsilonErrors Epsilon errors collection
  248 + * @param array $epsilonErrors Epsilon errors collection
260 249 *
261   - * @return bool TRUE if divergent, otherwise FALSE
262   - * @access public
  250 + * @return bool TRUE if divergent, otherwise FALSE
  251 + * @access public
263 252 */
264 253 function isDivergentRows($epsErrors)
265 254 {
@@ -300,12 +289,12 @@ function reset()
300 289 * Simple function to know the whether equation function or object/method
301 290 * callback is working.
302 291 *
303   - * @param string $eqFunction Equation function name or object method tuple.
304   - * @param float $guess (optional) Initial guess value, default is 1.
  292 + * @param string $eqFunction Equation function name or object method tuple.
  293 + * @param float $guess (optional) Initial guess value, default is 1.
305 294 *
306   - * @return bool|PEAR_Error TRUE on success or PEAR_Error on failure.
307   - * @access public
308   - * @see getEqResult()
  295 + * @return bool|PEAR_Error TRUE on success or PEAR_Error on failure.
  296 + * @access public
  297 + * @see getEqResult()
309 298 * @static
310 299 */
311 300 function validateEqFunction($eqFunction, $guess = 1)
@@ -323,11 +312,11 @@ function validateEqFunction($eqFunction, $guess = 1)
323 312 /**
324 313 * Compute a value using given equation function or object/method.
325 314 *
326   - * @param callback $eqFunction Equation function name or object method tuple.
327   - * @param float $varValue Variable value.
  315 + * @param callback $eqFunction Equation function name or object method tuple.
  316 + * @param float $varValue Variable value.
328 317 *
329   - * @return float|PEAR_Error result value on success, PEAR_Error on failure.
330   - * @access public
  318 + * @return float|PEAR_Error result value on success, PEAR_Error on failure.
  319 + * @access public
331 320 * @static
332 321 */
333 322 function getEqResult($eqFunction, $varValue)
@@ -343,8 +332,6 @@ function getEqResult($eqFunction, $varValue)
343 332 // }}}
344 333 }
345 334
346   -// }}}
347   -
348 335 /*
349 336 * Local variables:
350 337 * mode: php

0 comments on commit 33d4093

Please sign in to comment.
Something went wrong with that request. Please try again.