Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
66.67% covered (warning)
66.67%
2 / 3
66.67% covered (warning)
66.67%
2 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 1
task_base
66.67% covered (warning)
66.67%
2 / 3
66.67% covered (warning)
66.67%
2 / 3
3.33
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 is_essential
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 check_requirements
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2/**
3 *
4 * This file is part of the phpBB Forum Software package.
5 *
6 * @copyright (c) phpBB Limited <https://www.phpbb.com>
7 * @license GNU General Public License, version 2 (GPL-2.0)
8 *
9 * For full copyright and license information, please see
10 * the docs/CREDITS.txt file.
11 *
12 */
13
14namespace phpbb\install;
15
16/**
17 * Base class for installer task
18 */
19abstract class task_base implements task_interface
20{
21    /**
22     * @var bool
23     */
24    protected $is_essential;
25
26    /**
27     * Constructor
28     *
29     * @param bool $essential
30     */
31    public function __construct($essential = true)
32    {
33        $this->is_essential = $essential;
34    }
35
36    /**
37     * {@inheritdoc}
38     */
39    public function is_essential()
40    {
41        return $this->is_essential;
42    }
43
44    /**
45     * {@inheritdoc}
46     *
47     * Note: Overwrite this method if your task is non-essential!
48     */
49    public function check_requirements()
50    {
51        return true;
52    }
53}