argument unpackingの存在を思い出した

This commit is contained in:
shibafu
2020-02-16 23:17:07 +09:00
parent 84b955b195
commit 794cdf2be6
2 changed files with 13 additions and 10 deletions

View File

@@ -13,7 +13,7 @@ class CsvImportException extends \RuntimeException
* CsvImportException constructor.
* @param string[] $errors
*/
public function __construct(array $errors)
public function __construct(...$errors)
{
parent::__construct(array_first($errors));
$this->errors = $errors;