PHP code example of cooldevguys / phpstan-dhexpendency-rules
1. Go to this page and download the library: Download cooldevguys/phpstan-dhexpendency-rules library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cooldevguys / phpstan-dhexpendency-rules example snippets
// src/CoolDevGuys/App/PlaceOrder.php
namespace CoolDevGuys\App;
use CoolDevGuys\Infra\PaymentGatewayClient; // ❌ Application → Infrastructure
// src/CoolDevGuys/Dom/Order.php
namespace CoolDevGuys\Dom;
use Ramsey\Uuid\Uuid; // ❌ Domain → external vendor (with vendorStrictMode: true)