| Total Complexity | 6 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class Demo_applyConvolution extends Demo |
||
| 6 | { |
||
| 7 | public $order = 2025; |
||
| 8 | |||
| 9 | protected $base_matrix = array(array(2, 0, 0), array(0, -1, 0), array(0, 0, -1)); |
||
| 10 | |||
| 11 | function init() |
||
| 12 | { |
||
| 13 | $this->addField(new Field('matrix', '2 0 0, 0 -1 0, 0 0 -1', '3x3 float matrix; separate rows with a comma, and columns with a space')); |
||
| 14 | $this->addField(new FloatField('div', 1)); |
||
| 15 | $this->addField(new FloatField('offset', 220)); |
||
| 16 | } |
||
| 17 | |||
| 18 | function execute($image, $request) |
||
| 44 | } |
||
| 45 | } |
||
| 46 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.