Issues (11)

test/PartialRightTest.php (1 issue)

Labels
Severity
1
<?php
2
namespace Aerophant\RamdaTest;
3
4
use function Aerophant\Ramda\divide;
5
use function Aerophant\Ramda\partialRight;
6
use PHPUnit\Framework\TestCase;
7
8
class PartialRightTest extends TestCase
9
{
10
  public function testPartial()
11
  {
12
    $double = partialRight(divide(), [2]);
0 ignored issues
show
It seems like divide() can also be of type integer and double; however, parameter $fn of Aerophant\Ramda\partialRight() does only seem to accept callable, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

12
    $double = partialRight(/** @scrutinizer ignore-type */ divide(), [2]);
Loading history...
13
    $arg = 10;
14
    $expectedResult = 5;
15
    $actualResult = $double($arg);
16
    $this->assertEquals($expectedResult, $actualResult);
17
  }
18
}
19