Completed
Branch feature/0.7.0 (0808a6)
by Ryuichi
158:51 queued 113:46
created

FileWriterProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 16
loc 16
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
namespace WebStream\IO\Test\Providers;
3
4
/**
5
 * FileWriterProvider
6
 * @author Ryuichi TANAKA.
7
 * @since 2016/08/18
8
 * @version 0.7
9
 */
10
trait FileWriterProvider
11
{
12
    public function writeProvider()
13
    {
14
        return [
15
            ["/tmp/filewriter-test1.txt", "test"]
16
        ];
17
    }
18
19
    public function writeAppendProvider()
20
    {
21
        return [
22
            ["/tmp/filewriter-test2.txt", "test", "testtest"]
23
        ];
24
    }
25
}
26