Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
46 | public function testDiff(): void |
||
47 | { |
||
48 | $commit = $this->getRepository()->init()->getCommit(); |
||
49 | $this->assertEquals( |
||
50 | DiffCommand::DIFF_COMMAND . " '--full-index' '--no-color' '--no-ext-diff' '-M' '--dst-prefix=DST/' '--src-prefix=SRC/' 'HEAD^..HEAD'", |
||
51 | $this->diffCommand->diff('HEAD') |
||
|
|||
52 | ); |
||
53 | $this->assertEquals( |
||
54 | DiffCommand::DIFF_COMMAND . " '--full-index' '--no-color' '--no-ext-diff' '-M' '--dst-prefix=DST/' '--src-prefix=SRC/' 'branch2..HEAD' -- 'foo'", |
||
55 | $this->diffCommand->diff('HEAD', 'branch2', 'foo') |
||
56 | ); |
||
57 | $this->assertEquals( |
||
58 | sprintf( |
||
59 | DiffCommand::DIFF_COMMAND . " '--full-index' '--no-color' '--no-ext-diff' '-M' '--dst-prefix=DST/' '--src-prefix=SRC/' '%s^..%s'", |
||
60 | $commit->getSha(), |
||
61 | $commit->getSha() |
||
62 | ), |
||
63 | $this->diffCommand->diff($commit) |
||
64 | ); |
||
65 | } |
||
66 | } |
||
67 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: