for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Aerophant\RamdaTest;
use function Aerophant\Ramda\all;
use PHPUnit\Framework\TestCase;
class AllTest extends TestCase
{
public function testAllAndExpectTrue()
$lessThan10 = function ($it) {
return $it < 10;
};
$this->assertTrue(all($lessThan10)([1, 2, 3, 4]));
}
public function testAllAndExpectFalse()
$this->assertFalse(all($lessThan10)([1, 2, 3, 4, 20]));
public function testAllWithEmptyArray()
$predicate = function ($it) {
$it
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
$predicate = function (/** @scrutinizer ignore-unused */ $it) {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return true;
$this->assertFalse(all($predicate)([]));
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.