Improve code style formatter + fix unused var in octopush

This commit is contained in:
osaajani 2020-06-22 18:02:33 +02:00
parent d9cc959bbd
commit 3976ef0a24
5 changed files with 13 additions and 17 deletions

View File

@ -201,11 +201,6 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
'sms_type' => self::SMS_TYPE_LOWCOST, 'sms_type' => self::SMS_TYPE_LOWCOST,
]; ];
if ($this->sender !== null)
{
$datas['sms_sender'] = $this->sender;
}
$endpoint = $this->api_url . '/sms/json'; $endpoint = $this->api_url . '/sms/json';
$curl = curl_init(); $curl = curl_init();

View File

@ -13,6 +13,10 @@ $finder = PhpCsFixer\Finder::create()
->exclude('tests/Fixtures') ->exclude('tests/Fixtures')
->in(__DIR__) ->in(__DIR__)
->append([__DIR__.'/php-cs-fixer']) ->append([__DIR__.'/php-cs-fixer'])
->in(__DIR__ . '/../../controllers/')
->in(__DIR__ . '/../../models/')
->in(__DIR__ . '/../../daemons/')
->in(__DIR__ . '/../../adapters/')
; ;
$config = PhpCsFixer\Config::create() $config = PhpCsFixer\Config::create()

View File

@ -13,17 +13,11 @@
} }
$lint_commands = [ $lint_commands = [
'php ' . __DIR__ . '/php-cs-fixer.phar -v --dry-run --config="' . __DIR__ . '/php_cs.config" fix ' . __DIR__ . '/../../controllers/', 'php ' . __DIR__ . '/php-cs-fixer.phar -v --dry-run --config="' . __DIR__ . '/php_cs.config" fix',
'php ' . __DIR__ . '/php-cs-fixer.phar -v --dry-run --config="' . __DIR__ . '/php_cs.config" fix ' . __DIR__ . '/../../models/',
'php ' . __DIR__ . '/php-cs-fixer.phar -v --dry-run --config="' . __DIR__ . '/php_cs.config" fix ' . __DIR__ . '/../../daemons/',
'php ' . __DIR__ . '/php-cs-fixer.phar -v --dry-run --config="' . __DIR__ . '/php_cs.config" fix ' . __DIR__ . '/../../adapters/',
]; ];
$fix_commands = [ $fix_commands = [
'php ' . __DIR__ . '/php-cs-fixer.phar --config="' . __DIR__ . '/php_cs.config" fix ' . __DIR__ . '/../../controllers/', 'php ' . __DIR__ . '/php-cs-fixer.phar --config="' . __DIR__ . '/php_cs.config" fix',
'php ' . __DIR__ . '/php-cs-fixer.phar --config="' . __DIR__ . '/php_cs.config" fix ' . __DIR__ . '/../../models/',
'php ' . __DIR__ . '/php-cs-fixer.phar --config="' . __DIR__ . '/php_cs.config" fix ' . __DIR__ . '/../../daemons/',
'php ' . __DIR__ . '/php-cs-fixer.phar --config="' . __DIR__ . '/php_cs.config" fix ' . __DIR__ . '/../../adapters/',
]; ];

View File

@ -1,5 +1,11 @@
parameters: parameters:
reportUnmatchedIgnoredErrors: false reportUnmatchedIgnoredErrors: false
paths:
- %rootDir%/../../controllers/
- %rootDir%/../../models/
- %rootDir%/../../adapters/
- %rootDir%/../../daemons/
ignoreErrors: ignoreErrors:
- '#Constant RASPISMS_[a-zA-Z0-9\\_]+ not found.#' - '#Constant RASPISMS_[a-zA-Z0-9\\_]+ not found.#'

View File

@ -11,10 +11,7 @@
} }
$analyse_commands = [ $analyse_commands = [
'php ' . __DIR__ . '/phpstan.phar analyse --configuration="'. __DIR__ .'/config.neon" --autoload-file=' . __DIR__ . '/../../descartes/load.php ' . __DIR__ . '/../../controllers/', 'php ' . __DIR__ . '/phpstan.phar analyse --configuration="'. __DIR__ .'/config.neon" --autoload-file=' . __DIR__ . '/../../descartes/load.php ',
'php ' . __DIR__ . '/phpstan.phar analyse --configuration="'. __DIR__ .'/config.neon" --autoload-file=' . __DIR__ . '/../../descartes/load.php ' . __DIR__ . '/../../models/',
'php ' . __DIR__ . '/phpstan.phar analyse --configuration="'. __DIR__ .'/config.neon" --autoload-file=' . __DIR__ . '/../../descartes/load.php ' . __DIR__ . '/../../adapters/',
'php ' . __DIR__ . '/phpstan.phar analyse --configuration="'. __DIR__ .'/config.neon" --autoload-file=' . __DIR__ . '/../../descartes/load.php ' . __DIR__ . '/../../daemons/',
]; ];