Skip to content

превью v5#40

Draft
Hatsunyan wants to merge 1 commit intov5from
v5-dev
Draft

превью v5#40
Hatsunyan wants to merge 1 commit intov5from
v5-dev

Conversation

@Hatsunyan
Copy link
Collaborator

draft v5

public string|null $className = null,
public bool $isOptional = false,
) {
if ($this->isNullable && !empty($this->allowedTypes) && !\in_array('null', $this->allowedTypes)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

КМК тут !empty тут лишняя, тк она не может принимать никакие другие значения, кроме массива и всегда существует

$errors[] = $e->getErrors();
} catch (JsonRpcException $e) {
throw $e;
} catch (\Exception) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

КМК лучше заменить на \Throwable чтобы точно все перехватывало

*/
public function __construct(
ServerConfig $config,
JsonRpcParserInterface $parser = null,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут нужно указать в типе nullable, чтобы варнингов не было в php 8.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants