Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 659 Bytes

AGENTS.md

File metadata and controls

25 lines (19 loc) · 659 Bytes

Agent Instructions

Code Style

Avoid Unnecessary Variables

Do not introduce unnecessary intermediate variables when accessing object properties. Access properties directly using chain notation.

Bad:

$sessionConfig = $serverConfig->session;
$type = $sessionConfig->type;
$ttl = $sessionConfig->ttl;

Good:

$type = $serverConfig->session->type;
$ttl = $serverConfig->session->ttl;

Only create intermediate variables when:

  1. The same property chain is accessed many times (3+) and readability improves
  2. The intermediate value needs to be modified
  3. The property access has side effects that should only happen once