Digital Craftsman
  • Search
Sign in Subscribe

psalm

A collection of 1 post
Psalm Collection annotation for Doctrine
php

Psalm Collection annotation for Doctrine

Psalm is an awesome tool for code quality. What I didn't get for a while was how to annotate Doctrine collections. First I used the array syntax, but then I found a better way. /** * @var User[] */ private $users; The first solution/** * @return User[] * @psalm-return array */ public function getUsers(): array { return
Jan 20, 2020 1 min read
Page 1 of 1
Digital Craftsman © 2023
  • Datenschutz
  • Impressum
Powered by Ghost