Added phpstan as a dev dependency.
This commit is contained in:
parent
761bc94b8e
commit
9962bbc5df
4 changed files with 71 additions and 7 deletions
|
@ -29,5 +29,8 @@
|
||||||
"composer/installers": true,
|
"composer/installers": true,
|
||||||
"wikimedia/composer-merge-plugin": false
|
"wikimedia/composer-merge-plugin": false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpstan/phpstan": "^1.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
67
composer.lock
generated
67
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "157cc1ef2fbb3b5667fd0b539ce87b27",
|
"content-hash": "c76eb19b0eb02b6a9fccb4b63f50d165",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "chillerlan/php-qrcode",
|
"name": "chillerlan/php-qrcode",
|
||||||
|
@ -1545,7 +1545,70 @@
|
||||||
"time": "2023-06-08T12:52:13+00:00"
|
"time": "2023-06-08T12:52:13+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [
|
||||||
|
{
|
||||||
|
"name": "phpstan/phpstan",
|
||||||
|
"version": "1.10.26",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/phpstan/phpstan.git",
|
||||||
|
"reference": "5d660cbb7e1b89253a47147ae44044f49832351f"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/5d660cbb7e1b89253a47147ae44044f49832351f",
|
||||||
|
"reference": "5d660cbb7e1b89253a47147ae44044f49832351f",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.2|^8.0"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"phpstan/phpstan-shim": "*"
|
||||||
|
},
|
||||||
|
"bin": [
|
||||||
|
"phpstan",
|
||||||
|
"phpstan.phar"
|
||||||
|
],
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"bootstrap.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"description": "PHPStan - PHP Static Analysis Tool",
|
||||||
|
"keywords": [
|
||||||
|
"dev",
|
||||||
|
"static analysis"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"docs": "https://phpstan.org/user-guide/getting-started",
|
||||||
|
"forum": "https://github.com/phpstan/phpstan/discussions",
|
||||||
|
"issues": "https://github.com/phpstan/phpstan/issues",
|
||||||
|
"security": "https://github.com/phpstan/phpstan/security/policy",
|
||||||
|
"source": "https://github.com/phpstan/phpstan-src"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/ondrejmirtes",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/phpstan",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2023-07-19T12:44:37+00:00"
|
||||||
|
}
|
||||||
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"stability-flags": {
|
"stability-flags": {
|
||||||
|
|
|
@ -83,7 +83,7 @@ class ClientInfo implements Stringable {
|
||||||
if($version < 0 || $version > self::SERIALIZE_VERSION)
|
if($version < 0 || $version > self::SERIALIZE_VERSION)
|
||||||
throw new RuntimeException('$data does not contain a valid version argument');
|
throw new RuntimeException('$data does not contain a valid version argument');
|
||||||
|
|
||||||
return new static(
|
return new ClientInfo(
|
||||||
$data['bot'] ?? null,
|
$data['bot'] ?? null,
|
||||||
$data['client'] ?? null,
|
$data['client'] ?? null,
|
||||||
$data['os'] ?? null,
|
$data['os'] ?? null,
|
||||||
|
@ -108,7 +108,7 @@ class ClientInfo implements Stringable {
|
||||||
|
|
||||||
$dd->parse();
|
$dd->parse();
|
||||||
|
|
||||||
return new static(
|
return new ClientInfo(
|
||||||
$dd->getBot(),
|
$dd->getBot(),
|
||||||
$dd->getClient(),
|
$dd->getClient(),
|
||||||
$dd->getOs(),
|
$dd->getOs(),
|
||||||
|
|
|
@ -9,11 +9,9 @@ use Misuzu\DbStatementCache;
|
||||||
use Misuzu\Users\User;
|
use Misuzu\Users\User;
|
||||||
|
|
||||||
class ProfileFields {
|
class ProfileFields {
|
||||||
private IDbConnection $dbConn;
|
|
||||||
private DbStatementCache $cache;
|
private DbStatementCache $cache;
|
||||||
|
|
||||||
public function __construct(IDbConnection $dbConn) {
|
public function __construct(IDbConnection $dbConn) {
|
||||||
$this->dbConn = $dbConn;
|
|
||||||
$this->cache = new DbStatementCache($dbConn);
|
$this->cache = new DbStatementCache($dbConn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +208,7 @@ class ProfileFields {
|
||||||
|
|
||||||
foreach($fieldInfos as $key => $fieldInfo) {
|
foreach($fieldInfos as $key => $fieldInfo) {
|
||||||
if(is_string($fieldInfo))
|
if(is_string($fieldInfo))
|
||||||
$fieldInfo = $this->getField($fieldId);
|
$fieldInfo = $this->getField($fieldInfo);
|
||||||
elseif(!($fieldInfo instanceof ProfileFieldInfo))
|
elseif(!($fieldInfo instanceof ProfileFieldInfo))
|
||||||
throw new InvalidArgumentException('Entries of $fieldInfos must either be field IDs or instances of ProfileFieldInfo.');
|
throw new InvalidArgumentException('Entries of $fieldInfos must either be field IDs or instances of ProfileFieldInfo.');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue