• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FormulasQuestion / moodle-qtype_formulas / 13217446514

08 Feb 2025 04:37PM UTC coverage: 76.899% (+1.9%) from 75.045%
13217446514

Pull #62

github

web-flow
Merge b36f9931f into acd272945
Pull Request #62: Rewrite the parser

2547 of 3139 new or added lines in 22 files covered. (81.14%)

146 existing lines in 6 files now uncovered.

3006 of 3909 relevant lines covered (76.9%)

438.31 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/classes/local/for_loop.php
1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle 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 Moodle.  If not, see <http://www.gnu.org/licenses/>.
16

17
namespace qtype_formulas\local;
18

19
/**
20
 * for loop for qtype_formulas parser
21
 *
22
 * @package    qtype_formulas
23
 * @copyright  2022 Philipp Imhof
24
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25
 */
26
class for_loop {
27
    /** @var token variable token for the loop's iterator variable */
28
    public token $variable;
29

30
    /** @var expression values the loop will iterate over */
31
    public expression $range;
32

33
    /** @var array statements of the loop */
34
    public array $body = [];
35

36
    /**
37
     * Constructor
38
     *
39
     * @param token $var variable token for the loop's iterator variable
40
     * @param expression $range expression values the loop will iterate over
41
     * @param array $body list of statements forming the loop's body
42
     */
43
    public function __construct(token $var, expression $range, array $body) {
NEW
44
        $this->variable = $var;
×
NEW
45
        $this->range = $range;
×
NEW
46
        $this->body = $body;
×
47
    }
48
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc