Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 10 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| tao_install_checks_OpcacheLoadComments | |
0.00% |
0 / 10 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
| check | |
0.00% |
0 / 10 |
|
0.00% |
0 / 1 |
6 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; under version 2 |
| 7 | * of the License (non-upgradable). |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | * |
| 18 | * Copyright (c) 2016 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT); |
| 19 | * @author Mikhail Kamarouski, <kamarouski@1pt.com> |
| 20 | */ |
| 21 | class tao_install_checks_OpcacheLoadComments extends common_configuration_Component |
| 22 | { |
| 23 | /** |
| 24 | * @return common_configuration_Report |
| 25 | */ |
| 26 | public function check() |
| 27 | { |
| 28 | if (version_compare(phpversion(), '7.0.0', '>=')) { |
| 29 | return new common_configuration_Report( |
| 30 | common_configuration_Report::VALID, |
| 31 | 'opcache.load_comments is not a configurable option any more for php > 7', |
| 32 | $this |
| 33 | ); |
| 34 | } |
| 35 | |
| 36 | $iniSettingCheck = new common_configuration_PHPINIValue('1', 'opcache.load_comments'); |
| 37 | $result = $iniSettingCheck->check(); |
| 38 | $result->setComponent($this); |
| 39 | return $result; |
| 40 | } |
| 41 | } |