for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the League.csv library
*
* @license http://opensource.org/licenses/MIT
* @link https://github.com/thephpleague/csv/
* @version 9.0.0
* @package League.csv
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace League\Csv\Plugin;
* A class to validate null value handling on data insertion into a CSV
* @since 7.0.0
* @author Ignace Nyamagana Butera <[email protected]>
class ForbiddenNullValues
{
* Is the submitted record valid
* @param array $record
* @return bool
public function __invoke(array $record): bool
$filter = function ($value): bool {
return null === $value;
};
return !array_filter($record, $filter);
}