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

TestCaseFilter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 8
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A accept() 0 6 2
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
}