PHP code example of corpsee / php-censor
1. Go to this page and download the library: Download corpsee/php-censor 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/ */
corpsee / php-censor example snippets yml
setup:
composer:
action: "install"
directory: "."
test:
php_unit:
config: "phpunit.xml"
php_mess_detector:
allow_failures: true
php_code_sniffer:
standard: "PSR2"
php_cpd:
allow_failures: true
complete:
email_notify:
default_mailto_address: [email protected]
bash
cd /path/to/php-censor
./bin/console php-censor-migrations:migrate
bash
cd /path/to/php-censor
./bin/console php-censor-migrations:create NewMigrationName
bash
cd /path/to/php-censor
./vendor/bin/php-cs-fixer fix --allow-risky=yes
shell
#!/usr/bin/env bash
psql --username="test" --host="127.0.0.1" --echo-all --command="DROP DATABASE IF EXISTS \"php-censor-test\";"
psql --username="test" --host="127.0.0.1" --echo-all --command="CREATE DATABASE \"php-censor-test\";"
mysql --user="test" --password="test" --host="127.0.0.1" --verbose --execute="CREATE DATABASE IF NOT EXISTS \`php-censor-test\`;"
export SKIP_DB_TESTS=0;\
export POSTGRESQL_DBNAME=php-censor-test;\
export POSTGRESQL_USER=test;\
export POSTGRESQL_PASSWORD=test;\
export MYSQL_DBNAME=php-censor-test;\
export MYSQL_USER=test;\
export MYSQL_PASSWORD=test;\
vendor/bin/phpunit --configuration=phpunit.xml.dist --verbose