diff --git a/classes/feeditem/atom.php b/classes/feeditem/atom.php
index cac6d8c54..6de790ff9 100755
--- a/classes/feeditem/atom.php
+++ b/classes/feeditem/atom.php
@@ -43,7 +43,8 @@ class FeedItem_Atom extends FeedItem_Common {
$links = $this->elem->getElementsByTagName("link");
foreach ($links as $link) {
- if ($link && $link->hasAttribute("href") &&
+ /** @phpstan-ignore-next-line */
+ if ($link->hasAttribute("href") &&
(!$link->hasAttribute("rel")
|| $link->getAttribute("rel") == "alternate"
|| $link->getAttribute("rel") == "standout")) {
@@ -180,7 +181,8 @@ class FeedItem_Atom extends FeedItem_Common {
$encs = [];
foreach ($links as $link) {
- if ($link && $link->hasAttribute("href") && $link->hasAttribute("rel")) {
+ /** @phpstan-ignore-next-line */
+ if ($link->hasAttribute("href") && $link->hasAttribute("rel")) {
$base = $this->xpath->evaluate("string(ancestor-or-self::*[@xml:base][1]/@xml:base)", $link);
if ($link->getAttribute("rel") == "enclosure") {
diff --git a/classes/feeds.php b/classes/feeds.php
index fee0a7708..8981d6f14 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -248,11 +248,12 @@ class Feeds extends Handler_Protected {
function ($result, $plugin) use (&$line, &$button_doc) {
if ($result && $button_doc->loadXML($result)) {
- /** @var DOMElement|null */
+ /** @var DOMElement|null $child */
$child = $button_doc->firstChild;
if ($child) {
do {
+ /** @var DOMElement|null $child */
$child->setAttribute('data-plugin-name', get_class($plugin));
} while ($child = $child->nextSibling);
@@ -271,11 +272,12 @@ class Feeds extends Handler_Protected {
function ($result, $plugin) use (&$line, &$button_doc) {
if ($result && $button_doc->loadXML($result)) {
- /** @var DOMElement|null */
+ /** @var DOMElement|null $child */
$child = $button_doc->firstChild;
if ($child) {
do {
+ /** @var DOMElement|null $child */
$child->setAttribute('data-plugin-name', get_class($plugin));
} while ($child = $child->nextSibling);
diff --git a/classes/pref/filters.php b/classes/pref/filters.php
index 8f1c578b6..e7c7877a7 100755
--- a/classes/pref/filters.php
+++ b/classes/pref/filters.php
@@ -115,6 +115,7 @@ class Pref_Filters extends Handler_Protected {
$glue = $filter['match_any_rule'] ? " OR " : " AND ";
$scope_qpart = join($glue, $scope_qparts);
+ /** @phpstan-ignore-next-line */
if (!$scope_qpart) $scope_qpart = "true";
$rv = array();
diff --git a/classes/rssutils.php b/classes/rssutils.php
index 384830556..e039284f2 100755
--- a/classes/rssutils.php
+++ b/classes/rssutils.php
@@ -662,7 +662,7 @@ class RSSUtils {
print_r($item);
}
- if (ini_get("max_execution_time") > 0 && time() - $tstart >= ini_get("max_execution_time") * 0.7) {
+ if (ini_get("max_execution_time") > 0 && time() - $tstart >= ((float)ini_get("max_execution_time") * 0.7)) {
Debug::log("looks like there's too many articles to process at once, breaking out.", Debug::LOG_VERBOSE);
$pdo->commit();
break;
diff --git a/composer.json b/composer.json
index 8d00077dc..4c93039ee 100644
--- a/composer.json
+++ b/composer.json
@@ -13,7 +13,7 @@
"j4mie/idiorm": "dev-master"
},
"require-dev": {
- "phpstan/phpstan": "1.1.2",
+ "phpstan/phpstan": "1.8.2",
"phpunit/phpunit": "9.5.16"
}
}
diff --git a/composer.lock b/composer.lock
index df4c441c9..aa18e8ebc 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "26f1906259c39e542432c57d76f16369",
+ "content-hash": "6beda4561e770d2f0c7c532c5e3693d3",
"packages": [
{
"name": "beberlei/assert",
@@ -75,20 +75,20 @@
},
{
"name": "chillerlan/php-qrcode",
- "version": "4.3.3",
+ "version": "4.3.4",
"source": {
"type": "git",
"url": "https://github.com/chillerlan/php-qrcode.git",
- "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3"
+ "reference": "2ca4bf5ae048af1981d1023ee42a0a2a9d51e51d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/6356b246948ac1025882b3f55e7c68ebd4515ae3",
- "reference": "6356b246948ac1025882b3f55e7c68ebd4515ae3",
+ "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/2ca4bf5ae048af1981d1023ee42a0a2a9d51e51d",
+ "reference": "2ca4bf5ae048af1981d1023ee42a0a2a9d51e51d",
"shasum": ""
},
"require": {
- "chillerlan/php-settings-container": "^2.1",
+ "chillerlan/php-settings-container": "^2.1.4",
"ext-mbstring": "*",
"php": "^7.4 || ^8.0"
},
@@ -137,7 +137,7 @@
],
"support": {
"issues": "https://github.com/chillerlan/php-qrcode/issues",
- "source": "https://github.com/chillerlan/php-qrcode/tree/4.3.3"
+ "source": "https://github.com/chillerlan/php-qrcode/tree/4.3.4"
},
"funding": [
{
@@ -149,7 +149,7 @@
"type": "ko_fi"
}
],
- "time": "2021-11-25T22:38:09+00:00"
+ "time": "2022-07-25T09:12:45+00:00"
},
{
"name": "chillerlan/php-settings-container",
@@ -467,16 +467,16 @@
},
{
"name": "thecodingmachine/safe",
- "version": "v2.2.1",
+ "version": "v2.2.2",
"source": {
"type": "git",
"url": "https://github.com/thecodingmachine/safe.git",
- "reference": "2a8d758fd17763faf86e4aa798193e17b9fac38c"
+ "reference": "440284f9592c9df402832452a6871a8b3c48d97e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/2a8d758fd17763faf86e4aa798193e17b9fac38c",
- "reference": "2a8d758fd17763faf86e4aa798193e17b9fac38c",
+ "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/440284f9592c9df402832452a6871a8b3c48d97e",
+ "reference": "440284f9592c9df402832452a6871a8b3c48d97e",
"shasum": ""
},
"require": {
@@ -599,9 +599,9 @@
"description": "PHP core functions that throw exceptions instead of returning FALSE on error",
"support": {
"issues": "https://github.com/thecodingmachine/safe/issues",
- "source": "https://github.com/thecodingmachine/safe/tree/v2.2.1"
+ "source": "https://github.com/thecodingmachine/safe/tree/v2.2.2"
},
- "time": "2022-06-09T15:36:45+00:00"
+ "time": "2022-07-20T17:46:34+00:00"
}
],
"packages-dev": [
@@ -1130,20 +1130,20 @@
},
{
"name": "phpstan/phpstan",
- "version": "1.1.2",
+ "version": "1.8.2",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "bcea0ae85868a89d5789c75f012c93129f842934"
+ "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/bcea0ae85868a89d5789c75f012c93129f842934",
- "reference": "bcea0ae85868a89d5789c75f012c93129f842934",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c53312ecc575caf07b0e90dee43883fdf90ca67c",
+ "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c",
"shasum": ""
},
"require": {
- "php": "^7.1|^8.0"
+ "php": "^7.2|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
@@ -1153,11 +1153,6 @@
"phpstan.phar"
],
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
"autoload": {
"files": [
"bootstrap.php"
@@ -1170,7 +1165,7 @@
"description": "PHPStan - PHP Static Analysis Tool",
"support": {
"issues": "https://github.com/phpstan/phpstan/issues",
- "source": "https://github.com/phpstan/phpstan/tree/1.1.2"
+ "source": "https://github.com/phpstan/phpstan/tree/1.8.2"
},
"funding": [
{
@@ -1190,7 +1185,7 @@
"type": "tidelift"
}
],
- "time": "2021-11-09T12:41:09+00:00"
+ "time": "2022-07-20T09:57:31+00:00"
},
{
"name": "phpunit/php-code-coverage",
@@ -2695,5 +2690,5 @@
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
- "plugin-api-version": "2.1.0"
+ "plugin-api-version": "2.0.0"
}
diff --git a/vendor/chillerlan/php-qrcode/.github/workflows/tests.yml b/vendor/chillerlan/php-qrcode/.github/workflows/tests.yml
index 07cf16cb7..9b26bb201 100644
--- a/vendor/chillerlan/php-qrcode/.github/workflows/tests.yml
+++ b/vendor/chillerlan/php-qrcode/.github/workflows/tests.yml
@@ -24,7 +24,7 @@ jobs:
steps:
- name: "Checkout"
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: "Install PHP"
uses: shivammathur/setup-php@v2
@@ -62,7 +62,7 @@ jobs:
# run: git config --global core.autocrlf false
- name: "Checkout"
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v2
@@ -79,6 +79,4 @@ jobs:
run: php vendor/bin/phpunit --configuration=phpunit.xml
- name: "Send code coverage report to Codecov.io"
- uses: codecov/codecov-action@v1
- with:
- token: ${{ secrets.CODECOV_TOKEN }}
+ uses: codecov/codecov-action@v3
diff --git a/vendor/chillerlan/php-qrcode/README.md b/vendor/chillerlan/php-qrcode/README.md
index 21df49dee..f266e9bd5 100644
--- a/vendor/chillerlan/php-qrcode/README.md
+++ b/vendor/chillerlan/php-qrcode/README.md
@@ -3,17 +3,19 @@
A PHP 7.4+ QR Code library based on the [implementation](https://github.com/kazuhikoarase/qrcode-generator) by [Kazuhiko Arase](https://github.com/kazuhikoarase),
namespaced, cleaned up, improved and other stuff.
+**Attention:** there is now also a javascript port: [chillerlan/js-qrcode](https://github.com/chillerlan/js-qrcode).
+
[![PHP Version Support][php-badge]][php]
[![Packagist version][packagist-badge]][packagist]
[![License][license-badge]][license]
[![CodeCov][coverage-badge]][coverage]
[![Scrunitizer CI][scrutinizer-badge]][scrutinizer]
[![Packagist downloads][downloads-badge]][downloads]
-[![Continuous Integration][gh-action-badge]][gh-action]
+[![Continuous Integration][gh-action-badge]][gh-action]
[php-badge]: https://img.shields.io/packagist/php-v/chillerlan/php-qrcode?logo=php&color=8892BF
[php]: https://www.php.net/supported-versions.php
-[packagist-badge]: https://img.shields.io/packagist/v/chillerlan/php-qrcode.svg
+[packagist-badge]: https://img.shields.io/packagist/v/chillerlan/php-qrcode.svg?logo=packagist
[packagist]: https://packagist.org/packages/chillerlan/php-qrcode
[license-badge]: https://img.shields.io/github/license/chillerlan/php-qrcode.svg
[license]: https://github.com/chillerlan/php-qrcode/blob/main/LICENSE
@@ -21,47 +23,48 @@ namespaced, cleaned up, improved and other stuff.
[coverage]: https://codecov.io/github/chillerlan/php-qrcode
[scrutinizer-badge]: https://img.shields.io/scrutinizer/g/chillerlan/php-qrcode.svg?logo=scrutinizer
[scrutinizer]: https://scrutinizer-ci.com/g/chillerlan/php-qrcode
-[downloads-badge]: https://img.shields.io/packagist/dt/chillerlan/php-qrcode.svg
+[downloads-badge]: https://img.shields.io/packagist/dt/chillerlan/php-qrcode.svg?logo=packagist
[downloads]: https://packagist.org/packages/chillerlan/php-qrcode/stats
[gh-action-badge]: https://github.com/chillerlan/php-qrcode/workflows/Continuous%20Integration/badge.svg
[gh-action]: https://github.com/chillerlan/php-qrcode/actions?query=workflow%3A%22Continuous+Integration%22+branch%3Av4.3.x
-## Documentation
+# Documentation
-See [the wiki](https://github.com/chillerlan/php-qrcode/wiki) for advanced documentation.
-An API documentation created with [phpDocumentor](https://www.phpdoc.org/) can be found at https://chillerlan.github.io/php-qrcode/ (WIP).
-
-### Requirements
+## Requirements
- PHP 7.4+
- `ext-mbstring`
- - optional:
+ - optional:
- `ext-json`, `ext-gd`
- `ext-imagick` with [ImageMagick](https://imagemagick.org) installed
- [`setasign/fpdf`](https://github.com/setasign/fpdf) for the PDF output module
-### Installation
+## Installation
**requires [composer](https://getcomposer.org)**
via terminal: `composer require chillerlan/php-qrcode`
-*composer.json*
+*composer.json*
```json
{
"require": {
- "php": "^7.4",
- "chillerlan/php-qrcode": "dev-main"
+ "php": "^7.4 || ^8.0",
+ "chillerlan/php-qrcode": "v4.3.x-dev"
}
}
```
-Note: replace `dev-main` with a [version constraint](https://getcomposer.org/doc/articles/versions.md#writing-version-constraints), e.g. `^3.2` - see [releases](https://github.com/chillerlan/php-qrcode/releases) for valid versions.
-For PHP version ...
+Note: replace `v4.3.x-dev` with a [version constraint](https://getcomposer.org/doc/articles/versions.md#writing-version-constraints), e.g. `^4.3` - see [releases](https://github.com/chillerlan/php-qrcode/releases) for valid versions.
+For PHP version ...
- 7.4+ use `^4.3`
- - 7.2+ use `^3.4.1` (PHP 7.2 is EOL and 7.3 soon! v3.4.1 also supports PHP8 - however, it's no longer supported)
- - 7.0+ use `^2.0` (PHP 7.0 and 7.1 are EOL!)
+ - 7.2+ use `^3.4.1` (v3.4.1 also supports PHP8)
+ - 7.0+ use `^2.0`
- 5.6+ use `^1.0` (please let PHP 5 die!)
-### Quickstart
+In case you want to keep using `v4.3.x-dev`, specify the hash of a commit to avoid running into unforseen issues like so: `v4.3.x-dev#c115f7bc51d466ccb24c544e88329804aad8c2a0`
+
+PSA: [PHP 7.0 - 7.3 are EOL](https://www.php.net/supported-versions.php) and therefore the respective `QRCode` versions are also no longer supported!
+
+## Quickstart
We want to encode this URI for a mobile authenticator into a QRcode image:
```php
$data = 'otpauth://totp/test?secret=B3JX4VCVJDVNXNZ5&issuer=chillerlan.net';
@@ -71,33 +74,349 @@ echo '';
```
- - + +
-Wait, what was that? Please again, slower! See [Advanced usage](https://github.com/chillerlan/php-qrcode/wiki/Advanced-usage) on the wiki. +Wait, what was that? Please again, slower! -### Framework Integration -- Drupal [Google Authenticator Login `ga_login`](https://www.drupal.org/project/ga_login) -- WordPress [`wp-two-factor-auth`](https://github.com/sjinks/wp-two-factor-auth) -- WordPress [Simple 2FA `simple-2fa`](https://wordpress.org/plugins/simple-2fa/) -- WoltLab Suite [two-step-verification](http://pluginstore.woltlab.com/file/3007-two-step-verification/) -- [Cachet](https://github.com/CachetHQ/Cachet) + +## Advanced usage + +Ok, step by step. First you'll need a `QRCode` instance, which can be optionally invoked with a `QROptions` (or a [`SettingsContainerInterface`](https://github.com/chillerlan/php-settings-container/blob/master/src/SettingsContainerInterface.php), respectively) object as the only parameter. + +```php +$options = new QROptions([ + 'version' => 5, + 'outputType' => QRCode::OUTPUT_MARKUP_SVG, + 'eccLevel' => QRCode::ECC_L, +]); + +// invoke a fresh QRCode instance +$qrcode = new QRCode($options); + +// and dump the output +$qrcode->render($data); + +// ...with additional cache file +$qrcode->render($data, '/path/to/file.svg'); +``` + +In case you just want the raw QR code matrix, call `QRCode::getMatrix()` - this method is also called internally from `QRCode::render()`. See also [[Custom output interface]]. + +```php +$matrix = $qrcode->getMatrix($data); + +foreach($matrix->matrix() as $y => $row){ + foreach($row as $x => $module){ + + // get a module's value + $value = $module; + + // or via the matrix's getter method + $value = $matrix->get($x, $y); + + // boolean check a module + if($matrix->check($x, $y)){ // if($module >> 8 > 0) + // do stuff, the module is dark + } + else{ + // do other stuff, the module is light + } + + } +} +``` + +Have a look [in the examples folder](https://github.com/chillerlan/php-qrcode/tree/main/examples) for some more usage examples. + +### Notes +The QR encoder, especially the subroutines for mask pattern testing, can cause high CPU load on increased matrix size. +You can avoid a part of this load by choosing a fast output module, like `OUTPUT_IMAGE_*` and maybe setting the mask pattern manually (which may result in unreadable QR Codes). +Oh hey and don't forget to sanitize any user input! + + +## Custom output interface + +Instead of bloating your code you can simply create your own output interface by creating a `QROutputInterface` (i.e. extending `QROutputAbstract`). + +```php +class MyCustomOutput extends QROutputAbstract{ + + // inherited from QROutputAbstract + protected QRMatrix $matrix; // QRMatrix + protected int $moduleCount; // modules QRMatrix::size() + protected QROptions $options; // MyCustomOptions or QROptions + protected int $scale; // scale factor from options + protected int $length; // length of the matrix ($moduleCount * $scale) + + // ...check/set default module values (abstract method, called by the constructor) + protected function setModuleValues():void{ + // $this->moduleValues = ... + } + + // QROutputInterface::dump() + public function dump(string $file = null):string{ + $output = ''; + + for($row = 0; $row < $this->moduleCount; $row++){ + for($col = 0; $col < $this->moduleCount; $col++){ + $output .= (int)$this->matrix->check($col, $row); + } + } + + return $output; + } + +} +``` +For more examples, have a look at the [built-in output modules](https://github.com/chillerlan/php-qrcode/tree/main/src/Output). + +In case you need additional settings for your output module, just extend `QROptions`... +``` +class MyCustomOptions extends QROptions{ + protected string $myParam = 'defaultValue'; + + // ... +} +``` +...or use the [`SettingsContainerInterface`](https://github.com/chillerlan/php-settings-container/blob/main/src/SettingsContainerInterface.php), which is the more flexible approach. + +```php +trait MyCustomOptionsTrait{ + protected string $myParam = 'defaultValue'; + + // ... +} +``` +set the options: +```php +$myOptions = [ + 'version' => 5, + 'eccLevel' => QRCode::ECC_L, + 'outputType' => QRCode::OUTPUT_CUSTOM, + 'outputInterface' => MyCustomOutput::class, + // your custom settings + 'myParam' => 'whatever value', + ]; + +// extends QROptions +$myCustomOptions = new MyCustomOptions($myOptions); + +// using the SettingsContainerInterface +$myCustomOptions = new class($myOptions) extends SettingsContainerAbstract{ + use QROptionsTrait, MyCustomOptionsTrait; +}; + +``` + +You can then call `QRCode` with the custom modules... +```php +(new QRCode($myCustomOptions))->render($data); +``` +...or invoke the `QROutputInterface` manually. +```php +$qrOutputInterface = new MyCustomOutput($myCustomOptions, (new QRCode($myCustomOptions))->getMatrix($data)); + +//dump the output, which is equivalent to QRCode::render() +$qrOutputInterface->dump(); +``` + +### Custom module values + +You can distinguish between different parts of the matrix, namely the several required patterns from the QR Code specification, and use them in different ways, i.e. to assign different colors for each part of the matrix (see the [image example](https://github.com/chillerlan/php-qrcode/blob/main/examples/image.php)). +The dark value is the module value (light) shifted by 8 bits to the left: `$value = $M_TYPE << ($bool ? 8 : 0);`, where `$M_TYPE` is one of the `QRMatrix::M_*` constants. +You can check the value for a type explicitly like... +```php +// for true (dark) +($value >> 8) === $M_TYPE; + +// for false (light) +$value === $M_TYPE; +``` +...or you can perform a loose check, ignoring the module value +```php +// for true +($value >> 8) > 0; + +// for false +($value >> 8) === 0; +``` + +See also `QRMatrix::set()`, `QRMatrix::check()` and [`QRMatrix` constants](#qrmatrix-constants). + +To map the values and properly render the modules for the given `QROutputInterface`, it's necessary to overwrite the default values: +```php +$options = new QROptions; + +// for HTML, SVG and ImageMagick +$options->moduleValues = [ + // finder + 1536 => '#A71111', // dark (true) + 6 => '#FFBFBF', // light (false) + // alignment + 2560 => '#A70364', + 10 => '#FFC9C9', + // timing + 3072 => '#98005D', + 12 => '#FFB8E9', + // format + 3584 => '#003804', + 14 => '#00FB12', + // version + 4096 => '#650098', + 16 => '#E0B8FF', + // data + 1024 => '#4A6000', + 4 => '#ECF9BE', + // darkmodule + 512 => '#080063', + // separator + 8 => '#AFBFBF', + // quietzone + 18 => '#FFFFFF', +]; + +// for the image output types +$options->moduleValues = [ + 512 => [0, 0, 0], + // ... +]; + +// for string/text output +$options->moduleValues = [ + 512 => '#', + // ... +]; +``` + + +## Public API + +### `QRCode` API +#### Methods +method | return | description +------ | ------ | ----------- +`__construct(QROptions $options = null)` | - | see [`SettingsContainerInterface`](https://github.com/chillerlan/php-settings-container/blob/main/src/SettingsContainerInterface.php) +`render(string $data, string $file = null)` | mixed, `QROutputInterface::dump()` | renders a QR Code for the given `$data` and `QROptions`, saves `$file` optional +`getMatrix(string $data)` | `QRMatrix` | returns a `QRMatrix` object for the given `$data` and current `QROptions` +`initDataInterface(string $data)` | `QRDataInterface` | returns a fresh `QRDataInterface` for the given `$data` +`isNumber(string $string)` | bool | checks if a string qualifies for `Number` +`isAlphaNum(string $string)` | bool | checks if a string qualifies for `AlphaNum` +`isKanji(string $string)` | bool | checks if a string qualifies for `Kanji` +`isByte(string $string)` | bool | checks if a string is non-empty + +#### Constants +name | description +---- | ----------- +`VERSION_AUTO` | `QROptions::$version` +`MASK_PATTERN_AUTO` | `QROptions::$maskPattern` +`OUTPUT_MARKUP_SVG`, `OUTPUT_MARKUP_HTML` | `QROptions::$outputType` markup +`OUTPUT_IMAGE_PNG`, `OUTPUT_IMAGE_JPG`, `OUTPUT_IMAGE_GIF` | `QROptions::$outputType` image +`OUTPUT_STRING_JSON`, `OUTPUT_STRING_TEXT` | `QROptions::$outputType` string +`OUTPUT_IMAGICK` | `QROptions::$outputType` ImageMagick +`OUTPUT_FPDF` | `QROptions::$outputType` PDF, using [FPDF](https://github.com/setasign/fpdf) +`OUTPUT_CUSTOM` | `QROptions::$outputType`, requires `QROptions::$outputInterface` +`ECC_L`, `ECC_M`, `ECC_Q`, `ECC_H`, | ECC-Level: 7%, 15%, 25%, 30% in `QROptions::$eccLevel` +`DATA_NUMBER`, `DATA_ALPHANUM`, `DATA_BYTE`, `DATA_KANJI` | `QRDataInterface::$datamode` + + +### `QRMatrix` API + +#### Methods +method | return | description +------ | ------ | ----------- +`__construct(int $version, int $eclevel)` | - | - +`init(int $maskPattern, bool $test = null)` | `QRMatrix` | +`matrix()` | array | the internal matrix representation as a 2 dimensional array +`version()` | int | the current QR Code version +`eccLevel()` | int | current ECC level +`maskPattern()` | int | the used mask pattern +`size()` | int | the absoulute size of the matrix, including quiet zone (if set). `$version * 4 + 17 + 2 * $quietzone` +`get(int $x, int $y)` | int | returns the value of the module +`set(int $x, int $y, bool $value, int $M_TYPE)` | `QRMatrix` | sets the `$M_TYPE` value for the module +`check(int $x, int $y)` | bool | checks whether a module is true (dark) or false (light) + +#### Constants +name | light (false) | dark (true) | description +---- | ------------- | ----------- | ----------- +`M_NULL` | 0 | - | module not set (should never appear. if so, there's an error) +`M_DARKMODULE` | - | 512 | once per matrix at `$xy = [8, 4 * $version + 9]` +`M_DATA` | 4 | 1024 | the actual encoded data +`M_FINDER` | 6 | 1536 | the 7x7 finder patterns +`M_SEPARATOR` | 8 | - | separator lines around the finder patterns +`M_ALIGNMENT` | 10 | 2560 | the 5x5 alignment patterns +`M_TIMING` | 12 | 3072 | the timing pattern lines +`M_FORMAT` | 14 | 3584 | format information pattern +`M_VERSION` | 16 | 4096 | version information pattern +`M_QUIETZONE` | 18 | - | margin around the QR Code +`M_LOGO` | 20 | - | space for a logo image (not used yet) +`M_TEST` | 255 | 65280 | test value + +### `QROptions` API + +#### Properties +property | type | default | allowed | description +-------- | ---- | ------- | ------- | ----------- +`$version` | int | `QRCode::VERSION_AUTO` | 1...40 | the [QR Code version number](http://www.qrcode.com/en/about/version.html) +`$versionMin` | int | 1 | 1...40 | Minimum QR version (if `$version = QRCode::VERSION_AUTO`) +`$versionMax` | int | 40 | 1...40 | Maximum QR version (if `$version = QRCode::VERSION_AUTO`) +`$eccLevel` | int | `QRCode::ECC_L` | `QRCode::ECC_X` | Error correct level, where X = L (7%), M (15%), Q (25%), H (30%) +`$maskPattern` | int | `QRCode::MASK_PATTERN_AUTO` | 0...7 | Mask Pattern to use +`$addQuietzone` | bool | `true` | - | Add a "quiet zone" (margin) according to the QR code spec +`$quietzoneSize` | int | 4 | clamped to 0 ... `$matrixSize / 2` | Size of the quiet zone +`$dataModeOverride` | string | `null` | `Number`, `AlphaNum`, `Kanji`, `Byte` | allows overriding the data type detection +`$outputType` | string | `QRCode::OUTPUT_IMAGE_PNG` | `QRCode::OUTPUT_*` | built-in output type +`$outputInterface` | string | `null` | * | FQCN of the custom `QROutputInterface` if `QROptions::$outputType` is set to `QRCode::OUTPUT_CUSTOM` +`$cachefile` | string | `null` | * | optional cache file path +`$eol` | string | `PHP_EOL` | * | newline string (HTML, SVG, TEXT) +`$scale` | int | 5 | * | size of a QR code pixel (SVG, IMAGE_*), HTML -> via CSS +`$cssClass` | string | `null` | * | a common css class +`$svgOpacity` | float | 1.0 | 0...1 | +`$svgDefs` | string | * | * | anything between [`
-
+
@@ -26,13 +26,13 @@ can be checked before you run the actual line.
-
+
-
+
@@ -40,9 +40,9 @@ can be checked before you run the actual line.
-
+
-
+
@@ -53,6 +53,14 @@ can be checked before you run the actual line.
+
+
+
+
+
+
+
+
[**You can now sponsor my open-source work on PHPStan through GitHub Sponsors.**](https://github.com/sponsors/ondrejmirtes)
@@ -69,6 +77,7 @@ All the documentation lives on the [phpstan.org website](https://phpstan.org/):
* [PHPDocs Basics](https://phpstan.org/writing-php-code/phpdocs-basics) &Â [PHPDoc Types](https://phpstan.org/writing-php-code/phpdoc-types)
* [Extension Library](https://phpstan.org/user-guide/extension-library)
* [Developing Extensions](https://phpstan.org/developing-extensions/extension-types)
+* [API Reference](https://apiref.phpstan.org/)
## PHPStan Pro
diff --git a/vendor/phpstan/phpstan/composer.json b/vendor/phpstan/phpstan/composer.json
index 2c9e27962..498cc3816 100644
--- a/vendor/phpstan/phpstan/composer.json
+++ b/vendor/phpstan/phpstan/composer.json
@@ -3,7 +3,7 @@
"description": "PHPStan - PHP Static Analysis Tool",
"license": ["MIT"],
"require": {
- "php": "^7.1|^8.0"
+ "php": "^7.2|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
@@ -12,11 +12,6 @@
"phpstan",
"phpstan.phar"
],
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
"autoload": {
"files": ["bootstrap.php"]
}
diff --git a/vendor/phpstan/phpstan/phpstan.phar b/vendor/phpstan/phpstan/phpstan.phar
index 306020e3a..d2a91a0d5 100755
Binary files a/vendor/phpstan/phpstan/phpstan.phar and b/vendor/phpstan/phpstan/phpstan.phar differ
diff --git a/vendor/phpstan/phpstan/phpstan.phar.asc b/vendor/phpstan/phpstan/phpstan.phar.asc
index 9110c4aa3..d6e96fbf5 100644
--- a/vendor/phpstan/phpstan/phpstan.phar.asc
+++ b/vendor/phpstan/phpstan/phpstan.phar.asc
@@ -1,16 +1,16 @@
-----BEGIN PGP SIGNATURE-----
-iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmGKbGQACgkQzxoQjQ56
-5yAy7BAAgT9+V81RuOMz6F16uqm4gXH1ebioWokEvVb6ZR2fk7p3/m14STmmRkwe
-MIkxzWKtx/wSC6VafqAtkBPNxpo2j5QU0pmfMAvkPHh79d2lWmUaJmF71I/DCNnh
-pcZNJLe5x+YTDKU6NnwMlyZEvdaWmyJ2MCf2apBZIJ7axefEJRVVin2pshhXwbtN
-dHhrT9yFYe/vqOkOLtGDWw+yT1I6he7IpoYZUTyO9b7eadC0ga6Bet7jibNL8JBE
-cGcB2MFg9bvif0PgIOio0jQXAWjf0ZBXPvoOwTRCqq/UOPTL8SRtiflAFiFOAzk/
-FRQVC0+26NsGx7R8kS5FZNOHYTIElY1ElyzFk8HWgqrYIvzDNLtkJ68178rDJ29f
-GyAax4P+gN13biyXQycQHhXDfHN1UytopldiRkitXVFGq92sz6BFgQDLF9yxQOm1
-iL5oxWSVf6rM8AOc3DV9Aa1kCpG6FrZPJ66NBgJLzTpKARzt7CM+M8VQNA/KnHB3
-8Mt0WmAeRORSnBWQksOlnA4VUkxWDGkZGVBWMRist7gghfG7n7HxTAUAk1oo7j2b
-/gTwbeOjv/330uZG31e+hCcaj/EcocHvglegWCPMmIhpXqn25TC+87QkGt2wb6z6
-dpzTdy3Pimr5BK2YrN1+Le33CYeHKlc+6XL34BEVebAQ/A9OB/M=
-=k3NZ
+iQIzBAABCgAdFiEE0yaA1ZV9xxFr4pwUzxoQjQ565yAFAmLX0XwACgkQzxoQjQ56
+5yAmDw/+KPoaY+vsYXrYjbNcYmXyH+9ca8Yl1WkgqMOAAiojQBAdN+PIeXqdM4P1
+ODJq7SGPqhR5j9dK3k4wxvTkmAVlFHWCbOQS0eCueoV2s0w0Sg9xkut7zTMwwBTp
+I+0TbU9W7DdnDk6k6xoNCNhT8OYpMElmwhS9nChoY2+cwdWJNZ0Lr5JeXwvb5R7W
+YnHUqO/zTIAjwJNdKwb27J9szwL3GQ4nB9gSoKXCFQTIONszfMYNwboy3VlD8m/F
+irh9ZZeZsMlCpEO9Rsqx4QyOvbLy0D2jEOKNYzXPQea9dx9gQvDiWJrVETsQBwkc
+iWJ/HJVhs3ng7iyUfMr8VAPn7rf+3fSqYeQUs5Z5/ubqABF2ZI9/4DIPGsXtqH7q
+b5OTOvSucvRpsxudnJElKWhkCjZUyjYzBqGdZ6erCh+GTiM4uFNB/en/QObfHmP2
+z4D41Dk9peLxstqlrwoLL0sJCHR4fQZFvPKrQ6sKlTKliu1zBc0HcEqq3BFalKF+
+XO2PT1QVNXx/9IqOruKm+M5siY63VKDwE/DXJZZTUPz7GN/Cr9j5Jz3pjq8jL0CR
+e4D+sEu7xXzlJa7MFqg2odZhLTRYuM/DHZCj3cOyQGlYUQ+tZMGsAiix9JyO7XhB
+1jzEMugtAglPAsmHr0HR/+oz+YDgwQEmQA4VO4l0swCNmjzLITA=
+=LM6h
-----END PGP SIGNATURE-----
diff --git a/vendor/thecodingmachine/safe/deprecated/array.php b/vendor/thecodingmachine/safe/deprecated/array.php
index f0b3a20b7..691ea7394 100644
--- a/vendor/thecodingmachine/safe/deprecated/array.php
+++ b/vendor/thecodingmachine/safe/deprecated/array.php
@@ -4,6 +4,79 @@ namespace Safe;
use Safe\Exceptions\ArrayException;
+/**
+ * array_replace_recursive replaces the values of
+ * array with the same values from all the following
+ * arrays. If a key from the first array exists in the second array, its value
+ * will be replaced by the value from the second array. If the key exists in the
+ * second array, and not the first, it will be created in the first array.
+ * If a key only exists in the first array, it will be left as is.
+ * If several arrays are passed for replacement, they will be processed
+ * in order, the later array overwriting the previous values.
+ *
+ * array_replace_recursive is recursive : it will recurse into
+ * arrays and apply the same process to the inner value.
+ *
+ * When the value in the first array is scalar, it will be replaced
+ * by the value in the second array, may it be scalar or array.
+ * When the value in the first array and the second array
+ * are both arrays, array_replace_recursive will replace
+ * their respective value recursively.
+ *
+ * @param array $array The array in which elements are replaced.
+ * @param array $replacements Arrays from which elements will be extracted.
+ * @return array Returns an array.
+ * @throws ArrayException
+ *
+ */
+function array_replace_recursive(array $array, array ...$replacements): array
+{
+ error_clear_last();
+ if ($replacements !== []) {
+ $result = \array_replace_recursive($array, ...$replacements);
+ } else {
+ $result = \array_replace_recursive($array);
+ }
+ if ($result === null) {
+ throw ArrayException::createFromPhpError();
+ }
+ return $result;
+}
+
+/**
+ * array_replace replaces the values of
+ * array with values having the same keys in each of the following
+ * arrays. If a key from the first array exists in the second array, its value
+ * will be replaced by the value from the second array. If the key exists in the
+ * second array, and not the first, it will be created in the first array.
+ * If a key only exists in the first array, it will be left as is.
+ * If several arrays are passed for replacement, they will be processed
+ * in order, the later arrays overwriting the previous values.
+ *
+ * array_replace is not recursive : it will replace
+ * values in the first array by whatever type is in the second array.
+ *
+ * @param array $array The array in which elements are replaced.
+ * @param array $replacements Arrays from which elements will be extracted.
+ * Values from later arrays overwrite the previous values.
+ * @return array Returns an array.
+ * @throws ArrayException
+ *
+ */
+function array_replace(array $array, array ...$replacements): array
+{
+ error_clear_last();
+ if ($replacements !== []) {
+ $result = \array_replace($array, ...$replacements);
+ } else {
+ $result = \array_replace($array);
+ }
+ if ($result === null) {
+ throw ArrayException::createFromPhpError();
+ }
+ return $result;
+}
+
/**
* array_flip returns an array in flip
* order, i.e. keys from array become values and values
diff --git a/vendor/thecodingmachine/safe/deprecated/functionsList.php b/vendor/thecodingmachine/safe/deprecated/functionsList.php
index 6b39199c8..b75d7abb2 100644
--- a/vendor/thecodingmachine/safe/deprecated/functionsList.php
+++ b/vendor/thecodingmachine/safe/deprecated/functionsList.php
@@ -12,6 +12,8 @@ return [
'apc_load_constants',
'apc_sma_info',
'arsort',
+ 'array_replace',
+ 'array_replace_recursive',
'array_combine',
'array_flip',
'asort',
diff --git a/vendor/thecodingmachine/safe/generated/array.php b/vendor/thecodingmachine/safe/generated/array.php
index 37fa077a6..39a77b5e4 100644
--- a/vendor/thecodingmachine/safe/generated/array.php
+++ b/vendor/thecodingmachine/safe/generated/array.php
@@ -4,81 +4,6 @@ namespace Safe;
use Safe\Exceptions\ArrayException;
-/**
- * array_replace_recursive replaces the values of
- * array with the same values from all the following
- * arrays. If a key from the first array exists in the second array, its value
- * will be replaced by the value from the second array. If the key exists in the
- * second array, and not the first, it will be created in the first array.
- * If a key only exists in the first array, it will be left as is.
- * If several arrays are passed for replacement, they will be processed
- * in order, the later array overwriting the previous values.
- *
- * array_replace_recursive is recursive : it will recurse into
- * arrays and apply the same process to the inner value.
- *
- * When the value in the first array is scalar, it will be replaced
- * by the value in the second array, may it be scalar or array.
- * When the value in the first array and the second array
- * are both arrays, array_replace_recursive will replace
- * their respective value recursively.
- *
- * @param array $array The array in which elements are replaced.
- * @param array $replacements Arrays from which elements will be extracted.
- * @return array Returns an array.
- * @throws ArrayException
- *
- */
-function array_replace_recursive(array $array, array ...$replacements): array
-{
- error_clear_last();
- if ($replacements !== []) {
- $result = \array_replace_recursive($array, ...$replacements);
- } else {
- $result = \array_replace_recursive($array);
- }
- if ($result === null) {
- throw ArrayException::createFromPhpError();
- }
- return $result;
-}
-
-
-/**
- * array_replace replaces the values of
- * array with values having the same keys in each of the following
- * arrays. If a key from the first array exists in the second array, its value
- * will be replaced by the value from the second array. If the key exists in the
- * second array, and not the first, it will be created in the first array.
- * If a key only exists in the first array, it will be left as is.
- * If several arrays are passed for replacement, they will be processed
- * in order, the later arrays overwriting the previous values.
- *
- * array_replace is not recursive : it will replace
- * values in the first array by whatever type is in the second array.
- *
- * @param array $array The array in which elements are replaced.
- * @param array $replacements Arrays from which elements will be extracted.
- * Values from later arrays overwrite the previous values.
- * @return array Returns an array.
- * @throws ArrayException
- *
- */
-function array_replace(array $array, array ...$replacements): array
-{
- error_clear_last();
- if ($replacements !== []) {
- $result = \array_replace($array, ...$replacements);
- } else {
- $result = \array_replace($array);
- }
- if ($result === null) {
- throw ArrayException::createFromPhpError();
- }
- return $result;
-}
-
-
/**
* Applies the user-defined callback function to each
* element of the array. This function will recurse
diff --git a/vendor/thecodingmachine/safe/generated/curl.php b/vendor/thecodingmachine/safe/generated/curl.php
index a85379a63..3c89871c3 100644
--- a/vendor/thecodingmachine/safe/generated/curl.php
+++ b/vendor/thecodingmachine/safe/generated/curl.php
@@ -18,7 +18,7 @@ function curl_copy_handle(\CurlHandle $handle): \CurlHandle
error_clear_last();
$result = \curl_copy_handle($handle);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($handle);
}
return $result;
}
@@ -39,7 +39,7 @@ function curl_escape(\CurlHandle $handle, string $string): string
error_clear_last();
$result = \curl_escape($handle, $string);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($handle);
}
return $result;
}
@@ -64,7 +64,7 @@ function curl_exec(\CurlHandle $handle)
error_clear_last();
$result = \curl_exec($handle);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($handle);
}
return $result;
}
@@ -541,7 +541,7 @@ function curl_getinfo(\CurlHandle $handle, int $option = null)
$result = \curl_getinfo($handle);
}
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($handle);
}
return $result;
}
@@ -627,7 +627,7 @@ function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_mess
error_clear_last();
$result = \curl_multi_info_read($multi_handle, $queued_messages);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($multi_handle);
}
return $result;
}
@@ -791,7 +791,7 @@ function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value):
error_clear_last();
$result = \curl_multi_setopt($multi_handle, $option, $value);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($multi_handle);
}
}
@@ -1284,6 +1284,18 @@ function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value):
*
*
*
+ * CURLOPT_SAFE_UPLOAD
+ *
+ * Always TRUE, what disables support for the @ prefix for
+ * uploading files in CURLOPT_POSTFIELDS, which
+ * means that values starting with @ can be safely
+ * passed as fields. CURLFile may be used for
+ * uploads instead.
+ *
+ *
+ *
+ *
+ *
* CURLOPT_SUPPRESS_CONNECT_HEADERS
*
* TRUE to suppress proxy CONNECT response headers from the user callback functions
@@ -2576,7 +2588,7 @@ function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value):
*
* CURLOPT_PROXY_TLSAUTH_USERNAME
*
- * Tusername to use for the HTTPS proxy TLS authentication method specified with the
+ * The username to use for the HTTPS proxy TLS authentication method specified with the
* CURLOPT_PROXY_TLSAUTH_TYPE option. Requires that the
* CURLOPT_PROXY_TLSAUTH_PASSWORD option to also be set.
*
@@ -3142,7 +3154,7 @@ function curl_setopt(\CurlHandle $handle, int $option, $value): void
error_clear_last();
$result = \curl_setopt($handle, $option, $value);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($handle);
}
}
@@ -3161,7 +3173,7 @@ function curl_share_errno(\CurlShareHandle $share_handle): int
error_clear_last();
$result = \curl_share_errno($share_handle);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($share_handle);
}
return $result;
}
@@ -3238,7 +3250,7 @@ function curl_share_setopt(\CurlShareHandle $share_handle, int $option, $value):
error_clear_last();
$result = \curl_share_setopt($share_handle, $option, $value);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($share_handle);
}
}
@@ -3258,7 +3270,7 @@ function curl_unescape(\CurlHandle $handle, string $string): string
error_clear_last();
$result = \curl_unescape($handle, $string);
if ($result === false) {
- throw CurlException::createFromPhpError();
+ throw CurlException::createFromPhpError($handle);
}
return $result;
}
diff --git a/vendor/thecodingmachine/safe/generated/exec.php b/vendor/thecodingmachine/safe/generated/exec.php
index c4dd49114..126438d43 100644
--- a/vendor/thecodingmachine/safe/generated/exec.php
+++ b/vendor/thecodingmachine/safe/generated/exec.php
@@ -85,10 +85,10 @@ function passthru(string $command, ?int &$result_code = null): void
* @param int $priority The new priority value, the value of this may differ on platforms.
*
* On Unix, a low value, such as -20 means high priority
- * wheras a positive value have a lower priority.
+ * whereas positive values have a lower priority.
*
- * For Windows the priority parameter have the
- * following meanings:
+ * For Windows the priority parameter has the
+ * following meaning:
* @throws ExecException
*
*/
diff --git a/vendor/thecodingmachine/safe/generated/filesystem.php b/vendor/thecodingmachine/safe/generated/filesystem.php
index 7f1b08bb0..f3e5a2081 100644
--- a/vendor/thecodingmachine/safe/generated/filesystem.php
+++ b/vendor/thecodingmachine/safe/generated/filesystem.php
@@ -1240,6 +1240,13 @@ function lstat(string $filename): array
* Attempts to create the directory specified by directory.
*
* @param string $directory The directory path.
+ * A URL can be used as a
+ * filename with this function if the fopen wrappers have been enabled.
+ * See fopen for more details on how to specify the
+ * filename. See the for links to information
+ * about what abilities the various wrappers have, notes on their usage,
+ * and information on any predefined variables they may
+ * provide.
* @param int $permissions The permissions are 0777 by default, which means the widest possible
* access. For more information on permissions, read the details
* on the chmod page.
@@ -1250,8 +1257,8 @@ function lstat(string $filename): array
* which means it should have a leading zero. The permissions is also modified
* by the current umask, which you can change using
* umask.
- * @param bool $recursive Allows the creation of nested directories specified in the
- * directory.
+ * @param bool $recursive If TRUE, then any parent directories to the directory specified will
+ * also be created, with the same permissions.
* @param resource $context A context stream
* resource.
* @throws FilesystemException
diff --git a/vendor/thecodingmachine/safe/generated/functionsList.php b/vendor/thecodingmachine/safe/generated/functionsList.php
index 3c537d1f6..5a590058e 100644
--- a/vendor/thecodingmachine/safe/generated/functionsList.php
+++ b/vendor/thecodingmachine/safe/generated/functionsList.php
@@ -14,8 +14,6 @@ return [
'apcu_inc',
'apcu_sma_info',
'apc_fetch',
- 'array_replace',
- 'array_replace_recursive',
'array_walk_recursive',
'assert_options',
'base64_decode',
diff --git a/vendor/thecodingmachine/safe/generated/json.php b/vendor/thecodingmachine/safe/generated/json.php
index 76fc6c17e..e524c6178 100644
--- a/vendor/thecodingmachine/safe/generated/json.php
+++ b/vendor/thecodingmachine/safe/generated/json.php
@@ -6,7 +6,12 @@ use Safe\Exceptions\JsonException;
/**
* Returns a string containing the JSON representation of the supplied
- * value.
+ * value. If the parameter is an array or object,
+ * it will be serialized recursively.
+ *
+ * If a value to be serialized is an object, then by default only publicly visible
+ * properties will be included. Alternatively, a class may implement JsonSerializable
+ * to control how its values are serialized to JSON.
*
* The encoding is affected by the supplied flags
* and additionally the encoding of float values depends on the value of
diff --git a/vendor/thecodingmachine/safe/generated/ldap.php b/vendor/thecodingmachine/safe/generated/ldap.php
index 97b42e5a5..0bfaaaf2b 100644
--- a/vendor/thecodingmachine/safe/generated/ldap.php
+++ b/vendor/thecodingmachine/safe/generated/ldap.php
@@ -239,36 +239,36 @@ function ldap_exop_whoami($ldap)
/**
- * Performs an extended operation on the specified link with
- * reqoid the OID of the operation and
- * reqdata the data.
+ * Performs an extended operation on the specified ldap with
+ * request_oid the OID of the operation and
+ * request_data the data.
*
* @param resource $ldap An LDAP\Connection instance, returned by ldap_connect.
- * @param string $reqoid The extended operation request OID. You may use one of LDAP_EXOP_START_TLS, LDAP_EXOP_MODIFY_PASSWD, LDAP_EXOP_REFRESH, LDAP_EXOP_WHO_AM_I, LDAP_EXOP_TURN, or a string with the OID of the operation you want to send.
- * @param string $reqdata The extended operation request data. May be NULL for some operations like LDAP_EXOP_WHO_AM_I, may also need to be BER encoded.
- * @param array|null $serverctrls Array of LDAP Controls to send with the request.
- * @param string|null $retdata Will be filled with the extended operation response data if provided.
+ * @param string $request_oid The extended operation request OID. You may use one of LDAP_EXOP_START_TLS, LDAP_EXOP_MODIFY_PASSWD, LDAP_EXOP_REFRESH, LDAP_EXOP_WHO_AM_I, LDAP_EXOP_TURN, or a string with the OID of the operation you want to send.
+ * @param string $request_data The extended operation request data. May be NULL for some operations like LDAP_EXOP_WHO_AM_I, may also need to be BER encoded.
+ * @param array|null $controls Array of LDAP Controls to send with the request.
+ * @param string|null $response_data Will be filled with the extended operation response data if provided.
* If not provided you may use ldap_parse_exop on the result object
* later to get this data.
- * @param string|null $retoid Will be filled with the response OID if provided, usually equal to the request OID.
- * @return resource|bool When used with retdata, returns TRUE on success.
- * When used without retdata, returns a result identifier.
+ * @param string|null $response_oid Will be filled with the response OID if provided, usually equal to the request OID.
+ * @return resource|bool When used with response_data, returns TRUE on success.
+ * When used without response_data, returns a result identifier.
* @throws LdapException
*
*/
-function ldap_exop($ldap, string $reqoid, string $reqdata = null, ?array $serverctrls = null, ?string &$retdata = null, ?string &$retoid = null)
+function ldap_exop($ldap, string $request_oid, string $request_data = null, ?array $controls = null, ?string &$response_data = null, ?string &$response_oid = null)
{
error_clear_last();
- if ($retoid !== null) {
- $result = \ldap_exop($ldap, $reqoid, $reqdata, $serverctrls, $retdata, $retoid);
- } elseif ($retdata !== null) {
- $result = \ldap_exop($ldap, $reqoid, $reqdata, $serverctrls, $retdata);
- } elseif ($serverctrls !== null) {
- $result = \ldap_exop($ldap, $reqoid, $reqdata, $serverctrls);
- } elseif ($reqdata !== null) {
- $result = \ldap_exop($ldap, $reqoid, $reqdata);
+ if ($response_oid !== null) {
+ $result = \ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data, $response_oid);
+ } elseif ($response_data !== null) {
+ $result = \ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data);
+ } elseif ($controls !== null) {
+ $result = \ldap_exop($ldap, $request_oid, $request_data, $controls);
+ } elseif ($request_data !== null) {
+ $result = \ldap_exop($ldap, $request_oid, $request_data);
} else {
- $result = \ldap_exop($ldap, $reqoid);
+ $result = \ldap_exop($ldap, $request_oid);
}
if ($result === false) {
throw LdapException::createFromPhpError();
diff --git a/vendor/thecodingmachine/safe/generated/pcntl.php b/vendor/thecodingmachine/safe/generated/pcntl.php
index 66cc28d46..d05f7ff3d 100644
--- a/vendor/thecodingmachine/safe/generated/pcntl.php
+++ b/vendor/thecodingmachine/safe/generated/pcntl.php
@@ -11,8 +11,9 @@ use Safe\Exceptions\PcntlException;
* man page for specific details.
*
* @param int $process_id If NULL, the process id of the current process is used.
- * @param int $mode One of PRIO_PGRP, PRIO_USER
- * or PRIO_PROCESS.
+ * @param int $mode One of PRIO_PGRP, PRIO_USER,
+ * PRIO_PROCESS,
+ * PRIO_DARWIN_BG or PRIO_DARWIN_THREAD.
* @return int pcntl_getpriority returns the priority of the process. A lower numerical value causes more favorable
* scheduling.
* @throws PcntlException
@@ -46,8 +47,9 @@ function pcntl_getpriority(int $process_id = null, int $mode = PRIO_PROCESS): in
* system types and kernel versions, please see your system's setpriority(2)
* man page for specific details.
* @param int $process_id If NULL, the process id of the current process is used.
- * @param int $mode One of PRIO_PGRP, PRIO_USER
- * or PRIO_PROCESS.
+ * @param int $mode One of PRIO_PGRP, PRIO_USER,
+ * PRIO_PROCESS,
+ * PRIO_DARWIN_BG or PRIO_DARWIN_THREAD.
* @throws PcntlException
*
*/
diff --git a/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php b/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
index d0dbdb695..3401b57b8 100644
--- a/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
+++ b/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
@@ -8,8 +8,8 @@ class CurlException extends \Exception implements SafeExceptionInterface
/**
* @param \CurlHandle $ch
*/
- public static function createFromPhpError($ch): self
+ public static function createFromPhpError($ch = null): self
{
- return new self(\curl_error($ch), \curl_errno($ch));
+ return new self($ch ? \curl_error($ch) : '', $ch ? \curl_errno($ch) : 0);
}
}
diff --git a/vendor/thecodingmachine/safe/rector-migrate.php b/vendor/thecodingmachine/safe/rector-migrate.php
index efa2a2862..4f17de5e6 100644
--- a/vendor/thecodingmachine/safe/rector-migrate.php
+++ b/vendor/thecodingmachine/safe/rector-migrate.php
@@ -24,8 +24,6 @@ return static function (ContainerConfigurator $containerConfigurator): void {
'apcu_inc' => 'Safe\apcu_inc',
'apcu_sma_info' => 'Safe\apcu_sma_info',
'apc_fetch' => 'Safe\apc_fetch',
- 'array_replace' => 'Safe\array_replace',
- 'array_replace_recursive' => 'Safe\array_replace_recursive',
'array_walk_recursive' => 'Safe\array_walk_recursive',
'assert_options' => 'Safe\assert_options',
'base64_decode' => 'Safe\base64_decode',