Completed
Pull Request — master (#9)
by Harry
03:40
created

TestCase   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 1
c 2
b 0
f 1
lcom 0
cbo 1
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getStream() 0 7 1
1
<?php
2
/**
3
 * This file is part of graze/csv-token
4
 *
5
 * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license https://github.com/graze/csv-token/blob/master/LICENSE.md
11
 * @link    https://github.com/graze/csv-token
12
 */
13
14
namespace Graze\CsvToken\Test;
15
16
class TestCase extends \PHPUnit_Framework_TestCase
17
{
18
    /**
19
     * @param string $string
20
     *
21
     * @return resource
22
     */
23
    protected function getStream($string)
24
    {
25
        $stream = fopen('php://memory', 'r+');
26
        fwrite($stream, $string);
27
        rewind($stream);
28
        return $stream;
29
    }
30
}
31