PHP code example of mnib-dev / coding-standard

1. Go to this page and download the library: Download mnib-dev/coding-standard 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/ */

    

mnib-dev / coding-standard example snippets




declare(strict_types=1);

$finder = PhpCsFixer\Finder::create()
    ->in(__DIR__ . '/src')
    ->ignoreDotFiles(true)
    ->ignoreVCS(true)
    ->files()
    ->name('*.php')
;

return (new MNIB\CsFixer\Config())
    ->setFinder($finder)
    ->setRiskyAllowed(true)
    ->addRules([
        'declare_strict_types' => true,
        'strict_comparison' => true,
        'strict_param' => true,
        'string_line_ending' => true,
    ])
;