Zum Inhalt springen

Interface no I prefix (ARCH7003)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Key php.naming.interface-no-i-prefix · Severity info · Category naming

The PHP convention discourages prefixing interface names with I. This Hungarian-style prefix is redundant; the abstraction is clear from context and the implements clause.

<?php
interface IRepository
{
public function find(int $id): ?object;
}
<?php
interface Repository
{
public function find(int $id): ?object;
}

Drop the I prefix; if a role marker is needed, use a meaningful suffix instead.