phpcs & code quality fixes
This commit is contained in:
parent
08d118a842
commit
fbfca80dec
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,3 +14,4 @@ phpunit.xml
|
|||||||
.swp
|
.swp
|
||||||
/nbproject
|
/nbproject
|
||||||
.env
|
.env
|
||||||
|
.php_cs.cache
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
"phpmd": "./vendor/bin/phpmd src text controversial,design,./phpmd.xml",
|
"phpmd": "./vendor/bin/phpmd src text controversial,design,./phpmd.xml",
|
||||||
"phpcs": "./vendor/bin/phpcs -p src --runtime-set testVersion 7.3",
|
"phpcs": "./vendor/bin/phpcs -p src --runtime-set testVersion 7.3",
|
||||||
"phpcbf": "./vendor/bin/phpcbf -p src",
|
"phpcbf": "./vendor/bin/phpcbf -p src",
|
||||||
"test": "composer run-script phpmd && composer run-script phpunit"
|
"test": "composer run-script phpcs && composer run-script phpmd && composer run-script phpunit"
|
||||||
},
|
},
|
||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
|
13
phpcs.xml.dist
Normal file
13
phpcs.xml.dist
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
|
||||||
|
<arg name="basepath" value="."/>
|
||||||
|
<arg name="cache" value=".php_cs.cache"/>
|
||||||
|
<arg name="colors"/>
|
||||||
|
<arg name="extensions" value="php"/>
|
||||||
|
|
||||||
|
<rule ref="PSR2"/>
|
||||||
|
|
||||||
|
<file>src/</file>
|
||||||
|
<file>tests/</file>
|
||||||
|
</ruleset>
|
@ -119,9 +119,12 @@ class Stream implements StreamInterface
|
|||||||
throw $exception;
|
throw $exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
trigger_error(sprintf(
|
trigger_error(
|
||||||
|
sprintf(
|
||||||
'%s::__toString exception: %s',
|
'%s::__toString exception: %s',
|
||||||
self::class, (string) $exception),
|
self::class,
|
||||||
|
(string) $exception
|
||||||
|
),
|
||||||
E_USER_ERROR
|
E_USER_ERROR
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,9 @@ abstract class BaseRequest
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
final public function setMethod(string $method): void {}
|
final public function setMethod(string $method): void
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should return method name for this request.
|
* Should return method name for this request.
|
||||||
|
Loading…
Reference in New Issue
Block a user