Open EarthlingDavey opened 6 months ago
@EmilyHazlehurst has raised an important point about using PHPDoc comments to describe functions. https://github.com/ministryofjustice/justice-gov-uk/pull/91#discussion_r1524881714
e.g.
/**
* Prevent all single posts, of any post type, from using the document(s) slug.
*
* @param bool $bad_slug Whether the slug is bad or not
* @param string $slug The document slug
* @return bool The sum of the two numbers.
*/
https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/
+1 from me. Let's have a team discussion.
Adding to this, we could potentially:
Further research PSR-4.
Implementation would mean adding autoloader
section of composer.json
.
This will require build-fpm-composer
has access to php source code in the Dockerfile
.
Resources:
As @wilson1000-MoJ suggested in this review. https://github.com/ministryofjustice/justice-gov-uk/pull/77#discussion_r1512622834
It's important to use a standard for code readability, and minimise that chance of merge conflicts.
Let's revisit.