PHP code example of staabm / phpstan-dba
1. Go to this page and download the library: Download staabm/phpstan-dba 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/ */
staabm / phpstan-dba example snippets
// phpstan-dba-bootstrap.php
use staabm\PHPStanDba\DbSchema\SchemaHasherMysql;
use staabm\PHPStanDba\QueryReflection\RuntimeConfiguration;
use staabm\PHPStanDba\QueryReflection\MysqliQueryReflector;
use staabm\PHPStanDba\QueryReflection\QueryReflection;
use staabm\PHPStanDba\QueryReflection\ReplayAndRecordingQueryReflector;
use staabm\PHPStanDba\QueryReflection\ReplayQueryReflector;
use staabm\PHPStanDba\QueryReflection\ReflectionCache;
hpstan-dba.cache';
$reflector = new ReplayAndRecordingQueryReflector(
ReflectionCache::create(
$cacheFile
),
new SchemaHasherMysql($mysqli)
$reflector
);
*/
QueryReflection::setupReflector(
$reflector,
$config
);
neon
parameters:
level: 8
paths:
- src/
bootstrapFiles:
- phpstan-dba-bootstrap.php