Passed
Push — master ( d44e36...c2d6d5 )
by Johnny
02:21
created

TestCaseFilter::accept()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 6
rs 10
1
<?php
2
/*
3
 * This file is part of Rivescript-php
4
 *
5
 * (c) Johnny Mast <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace App;
12
13
/**
14
 * Rivescript class
15
 *
16
 * The entry point for using the interpreter.
17
 *
18
 * PHP version 7.4 and higher.
19
 *
20
 * @category Core
21
 * @package  Cortext
22
 * @author   Shea Lewis <[email protected]>
23
 * @license  https://opensource.org/licenses/MIT MIT
24
 * @link     https://github.com/axiom-labs/rivescript-php
25
 * @since    0.3.0
26
 */
27
class TestCaseFilter extends \FilterIterator
28
{
29
    public function accept()
30
    {
31
        if (preg_match('/.yml/', $this->current())) {
32
            return true;
33
        } else {
34
            return false;
35
        }
36
    }
37
}