https://jason.pureconcepts.net/2012/11/php-coding-standards/
You can download PHP CodeSniffer. If you have PEAR installed, it’s easier:
pear install PHP_CodeSniffer Verify PHP CodeSniffer with:
phpcs --version
# | |
# REQUIRES: | |
# - server (the forge server instance) | |
# - site_name (the name of the site folder) | |
# - sudo_password (random password for sudo) | |
# - db_password (random password for database user) | |
# - event_id (the provisioning event name) | |
# - callback (the callback URL) | |
# |
<?php | |
class Test | |
{ | |
static function __callStatic($method, $args) | |
{ | |
return self::new()->{$method}(...$args); | |
} | |
private static function new(...$args) |
https://jason.pureconcepts.net/2012/11/php-coding-standards/
You can download PHP CodeSniffer. If you have PEAR installed, it’s easier:
pear install PHP_CodeSniffer Verify PHP CodeSniffer with:
phpcs --version
# app/providers/RouteServiceProvider.php | |
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Facades\Route; | |
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; | |
class RouteServiceProvider extends ServiceProvider |
# add these lines to ~/.bashrc | |
#aliases | |
source ~/.aliases | |
# create file ~/.aliases and add these lines to that file. | |
# git | |
alias gs='git status' | |
alias ga='git add' | |
alias gc='git commit -m' |