Aggiornato Composer

This commit is contained in:
Paolo A
2024-05-17 12:24:19 +00:00
parent 4ac62108b5
commit ec201d75b2
2238 changed files with 38684 additions and 59785 deletions

View File

@@ -10,12 +10,11 @@ use PhpParser\ErrorHandler;
*
* This allows graceful handling of errors.
*/
class Collecting implements ErrorHandler
{
class Collecting implements ErrorHandler {
/** @var Error[] Collected errors */
private $errors = [];
private array $errors = [];
public function handleError(Error $error) {
public function handleError(Error $error): void {
$this->errors[] = $error;
}
@@ -24,23 +23,21 @@ class Collecting implements ErrorHandler
*
* @return Error[]
*/
public function getErrors() : array {
public function getErrors(): array {
return $this->errors;
}
/**
* Check whether there are any errors.
*
* @return bool
*/
public function hasErrors() : bool {
public function hasErrors(): bool {
return !empty($this->errors);
}
/**
* Reset/clear collected errors.
*/
public function clearErrors() {
public function clearErrors(): void {
$this->errors = [];
}
}