<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
erickskrauch / php-cs-fixer-custom-fixers example snippets
return (new \PhpCsFixer\Config())
->registerCustomFixers(new \ErickSkrauch\PhpCsFixer\Fixers())
->setRules([
'ErickSkrauch/align_multiline_parameters' => true,
// See the rest of the fixers below
]);
diff
--- Original
+++ New
@@ @@
function foo(
string $string,
- int $index = 0,
- $arg = 'no type',
- ...$variadic,
+ int $index = 0,
+ $arg = 'no type',
+ ...$variadic
): void {}
diff
--- Original
+++ New
@@ @@
public function foo() {
$a = 'this';
$b = 'is';
+
return "$a $b awesome";
}
public function bar() {
$this->foo();
return 'okay';
}
diff
--- Original
+++ New
@@ @@
$a = 123;
if ($a === 123) {
// Do something here
}
+
$b = [1, 2, 3];
foreach ($b as $number) {
if ($number === 3) {
echo 'it is three!';
}
}
+
$c = 'next statement';
diff
--- Original
+++ New
@@ @@
if ($condition1 === 123
- && $condition2 = 321) {
+ && $condition2 = 321
+) {
// Do something here
}
diff
--- Original
+++ New
@@ @@
class Foo implements Serializable {
- public function unserialize($data) {}
+ public function serialize() {}
- public function serialize() {}
+ public function unserialize($data) {}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.