PHP code example of bondforge / coding-standard

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

    

bondforge / coding-standard example snippets


public function foo(int $a, int $b)
{
    // ...
}

public function bar(
    int $a,
    int $b,
)
{
    // ...
}



declare(strict_types=1);

return 



declare(strict_types=1);

$finder = (new PhpCsFixer\Finder())
    ->in([__DIR__ . '/src', __DIR__ . '/lib'])
    ->append([__FILE__]);

return 
bash
vendor/bin/php-cs-fixer fix