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\Exception;
use League\Csv\Exception;
use RuntimeException;
* Thrown if an error which can onlyu be found on runtime occurs.
* @since 9.0.0
* @author Ignace Nyamagana Butera <[email protected]>
class CannotBindHeader extends RuntimeException implements Exception
{
* The header submitted for binding
* @var array
protected $header;
* Create an Exception from a record insertion into a stream
* @param string[] $record
$record
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
* @param array $header
* @return self
public static function createFromHeader(array $header): self
$exception = new static('The header record must be empty or a flat array with unique string values');
$exception->header = $header;
return $exception;
}
* return the invalid header submitted
* @return array
public function getHeader(): array
return $this->header;
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.