mirror of
https://github.com/standardebooks/web.git
synced 2025-07-04 22:00:35 -04:00
PHPStan updates
This commit is contained in:
parent
613d035ebe
commit
f21783d1f8
6 changed files with 36 additions and 49 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"license": "CC0-1.0",
|
||||
"platform":{
|
||||
"platform": {
|
||||
"php": "8.1.2"
|
||||
},
|
||||
"autoload-dev": {
|
||||
|
|
63
composer.lock
generated
63
composer.lock
generated
|
@ -369,16 +369,16 @@
|
|||
},
|
||||
{
|
||||
"name": "ramsey/collection",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ramsey/collection.git",
|
||||
"reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5"
|
||||
"reference": "344572933ad0181accbf4ba763e85a0306a8c5e2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
|
||||
"reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
|
||||
"url": "https://api.github.com/repos/ramsey/collection/zipball/344572933ad0181accbf4ba763e85a0306a8c5e2",
|
||||
"reference": "344572933ad0181accbf4ba763e85a0306a8c5e2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -386,25 +386,22 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"captainhook/plugin-composer": "^5.3",
|
||||
"ergebnis/composer-normalize": "^2.28.3",
|
||||
"fakerphp/faker": "^1.21",
|
||||
"ergebnis/composer-normalize": "^2.45",
|
||||
"fakerphp/faker": "^1.24",
|
||||
"hamcrest/hamcrest-php": "^2.0",
|
||||
"jangregor/phpstan-prophecy": "^1.0",
|
||||
"mockery/mockery": "^1.5",
|
||||
"jangregor/phpstan-prophecy": "^2.1",
|
||||
"mockery/mockery": "^1.6",
|
||||
"php-parallel-lint/php-console-highlighter": "^1.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.3",
|
||||
"phpcsstandards/phpcsutils": "^1.0.0-rc1",
|
||||
"phpspec/prophecy-phpunit": "^2.0",
|
||||
"phpstan/extension-installer": "^1.2",
|
||||
"phpstan/phpstan": "^1.9",
|
||||
"phpstan/phpstan-mockery": "^1.1",
|
||||
"phpstan/phpstan-phpunit": "^1.3",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"psalm/plugin-mockery": "^1.1",
|
||||
"psalm/plugin-phpunit": "^0.18.4",
|
||||
"ramsey/coding-standard": "^2.0.3",
|
||||
"ramsey/conventional-commits": "^1.3",
|
||||
"vimeo/psalm": "^5.4"
|
||||
"php-parallel-lint/php-parallel-lint": "^1.4",
|
||||
"phpspec/prophecy-phpunit": "^2.3",
|
||||
"phpstan/extension-installer": "^1.4",
|
||||
"phpstan/phpstan": "^2.1",
|
||||
"phpstan/phpstan-mockery": "^2.0",
|
||||
"phpstan/phpstan-phpunit": "^2.0",
|
||||
"phpunit/phpunit": "^10.5",
|
||||
"ramsey/coding-standard": "^2.3",
|
||||
"ramsey/conventional-commits": "^1.6",
|
||||
"roave/security-advisories": "dev-latest"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
@ -442,19 +439,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/ramsey/collection/issues",
|
||||
"source": "https://github.com/ramsey/collection/tree/2.0.0"
|
||||
"source": "https://github.com/ramsey/collection/tree/2.1.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/ramsey",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/ramsey/collection",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-12-31T21:50:55+00:00"
|
||||
"time": "2025-03-22T05:38:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "ramsey/uuid",
|
||||
|
@ -954,16 +941,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "2.1.6",
|
||||
"version": "2.1.11",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "6eaec7c6c9e90dcfe46ad1e1ffa5171e2dab641c"
|
||||
"reference": "8ca5f79a8f63c49b2359065832a654e1ec70ac30"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/6eaec7c6c9e90dcfe46ad1e1ffa5171e2dab641c",
|
||||
"reference": "6eaec7c6c9e90dcfe46ad1e1ffa5171e2dab641c",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/8ca5f79a8f63c49b2359065832a654e1ec70ac30",
|
||||
"reference": "8ca5f79a8f63c49b2359065832a654e1ec70ac30",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1008,7 +995,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-02-19T15:46:42+00:00"
|
||||
"time": "2025-03-24T13:45:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "thecodingmachine/phpstan-safe-rule",
|
||||
|
|
|
@ -29,7 +29,7 @@ use function Safe\unlink;
|
|||
* @property ?User $Submitter
|
||||
* @property ?User $Reviewer
|
||||
*/
|
||||
class Artwork{
|
||||
final class Artwork{
|
||||
use Traits\Accessor;
|
||||
use Traits\PropertyFromHttp;
|
||||
|
||||
|
|
|
@ -138,15 +138,14 @@ class HttpInput{
|
|||
return true;
|
||||
}
|
||||
}
|
||||
elseif(sizeof($_FILES) > 0){
|
||||
// We received files but may have an error because the size exceeded our limit.
|
||||
foreach($_FILES as $file){
|
||||
/** @var array<string, int> $file */
|
||||
$error = $file['error'] ?? UPLOAD_ERR_OK;
|
||||
|
||||
if($error == UPLOAD_ERR_INI_SIZE || $error == UPLOAD_ERR_FORM_SIZE){
|
||||
return true;
|
||||
}
|
||||
// We received files but may have an error because the size exceeded our limit.
|
||||
foreach($_FILES as $file){
|
||||
/** @var array<string, int> $file */
|
||||
$error = $file['error'] ?? UPLOAD_ERR_OK;
|
||||
|
||||
if($error == UPLOAD_ERR_INI_SIZE || $error == UPLOAD_ERR_FORM_SIZE){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ abstract class OpdsFeed extends AtomFeed{
|
|||
|
||||
$this->Updated = $updated;
|
||||
|
||||
/** @phpstan-ignore-next-line */
|
||||
unset($this->_XmlString);
|
||||
file_put_contents($this->Path, $this->GetXmlString());
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ $feedType = '';
|
|||
$requestUri = $_SERVER['REQUEST_URI'] ?? '';
|
||||
preg_match('/^\/feeds\/(opds|rss|atom)/ius', $requestUri, $matches);
|
||||
|
||||
if(sizeof($matches) > 0){
|
||||
if(isset($matches[1])){
|
||||
$feedType = Enums\FeedType::tryFrom(strtolower($matches[1]));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue