for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* PHP-CS-Fixer plugin for HiDev
*
* @link https://github.com/hiqdev/hidev-php-cs-fixer
* @package hidev-php-cs-fixer
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
*/
namespace hidev\phpcsfixer\controllers;
/**
* Goal for php-cs-fixer.
class PhpCsFixerController extends \hidev\controllers\FileController
{
protected $_before = ['.php_cs'];
public function actionMake()
return $this->runAction('fix');
}
public function actionFix()
$this->runAction('stop-fix');
public function actionStopFix()
return $this->passthru('php-cs-fixer', ['fix', '.']);
array('fix', '.')
array<integer,string,{"0":"string","1":"string"}>
string
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
public function actionCheck()
return $this->passthru('php-cs-fixer', ['fix', '.', '--dry-run']);
array('fix', '.', '--dry-run')
array<integer,string,{"0..."string","2":"string"}>
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: