argument unpackingの存在を思い出した

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

No files matched your search

+1 -1
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;