Help us improve
Share bugs, ideas, or general feedback.
From nette-dev
Provides Nette-specific PHP coding standards including TAB indentation, single quotes, strict_types=1, PSR-12 modifications, and use statement ordering. Invoke before writing, modifying, or refactoring any PHP code.
npx claudepluginhub nette/claude-code --plugin nette-devHow this skill is triggered — by the user, by Claude, or both
Slash command
/nette-dev:php-coding-standardsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Install globally using `/php-fixer:install-php-fixer`. After installation, PHP files are automatically fixed when edited - see the `php-auto-fixer` skill for editing workflow rules (especially `use` statement ordering).
Automatically runs nette/coding-standard (ECS) on PHP files after every Edit/Write, fixing formatting and removing unused use statements. Essential for all PHP creation, editing, refactoring, or bug fixes to avoid import issues.
Analyzes PHP code for PSR-12 compliance and style issues including brace placement, line length, indentation, blank lines, trailing whitespace, use statements, array syntax, and operator spacing.
Share bugs, ideas, or general feedback.
Install globally using /php-fixer:install-php-fixer. After installation, PHP files are automatically fixed when edited - see the php-auto-fixer skill for editing workflow rules (especially use statement ordering).
declare(strict_types=1)@mkdir($dir); // @ - directory may already exist// == accept nullexceptions.php fileIO, DB), PascalCase/camelCase for longer ones (Http, Xml)ArrayIterator)Abstract, Interface, or I - the type system already distinguishes themfn($a) => $buse import types// Short params - standard single-line
public function getItems(string $type): array
{
// method body
}
// Multi-line params - return type and brace on separate lines
public function example(
string $param,
array $options,
): string
{
// method body
}
count($arr) not \count($arr)use function at the file beginning:
use Nette;
use function count, is_array, is_scalar, sprintf;
use const PHP_OS_FAMILY;
if (is_array($response['data'] ?? null)) instead of if (isset($response['data']) && is_array($response['data']))is_a($obj, $class, allow_string: true)), but not when the method name makes it clear (e.g., setReadonly(true))Foo\Network next to Foo\Networks\*, not inside it) - this keeps the interface discoverable at the package level