A simple repository for practicing PHP fundamentals, object-oriented programming, design patterns, Composer, PSR-4 autoloading, and static analysis with PHPStan.
- PHP
- Composer
Install dependencies:
composer installGenerate the Composer autoloader:
composer dump-autoloadThe repository includes pre-configured settings for static analysis and code quality:
phpstan.neon(PHPStan config)phpcs.xml(PHP_CodeSniffer ruleset)
Run any PHP file directly using the PHP CLI:
php src/oop/abstraction/run.phpClasses inside src/ are autoloaded using Composer PSR-4:
src/
└── oop/
└── encapsulation/
└── BankAccount.php
Run static analysis:
composer analyseChecking coding standards:
composer csAutomatically fix violations:
composer cs:fixThis repository is primarily for learning, experimentation, and improving PHP fundamentals.