diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index ed772171e7..dffafca09f 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -44,7 +44,7 @@ jobs: restore-keys: ${{ runner.os }}-composer- - name: Remove lock for old EOL PHP versions - if: matrix.php-version == '7.1.3' || matrix.php-version == '7.2' || matrix.php-version == '7.3' || matrix.php-version == '7.4' + if: matrix.php-version == '7.1.3' || matrix.php-version == '7.2' || matrix.php-version == '7.3' || matrix.php-version == '7.4' || matrix.php-version == '8.0' run: rm composer.lock && composer config platform.php ${{ matrix.php-version }} - name: Install dependencies diff --git a/composer.json b/composer.json index 7e0deaa092..426bef59a7 100644 --- a/composer.json +++ b/composer.json @@ -60,7 +60,7 @@ }, "config": { "platform": { - "php": "8.0" + "php": "8.0.2" } }, "require": { diff --git a/composer.lock b/composer.lock index 6eb3324ccb..9d532ff983 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": "8d0272c1442e11290de55a7947fc849c", + "content-hash": "fbbb18e0a4f4de6ad1d6b9a708a03a10", "packages": [ { "name": "phpoffice/math", @@ -61,32 +61,96 @@ } ], "packages-dev": [ + { + "name": "clue/ndjson-react", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/clue/reactphp-ndjson.git", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "react/event-loop": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\React\\NDJson\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + } + ], + "description": "Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.", + "homepage": "https://github.com/clue/reactphp-ndjson", + "keywords": [ + "NDJSON", + "json", + "jsonlines", + "newline", + "reactphp", + "streaming" + ], + "support": { + "issues": "https://github.com/clue/reactphp-ndjson/issues", + "source": "https://github.com/clue/reactphp-ndjson/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-12-23T10:58:28+00:00" + }, { "name": "composer/pcre", - "version": "1.0.1", + "version": "3.1.4", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" + "reference": "04229f163664973f68f38f6f73d917799168ef24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24", + "reference": "04229f163664973f68f38f6f73d917799168ef24", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "phpstan/phpstan": "^1.3", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5" + "symfony/phpunit-bridge": "^5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -114,7 +178,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/1.0.1" + "source": "https://github.com/composer/pcre/tree/3.1.4" }, "funding": [ { @@ -130,20 +194,20 @@ "type": "tidelift" } ], - "time": "2022-01-21T20:24:37+00:00" + "time": "2024-05-27T13:40:54+00:00" }, { "name": "composer/semver", - "version": "3.3.2", + "version": "3.4.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "url": "https://api.github.com/repos/composer/semver/zipball/c51258e759afdb17f1fd1fe83bc12baaef6309d6", + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6", "shasum": "" }, "require": { @@ -193,9 +257,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "source": "https://github.com/composer/semver/tree/3.4.2" }, "funding": [ { @@ -211,31 +275,31 @@ "type": "tidelift" } ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2024-07-12T11:35:52+00:00" }, { "name": "composer/xdebug-handler", - "version": "2.0.5", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { - "composer/pcre": "^1", - "php": "^5.3.2 || ^7.0 || ^8.0", + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", "psr/log": "^1 || ^2 || ^3" }, "require-dev": { "phpstan/phpstan": "^1.0", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" }, "type": "library", "autoload": { @@ -259,9 +323,9 @@ "performance" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.5" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" }, "funding": [ { @@ -277,126 +341,7 @@ "type": "tidelift" } ], - "time": "2022-02-24T20:20:32+00:00" - }, - { - "name": "doctrine/annotations", - "version": "1.14.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", - "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^1 || ^2", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "~1.4.10 || ^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^4.4 || ^5.4 || ^6", - "vimeo/psalm": "^4.10" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.14.3" - }, - "time": "2023-02-01T09:20:38+00:00" - }, - { - "name": "doctrine/deprecations", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "8cffffb2218e01f3b370bf763e00e81697725259" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/8cffffb2218e01f3b370bf763e00e81697725259", - "reference": "8cffffb2218e01f3b370bf763e00e81697725259", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5|^8.5|^9.5", - "psr/log": "^1|^2|^3" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.1.0" - }, - "time": "2023-05-29T18:55:17+00:00" + "time": "2024-05-06T16:37:16+00:00" }, { "name": "doctrine/instantiator", @@ -468,84 +413,6 @@ ], "time": "2022-12-30T00:15:36+00:00" }, - { - "name": "doctrine/lexer", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/2.1.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-12-14T08:49:07+00:00" - }, { "name": "dompdf/dompdf", "version": "v2.0.4", @@ -608,54 +475,167 @@ }, "time": "2023-12-12T20:19:39+00:00" }, + { + "name": "evenement/evenement", + "version": "v3.0.2", + "source": { + "type": "git", + "url": "https://github.com/igorw/evenement.git", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^9 || ^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Evenement\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + } + ], + "description": "Événement is a very simple event dispatching library for PHP", + "keywords": [ + "event-dispatcher", + "event-emitter" + ], + "support": { + "issues": "https://github.com/igorw/evenement/issues", + "source": "https://github.com/igorw/evenement/tree/v3.0.2" + }, + "time": "2023-08-08T05:53:35+00:00" + }, + { + "name": "fidry/cpu-core-counter", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/theofidry/cpu-core-counter.git", + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^1.9.2", + "phpstan/phpstan-deprecation-rules": "^1.0.0", + "phpstan/phpstan-phpunit": "^1.2.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", + "webmozarts/strict-phpunit": "^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Fidry\\CpuCoreCounter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" + } + ], + "description": "Tiny utility to get the number of CPU cores.", + "keywords": [ + "CPU", + "core" + ], + "support": { + "issues": "https://github.com/theofidry/cpu-core-counter/issues", + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.1.0" + }, + "funding": [ + { + "url": "https://github.com/theofidry", + "type": "github" + } + ], + "time": "2024-02-07T09:43:46+00:00" + }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.4.0", + "version": "v3.62.0", "source": { "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "47177af1cfb9dab5d1cc4daf91b7179c2efe7fad" + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "627692f794d35c43483f34b01d94740df2a73507" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/47177af1cfb9dab5d1cc4daf91b7179c2efe7fad", - "reference": "47177af1cfb9dab5d1cc4daf91b7179c2efe7fad", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/627692f794d35c43483f34b01d94740df2a73507", + "reference": "627692f794d35c43483f34b01d94740df2a73507", "shasum": "" }, "require": { - "composer/semver": "^3.2", - "composer/xdebug-handler": "^2.0", - "doctrine/annotations": "^1.12", + "clue/ndjson-react": "^1.0", + "composer/semver": "^3.4", + "composer/xdebug-handler": "^3.0.3", + "ext-filter": "*", "ext-json": "*", "ext-tokenizer": "*", - "php": "^7.2.5 || ^8.0", - "php-cs-fixer/diff": "^2.0", - "symfony/console": "^4.4.20 || ^5.1.3 || ^6.0", - "symfony/event-dispatcher": "^4.4.20 || ^5.0 || ^6.0", - "symfony/filesystem": "^4.4.20 || ^5.0 || ^6.0", - "symfony/finder": "^4.4.20 || ^5.0 || ^6.0", - "symfony/options-resolver": "^4.4.20 || ^5.0 || ^6.0", - "symfony/polyfill-mbstring": "^1.23", - "symfony/polyfill-php80": "^1.23", - "symfony/polyfill-php81": "^1.23", - "symfony/process": "^4.4.20 || ^5.0 || ^6.0", - "symfony/stopwatch": "^4.4.20 || ^5.0 || ^6.0" + "fidry/cpu-core-counter": "^1.0", + "php": "^7.4 || ^8.0", + "react/child-process": "^0.6.5", + "react/event-loop": "^1.0", + "react/promise": "^2.0 || ^3.0", + "react/socket": "^1.0", + "react/stream": "^1.0", + "sebastian/diff": "^4.0 || ^5.0 || ^6.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-mbstring": "^1.28", + "symfony/polyfill-php80": "^1.28", + "symfony/polyfill-php81": "^1.28", + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { + "facile-it/paraunit": "^1.3 || ^2.3", + "infection/infection": "^0.29.5", "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^1.5", - "mikey179/vfsstream": "^1.6.8", - "php-coveralls/php-coveralls": "^2.5.2", + "keradus/cli-executor": "^2.1", + "mikey179/vfsstream": "^1.6.11", + "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy": "^1.15", - "phpspec/prophecy-phpunit": "^1.1 || ^2.0", - "phpunit/phpunit": "^8.5.21 || ^9.5", - "phpunitgoodpractices/polyfill": "^1.5", - "phpunitgoodpractices/traits": "^1.9.1", - "symfony/phpunit-bridge": "^5.2.4 || ^6.0", - "symfony/yaml": "^4.4.20 || ^5.0 || ^6.0" + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5", + "phpunit/phpunit": "^9.6.19 || ^10.5.21 || ^11.2", + "symfony/var-dumper": "^5.4 || ^6.0 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -668,7 +648,10 @@ "autoload": { "psr-4": { "PhpCsFixer\\": "src/" - } + }, + "exclude-from-classmap": [ + "src/Fixer/Internal/*" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -685,9 +668,15 @@ } ], "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], "support": { - "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.4.0" + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.62.0" }, "funding": [ { @@ -695,7 +684,7 @@ "type": "github" } ], - "time": "2021-12-11T16:25:08+00:00" + "time": "2024-08-07T17:03:09+00:00" }, { "name": "masterminds/html5", @@ -1322,16 +1311,16 @@ }, { "name": "phenx/php-svg-lib", - "version": "0.5.1", + "version": "0.5.4", "source": { "type": "git", "url": "https://github.com/dompdf/php-svg-lib.git", - "reference": "8a8a1ebcf6aea861ef30197999f096f7bd4b4456" + "reference": "46b25da81613a9cf43c83b2a8c2c1bdab27df691" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/8a8a1ebcf6aea861ef30197999f096f7bd4b4456", - "reference": "8a8a1ebcf6aea861ef30197999f096f7bd4b4456", + "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/46b25da81613a9cf43c83b2a8c2c1bdab27df691", + "reference": "46b25da81613a9cf43c83b2a8c2c1bdab27df691", "shasum": "" }, "require": { @@ -1350,7 +1339,7 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "LGPL-3.0" + "LGPL-3.0-or-later" ], "authors": [ { @@ -1362,82 +1351,29 @@ "homepage": "https://github.com/PhenX/php-svg-lib", "support": { "issues": "https://github.com/dompdf/php-svg-lib/issues", - "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.1" + "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.4" }, - "time": "2023-12-11T20:56:08+00:00" + "time": "2024-04-08T12:52:34+00:00" }, { - "name": "php-cs-fixer/diff", - "version": "v2.0.2", + "name": "phpmd/phpmd", + "version": "2.15.0", "source": { "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3" + "url": "https://github.com/phpmd/phpmd.git", + "reference": "74a1f56e33afad4128b886e334093e98e1b5e7c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3", - "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/74a1f56e33afad4128b886e334093e98e1b5e7c0", + "reference": "74a1f56e33afad4128b886e334093e98e1b5e7c0", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", - "symfony/process": "^3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "sebastian/diff v3 backport support for PHP 5.6+", - "homepage": "https://github.com/PHP-CS-Fixer", - "keywords": [ - "diff" - ], - "support": { - "issues": "https://github.com/PHP-CS-Fixer/diff/issues", - "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2" - }, - "abandoned": true, - "time": "2020-10-14T08:32:19+00:00" - }, - { - "name": "phpmd/phpmd", - "version": "2.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpmd/phpmd.git", - "reference": "74a1f56e33afad4128b886e334093e98e1b5e7c0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/74a1f56e33afad4128b886e334093e98e1b5e7c0", - "reference": "74a1f56e33afad4128b886e334093e98e1b5e7c0", - "shasum": "" - }, - "require": { - "composer/xdebug-handler": "^1.0 || ^2.0 || ^3.0", - "ext-xml": "*", - "pdepend/pdepend": "^2.16.1", - "php": ">=5.3.9" + "composer/xdebug-handler": "^1.0 || ^2.0 || ^3.0", + "ext-xml": "*", + "pdepend/pdepend": "^2.16.1", + "php": ">=5.3.9" }, "require-dev": { "easy-doc/easy-doc": "0.0.0 || ^1.3.2", @@ -2039,17 +1975,168 @@ "time": "2023-12-01T16:55:19+00:00" }, { - "name": "psr/cache", + "name": "psr/container", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.2" + }, + "time": "2021-11-05T16:50:12+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "psr/log", "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + "url": "https://github.com/php-fig/log.git", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { @@ -2058,12 +2145,12 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Cache\\": "src/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2076,38 +2163,272 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interface for caching libraries", + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" + }, + { + "name": "react/cache", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/cache.git", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5b", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/promise": "^3.0 || ^2.0 || ^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async, Promise-based cache interface for ReactPHP", + "keywords": [ + "cache", + "caching", + "promise", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/cache/issues", + "source": "https://github.com/reactphp/cache/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2022-11-30T15:59:55+00:00" + }, + { + "name": "react/child-process", + "version": "v0.6.5", + "source": { + "type": "git", + "url": "https://github.com/reactphp/child-process.git", + "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/child-process/zipball/e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/event-loop": "^1.2", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", + "react/socket": "^1.8", + "sebastian/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\ChildProcess\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Event-driven library for executing child processes with ReactPHP.", + "keywords": [ + "event-driven", + "process", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/child-process/issues", + "source": "https://github.com/reactphp/child-process/tree/v0.6.5" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-09-16T13:41:56+00:00" + }, + { + "name": "react/dns", + "version": "v1.13.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/dns.git", + "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/dns/zipball/eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", + "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/cache": "^1.0 || ^0.6 || ^0.5", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.7 || ^1.2.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4.3 || ^3 || ^2", + "react/promise-timer": "^1.11" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Dns\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async DNS resolver for ReactPHP", "keywords": [ - "cache", - "psr", - "psr-6" + "async", + "dns", + "dns-resolver", + "reactphp" ], "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" + "issues": "https://github.com/reactphp/dns/issues", + "source": "https://github.com/reactphp/dns/tree/v1.13.0" }, - "time": "2021-02-03T23:26:27+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-06-13T14:18:03+00:00" }, { - "name": "psr/container", - "version": "1.1.2", + "name": "react/event-loop", + "version": "v1.5.0", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "url": "https://github.com/reactphp/event-loop.git", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", "shasum": "" }, "require": { - "php": ">=7.4.0" + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" + }, + "suggest": { + "ext-pcntl": "For signal handling support when using the StreamSelectLoop" }, "type": "library", "autoload": { "psr-4": { - "Psr\\Container\\": "src/" + "React\\EventLoop\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2116,51 +2437,71 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "asynchronous", + "event-loop" ], "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "issues": "https://github.com/reactphp/event-loop/issues", + "source": "https://github.com/reactphp/event-loop/tree/v1.5.0" }, - "time": "2021-11-05T16:50:12+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-11-13T13:48:05+00:00" }, { - "name": "psr/event-dispatcher", - "version": "1.0.0", + "name": "react/promise", + "version": "v3.2.0", "source": { "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + "url": "https://github.com/reactphp/promise.git", + "reference": "8a164643313c71354582dc850b42b33fa12a4b63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "url": "https://api.github.com/repos/reactphp/promise/zipball/8a164643313c71354582dc850b42b33fa12a4b63", + "reference": "8a164643313c71354582dc850b42b33fa12a4b63", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.1.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } + "require-dev": { + "phpstan/phpstan": "1.10.39 || 1.4.10", + "phpunit/phpunit": "^9.6 || ^7.5" }, + "type": "library", "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { - "Psr\\EventDispatcher\\": "src/" + "React\\Promise\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2169,48 +2510,75 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Standard interfaces for event handling.", + "description": "A lightweight implementation of CommonJS Promises/A for PHP", "keywords": [ - "events", - "psr", - "psr-14" + "promise", + "promises" ], "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v3.2.0" }, - "time": "2019-01-08T18:20:26+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-05-24T10:39:05+00:00" }, { - "name": "psr/http-message", - "version": "2.0", + "name": "react/socket", + "version": "v1.16.0", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + "url": "https://github.com/reactphp/socket.git", + "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "url": "https://api.github.com/repos/reactphp/socket/zipball/23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", + "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/dns": "^1.13", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.6 || ^1.2.1", + "react/stream": "^1.4" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4.3 || ^3.3 || ^2", + "react/promise-stream": "^1.4", + "react/promise-timer": "^1.11" }, + "type": "library", "autoload": { "psr-4": { - "Psr\\Http\\Message\\": "src/" + "React\\Socket\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2219,51 +2587,73 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", + "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP", "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" + "Connection", + "Socket", + "async", + "reactphp", + "stream" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" + "issues": "https://github.com/reactphp/socket/issues", + "source": "https://github.com/reactphp/socket/tree/v1.16.0" }, - "time": "2023-04-04T09:54:51+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-07-26T10:38:09+00:00" }, { - "name": "psr/log", - "version": "3.0.0", + "name": "react/stream", + "version": "v1.4.0", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "url": "https://github.com/reactphp/stream.git", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "url": "https://api.github.com/repos/reactphp/stream/zipball/1e5b0acb8fe55143b5b426817155190eb6f5b18d", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d", "shasum": "" }, "require": { - "php": ">=8.0.0" + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.8", + "react/event-loop": "^1.2" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } + "require-dev": { + "clue/stream-filter": "~1.2", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, + "type": "library", "autoload": { "psr-4": { - "Psr\\Log\\": "src" + "React\\Stream\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2272,21 +2662,48 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", "keywords": [ - "log", - "psr", - "psr-3" + "event-driven", + "io", + "non-blocking", + "pipe", + "reactphp", + "readable", + "stream", + "writable" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" + "issues": "https://github.com/reactphp/stream/issues", + "source": "https://github.com/reactphp/stream/tree/v1.4.0" }, - "time": "2021-07-14T16:46:02+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-06-11T12:45:25+00:00" }, { "name": "sabberworm/php-css-parser", @@ -2641,16 +3058,16 @@ }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -2695,7 +3112,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -2703,7 +3120,7 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", @@ -3458,45 +3875,42 @@ }, { "name": "symfony/console", - "version": "v5.3.16", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "2e322c76cdccb302af6b275ea2207169c8355328" + "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/2e322c76cdccb302af6b275ea2207169c8355328", - "reference": "2e322c76cdccb302af6b275ea2207169c8355328", + "url": "https://api.github.com/repos/symfony/console/zipball/c3ebc83d031b71c39da318ca8b7a07ecc67507ed", + "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2", - "symfony/string": "^5.1" + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.4|^6.0" }, "conflict": { - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/event-dispatcher": "^4.4|^5.0", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0", - "symfony/var-dumper": "^4.4|^5.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -3536,7 +3950,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.3.16" + "source": "https://github.com/symfony/console/tree/v6.0.19" }, "funding": [ { @@ -3552,7 +3966,7 @@ "type": "tidelift" } ], - "time": "2022-03-01T08:24:05+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/dependency-injection", @@ -3645,25 +4059,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -3692,7 +4106,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" }, "funding": [ { @@ -3708,44 +4122,42 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.4.22", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f" + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1df20e45d56da29a4b1d8259dd6e950acbf1b13f", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "symfony/event-dispatcher-contracts": "^2|^3" }, "conflict": { - "symfony/dependency-injection": "<4.4" + "symfony/dependency-injection": "<5.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "symfony/event-dispatcher-implementation": "2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0" + "symfony/stopwatch": "^5.4|^6.0" }, "suggest": { "symfony/dependency-injection": "", @@ -3777,7 +4189,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.22" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.19" }, "funding": [ { @@ -3793,24 +4205,24 @@ "type": "tidelift" } ], - "time": "2023-03-17T11:31:58+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "psr/event-dispatcher": "^1" }, "suggest": { @@ -3819,7 +4231,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -3856,7 +4268,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.2" }, "funding": [ { @@ -3872,27 +4284,26 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/filesystem", - "version": "v5.4.25", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" + "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", - "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3d49eec03fda1f0fc19b7349fbbe55ebc1004214", + "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-mbstring": "~1.8" }, "type": "library", "autoload": { @@ -3920,7 +4331,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.25" + "source": "https://github.com/symfony/filesystem/tree/v6.0.19" }, "funding": [ { @@ -3936,26 +4347,24 @@ "type": "tidelift" } ], - "time": "2023-05-31T13:04:02+00:00" + "time": "2023-01-20T17:44:14+00:00" }, { "name": "symfony/finder", - "version": "v5.4.21", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19" + "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19", + "url": "https://api.github.com/repos/symfony/finder/zipball/5cc9cac6586fc0c28cd173780ca696e419fefa11", + "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -3983,7 +4392,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.21" + "source": "https://github.com/symfony/finder/tree/v6.0.19" }, "funding": [ { @@ -3999,27 +4408,25 @@ "type": "tidelift" } ], - "time": "2023-02-16T09:33:00+00:00" + "time": "2023-01-20T17:44:14+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.4.21", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9" + "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", - "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/6a180d1c45e0d9797470ca9eb46215692de00fa3", + "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "symfony/deprecation-contracts": "^2.1|^3" }, "type": "library", "autoload": { @@ -4052,7 +4459,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.21" + "source": "https://github.com/symfony/options-resolver/tree/v6.0.19" }, "funding": [ { @@ -4068,20 +4475,20 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "0424dff1c58f028c451efff2045f5d92410bd540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540", "shasum": "" }, "require": { @@ -4095,9 +4502,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4134,7 +4538,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" }, "funding": [ { @@ -4150,20 +4554,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/64647a7c30b2283f5d49b874d84a18fc22054b7a", + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a", "shasum": "" }, "require": { @@ -4174,9 +4578,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4215,7 +4616,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0" }, "funding": [ { @@ -4231,20 +4632,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb", "shasum": "" }, "require": { @@ -4255,9 +4656,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4299,7 +4697,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" }, "funding": [ { @@ -4315,20 +4713,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -4342,9 +4740,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4382,86 +4777,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-07-28T09:04:16+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { @@ -4477,20 +4793,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", "shasum": "" }, "require": { @@ -4498,9 +4814,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4544,7 +4857,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" }, "funding": [ { @@ -4560,20 +4873,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af", + "reference": "3fb075789fb91f9ad9af537c4012d523085bd5af", "shasum": "" }, "require": { @@ -4581,9 +4894,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4623,7 +4933,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.30.0" }, "funding": [ { @@ -4639,20 +4949,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/process", - "version": "v5.4.34", + "version": "v5.4.40", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "8fa22178dfc368911dbd513b431cd9b06f9afe7a" + "reference": "deedcb3bb4669cae2148bc920eafd2b16dc7c046" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/8fa22178dfc368911dbd513b431cd9b06f9afe7a", - "reference": "8fa22178dfc368911dbd513b431cd9b06f9afe7a", + "url": "https://api.github.com/repos/symfony/process/zipball/deedcb3bb4669cae2148bc920eafd2b16dc7c046", + "reference": "deedcb3bb4669cae2148bc920eafd2b16dc7c046", "shasum": "" }, "require": { @@ -4685,7 +4995,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.34" + "source": "https://github.com/symfony/process/tree/v5.4.40" }, "funding": [ { @@ -4701,20 +5011,20 @@ "type": "tidelift" } ], - "time": "2023-12-02T08:41:43+00:00" + "time": "2024-05-31T14:33:22+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.2", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a2329596ddc8fd568900e3fc76cba42489ecc7f3", + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3", "shasum": "" }, "require": { @@ -4768,7 +5078,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.3" }, "funding": [ { @@ -4784,24 +5094,24 @@ "type": "tidelift" } ], - "time": "2022-05-30T19:17:29+00:00" + "time": "2023-04-21T15:04:16+00:00" }, { "name": "symfony/stopwatch", - "version": "v5.4.21", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee" + "reference": "011e781839dd1d2eb8119f65ac516a530f60226d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f83692cd869a6f2391691d40a01e8acb89e76fee", - "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/011e781839dd1d2eb8119f65ac516a530f60226d", + "reference": "011e781839dd1d2eb8119f65ac516a530f60226d", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/service-contracts": "^1|^2|^3" }, "type": "library", @@ -4830,7 +5140,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v5.4.21" + "source": "https://github.com/symfony/stopwatch/tree/v6.0.19" }, "funding": [ { @@ -4846,38 +5156,37 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/string", - "version": "v5.4.22", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62" + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", + "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a", + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.0" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -4916,7 +5225,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.22" + "source": "https://github.com/symfony/string/tree/v6.0.19" }, "funding": [ { @@ -4932,24 +5241,24 @@ "type": "tidelift" } ], - "time": "2023-03-14T06:11:53+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "tecnickcom/tcpdf", - "version": "6.6.5", + "version": "6.7.5", "source": { "type": "git", "url": "https://github.com/tecnickcom/TCPDF.git", - "reference": "5fce932fcee4371865314ab7f6c0d85423c5c7ce" + "reference": "951eabf0338ec2522bd0d5d9c79b08a3a3d36b36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/5fce932fcee4371865314ab7f6c0d85423c5c7ce", - "reference": "5fce932fcee4371865314ab7f6c0d85423c5c7ce", + "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/951eabf0338ec2522bd0d5d9c79b08a3a3d36b36", + "reference": "951eabf0338ec2522bd0d5d9c79b08a3a3d36b36", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=5.5.0" }, "type": "library", "autoload": { @@ -4996,7 +5305,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/TCPDF/issues", - "source": "https://github.com/tecnickcom/TCPDF/tree/6.6.5" + "source": "https://github.com/tecnickcom/TCPDF/tree/6.7.5" }, "funding": [ { @@ -5004,7 +5313,7 @@ "type": "custom" } ], - "time": "2023-09-06T15:09:26+00:00" + "time": "2024-04-20T17:25:10+00:00" }, { "name": "theseer/tokenizer", @@ -5076,7 +5385,7 @@ "ext-libxml": "*" }, "platform-overrides": { - "php": "8.0" + "php": "8.0.2" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 2e44745b3d..f46601d8cc 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1156,7 +1156,7 @@ parameters: path: src/PhpWord/Writer/AbstractWriter.php - - message: "#^PHPDoc tag @param has invalid value \\(\\\\PhpOffice\\\\PhpWord\\\\PhpWord\\)\\: Unexpected token \"\\\\n \\*\", expected variable at offset 78$#" + message: "#^PHPDoc tag @param has invalid value \\(PhpWord\\)\\: Unexpected token \"\\\\n \\*\", expected variable at offset 59$#" count: 1 path: src/PhpWord/Writer/AbstractWriter.php @@ -1356,7 +1356,7 @@ parameters: path: src/PhpWord/Writer/RTF/Style/Border.php - - message: "#^PHPDoc tag @param has invalid value \\(\\\\PhpOffice\\\\PhpWord\\\\PhpWord\\)\\: Unexpected token \"\\\\n \", expected variable at offset 86$#" + message: "#^PHPDoc tag @param has invalid value \\(PhpWord\\)\\: Unexpected token \"\\\\n \", expected variable at offset 67$#" count: 1 path: src/PhpWord/Writer/Word2007.php diff --git a/samples/Sample_01_SimpleText.php b/samples/Sample_01_SimpleText.php index e89f7323ba..a81ca328e3 100644 --- a/samples/Sample_01_SimpleText.php +++ b/samples/Sample_01_SimpleText.php @@ -7,16 +7,16 @@ // New Word Document echo date('H:i:s') , ' Create new PhpWord object' , EOL; -$languageEnGb = new \PhpOffice\PhpWord\Style\Language(\PhpOffice\PhpWord\Style\Language::EN_GB); +$languageEnGb = new PhpOffice\PhpWord\Style\Language(PhpOffice\PhpWord\Style\Language::EN_GB); -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); $phpWord->getSettings()->setThemeFontLang($languageEnGb); $fontStyleName = 'rStyle'; $phpWord->addFontStyle($fontStyleName, ['bold' => true, 'italic' => true, 'size' => 16, 'allCaps' => true, 'doubleStrikethrough' => true]); $paragraphStyleName = 'pStyle'; -$phpWord->addParagraphStyle($paragraphStyleName, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER, 'spaceAfter' => 100]); +$phpWord->addParagraphStyle($paragraphStyleName, ['alignment' => PhpOffice\PhpWord\SimpleType\Jc::CENTER, 'spaceAfter' => 100]); $phpWord->addTitleStyle(1, ['bold' => true], ['spaceAfter' => 240]); @@ -29,7 +29,7 @@ // $pStyle = new Font(); // $pStyle->setLang() -$section->addText('Ce texte-ci est en français.', ['lang' => \PhpOffice\PhpWord\Style\Language::FR_BE]); +$section->addText('Ce texte-ci est en français.', ['lang' => PhpOffice\PhpWord\Style\Language::FR_BE]); // Two text break $section->addTextBreak(2); diff --git a/samples/Sample_02_TabStops.php b/samples/Sample_02_TabStops.php index 74a0ed1fa3..ad99fe83f5 100644 --- a/samples/Sample_02_TabStops.php +++ b/samples/Sample_02_TabStops.php @@ -4,7 +4,7 @@ // New Word Document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // Define styles $multipleTabsStyleName = 'multipleTab'; @@ -12,18 +12,18 @@ $multipleTabsStyleName, [ 'tabs' => [ - new \PhpOffice\PhpWord\Style\Tab('left', 1550), - new \PhpOffice\PhpWord\Style\Tab('center', 3200), - new \PhpOffice\PhpWord\Style\Tab('right', 5300), + new PhpOffice\PhpWord\Style\Tab('left', 1550), + new PhpOffice\PhpWord\Style\Tab('center', 3200), + new PhpOffice\PhpWord\Style\Tab('right', 5300), ], ] ); $rightTabStyleName = 'rightTab'; -$phpWord->addParagraphStyle($rightTabStyleName, ['tabs' => [new \PhpOffice\PhpWord\Style\Tab('right', 9090)]]); +$phpWord->addParagraphStyle($rightTabStyleName, ['tabs' => [new PhpOffice\PhpWord\Style\Tab('right', 9090)]]); $leftTabStyleName = 'centerTab'; -$phpWord->addParagraphStyle($leftTabStyleName, ['tabs' => [new \PhpOffice\PhpWord\Style\Tab('center', 4680)]]); +$phpWord->addParagraphStyle($leftTabStyleName, ['tabs' => [new PhpOffice\PhpWord\Style\Tab('center', 4680)]]); // New portrait section $section = $phpWord->addSection(); diff --git a/samples/Sample_03_Sections.php b/samples/Sample_03_Sections.php index b02a277c43..b01726d81c 100644 --- a/samples/Sample_03_Sections.php +++ b/samples/Sample_03_Sections.php @@ -6,7 +6,7 @@ // New Word Document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // New portrait section $section = $phpWord->addSection(['borderColor' => '00FF00', 'borderSize' => 12]); diff --git a/samples/Sample_04_Textrun.php b/samples/Sample_04_Textrun.php index 33af08a5b4..75892267bb 100644 --- a/samples/Sample_04_Textrun.php +++ b/samples/Sample_04_Textrun.php @@ -4,7 +4,7 @@ // New Word Document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // Define styles $paragraphStyleName = 'pStyle'; @@ -17,7 +17,7 @@ $phpWord->addFontStyle($coloredFontStyleName, ['color' => 'FF8080', 'bgColor' => 'FFFFCC']); $linkFontStyleName = 'NLink'; -$phpWord->addLinkStyle($linkFontStyleName, ['color' => '0000FF', 'underline' => \PhpOffice\PhpWord\Style\Font::UNDERLINE_SINGLE]); +$phpWord->addLinkStyle($linkFontStyleName, ['color' => '0000FF', 'underline' => PhpOffice\PhpWord\Style\Font::UNDERLINE_SINGLE]); // New portrait section $section = $phpWord->addSection(); diff --git a/samples/Sample_05_Multicolumn.php b/samples/Sample_05_Multicolumn.php index 093dd60424..c4d1dd7280 100644 --- a/samples/Sample_05_Multicolumn.php +++ b/samples/Sample_05_Multicolumn.php @@ -4,7 +4,7 @@ // New Word Document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); $filler = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' . 'Nulla fermentum, tortor id adipiscing adipiscing, tortor turpis commodo. ' . 'Donec vulputate iaculis metus, vel luctus dolor hendrerit ac. ' diff --git a/samples/Sample_06_Footnote.php b/samples/Sample_06_Footnote.php index f3c369b342..012acae89f 100644 --- a/samples/Sample_06_Footnote.php +++ b/samples/Sample_06_Footnote.php @@ -7,8 +7,8 @@ // New Word Document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); -\PhpOffice\PhpWord\Settings::setCompatibility(false); +$phpWord = new PhpOffice\PhpWord\PhpWord(); +PhpOffice\PhpWord\Settings::setCompatibility(false); // Define styles $paragraphStyleName = 'pStyle'; @@ -21,7 +21,7 @@ $phpWord->addFontStyle($coloredFontStyleName, ['color' => 'FF8080', 'bgColor' => 'FFFFCC']); $linkFontStyleName = 'NLink'; -$phpWord->addLinkStyle($linkFontStyleName, ['color' => '0000FF', 'underline' => \PhpOffice\PhpWord\Style\Font::UNDERLINE_SINGLE]); +$phpWord->addLinkStyle($linkFontStyleName, ['color' => '0000FF', 'underline' => PhpOffice\PhpWord\Style\Font::UNDERLINE_SINGLE]); // New portrait section $section = $phpWord->addSection(); diff --git a/samples/Sample_07_TemplateCloneRow.php b/samples/Sample_07_TemplateCloneRow.php index a921569f64..844974b511 100644 --- a/samples/Sample_07_TemplateCloneRow.php +++ b/samples/Sample_07_TemplateCloneRow.php @@ -4,7 +4,7 @@ // Template processor instance creation echo date('H:i:s'), ' Creating new TemplateProcessor instance...', EOL; -$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor('resources/Sample_07_TemplateCloneRow.docx'); +$templateProcessor = new PhpOffice\PhpWord\TemplateProcessor('resources/Sample_07_TemplateCloneRow.docx'); // Variables on different parts of document $templateProcessor->setValue('weekday', date('l')); // On section/content diff --git a/samples/Sample_08_ParagraphPagination.php b/samples/Sample_08_ParagraphPagination.php index f343366a84..cac52e3baf 100644 --- a/samples/Sample_08_ParagraphPagination.php +++ b/samples/Sample_08_ParagraphPagination.php @@ -4,11 +4,11 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); $phpWord->setDefaultParagraphStyle( [ - 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::BOTH, - 'spaceAfter' => \PhpOffice\PhpWord\Shared\Converter::pointToTwip(12), + 'alignment' => PhpOffice\PhpWord\SimpleType\Jc::BOTH, + 'spaceAfter' => PhpOffice\PhpWord\Shared\Converter::pointToTwip(12), 'spacing' => 120, ] ); diff --git a/samples/Sample_09_Tables.php b/samples/Sample_09_Tables.php index f1b67c9ecc..131e6f4040 100644 --- a/samples/Sample_09_Tables.php +++ b/samples/Sample_09_Tables.php @@ -7,7 +7,7 @@ // New Word Document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); $section = $phpWord->addSection(); $header = ['size' => 16, 'bold' => true]; @@ -31,10 +31,10 @@ $section->addText('Fancy table', $header); $fancyTableStyleName = 'Fancy Table'; -$fancyTableStyle = ['borderSize' => 6, 'borderColor' => '006699', 'cellMargin' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER, 'cellSpacing' => 50]; +$fancyTableStyle = ['borderSize' => 6, 'borderColor' => '006699', 'cellMargin' => 80, 'alignment' => PhpOffice\PhpWord\SimpleType\JcTable::CENTER, 'cellSpacing' => 50]; $fancyTableFirstRowStyle = ['borderBottomSize' => 18, 'borderBottomColor' => '0000FF', 'bgColor' => '66BBFF']; $fancyTableCellStyle = ['valign' => 'center']; -$fancyTableCellBtlrStyle = ['valign' => 'center', 'textDirection' => \PhpOffice\PhpWord\Style\Cell::TEXT_DIR_BTLR]; +$fancyTableCellBtlrStyle = ['valign' => 'center', 'textDirection' => PhpOffice\PhpWord\Style\Cell::TEXT_DIR_BTLR]; $fancyTableFontStyle = ['bold' => true]; $phpWord->addTableStyle($fancyTableStyleName, $fancyTableStyle, $fancyTableFirstRowStyle); $table = $section->addTable($fancyTableStyleName); @@ -70,7 +70,7 @@ $cellRowSpan = ['vMerge' => 'restart', 'valign' => 'center', 'bgColor' => 'FFFF00']; $cellRowContinue = ['vMerge' => 'continue']; $cellColSpan = ['gridSpan' => 2, 'valign' => 'center']; -$cellHCentered = ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]; +$cellHCentered = ['alignment' => PhpOffice\PhpWord\SimpleType\Jc::CENTER]; $cellVCentered = ['valign' => 'center']; $spanTableStyleName = 'Colspan Rowspan'; @@ -137,10 +137,10 @@ $section->addTextBreak(2); $section->addText('Nested table in a centered and 50% width table.', $header); -$table = $section->addTable(['width' => 50 * 50, 'unit' => 'pct', 'alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER]); +$table = $section->addTable(['width' => 50 * 50, 'unit' => 'pct', 'alignment' => PhpOffice\PhpWord\SimpleType\JcTable::CENTER]); $cell = $table->addRow()->addCell(); $cell->addText('This cell contains nested table.'); -$innerCell = $cell->addTable(['alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER])->addRow()->addCell(); +$innerCell = $cell->addTable(['alignment' => PhpOffice\PhpWord\SimpleType\JcTable::CENTER])->addRow()->addCell(); $innerCell->addText('Inside nested table'); // 6. Table with floating position diff --git a/samples/Sample_10_EastAsianFontStyle.php b/samples/Sample_10_EastAsianFontStyle.php index c8a6ec3a5e..f730ab510f 100644 --- a/samples/Sample_10_EastAsianFontStyle.php +++ b/samples/Sample_10_EastAsianFontStyle.php @@ -4,7 +4,7 @@ // New Word Document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); $section = $phpWord->addSection(); $header = ['size' => 16, 'bold' => true]; //1.Use EastAisa FontStyle diff --git a/samples/Sample_11_ReadWord2007.php b/samples/Sample_11_ReadWord2007.php index 313cc00797..72cdfac625 100644 --- a/samples/Sample_11_ReadWord2007.php +++ b/samples/Sample_11_ReadWord2007.php @@ -7,7 +7,7 @@ $source = __DIR__ . "/resources/{$name}.docx"; echo date('H:i:s'), " Reading contents from `{$source}`", EOL; -$phpWord = \PhpOffice\PhpWord\IOFactory::load($source); +$phpWord = PhpOffice\PhpWord\IOFactory::load($source); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_11_ReadWord97.php b/samples/Sample_11_ReadWord97.php index 4187baaef7..797ec0f6de 100644 --- a/samples/Sample_11_ReadWord97.php +++ b/samples/Sample_11_ReadWord97.php @@ -6,7 +6,7 @@ $name = basename(__FILE__, '.php'); $source = "resources/{$name}.doc"; echo date('H:i:s'), " Reading contents from `{$source}`", EOL; -$phpWord = \PhpOffice\PhpWord\IOFactory::load($source, 'MsDoc'); +$phpWord = PhpOffice\PhpWord\IOFactory::load($source, 'MsDoc'); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_12_HeaderFooter.php b/samples/Sample_12_HeaderFooter.php index 081371863a..611539e5d3 100644 --- a/samples/Sample_12_HeaderFooter.php +++ b/samples/Sample_12_HeaderFooter.php @@ -4,7 +4,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // New portrait section $section = $phpWord->addSection(); @@ -18,7 +18,7 @@ $textrun = $cell->addTextRun(); $textrun->addText('This is the header with '); $textrun->addLink('https://github.com/PHPOffice/PHPWord', 'PHPWord on GitHub'); -$table->addCell(4500)->addImage('resources/PhpWord.png', ['width' => 80, 'height' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::END]); +$table->addCell(4500)->addImage('resources/PhpWord.png', ['width' => 80, 'height' => 80, 'alignment' => PhpOffice\PhpWord\SimpleType\Jc::END]); // Add header for all other pages $subsequent = $section->addHeader(); @@ -27,7 +27,7 @@ // Add footer $footer = $section->addFooter(); -$footer->addPreserveText('Page {PAGE} of {NUMPAGES}.', null, ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); +$footer->addPreserveText('Page {PAGE} of {NUMPAGES}.', null, ['alignment' => PhpOffice\PhpWord\SimpleType\Jc::CENTER]); $footer->addLink('https://github.com/PHPOffice/PHPWord', 'PHPWord on GitHub'); // Write some text diff --git a/samples/Sample_13_Images.php b/samples/Sample_13_Images.php index 30b9cae949..72839adbec 100644 --- a/samples/Sample_13_Images.php +++ b/samples/Sample_13_Images.php @@ -7,7 +7,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // Begin code $section = $phpWord->addSection(); @@ -16,7 +16,7 @@ printSeparator($section); $section->addText('Local image with styles:'); -$section->addImage('resources/_earth.jpg', ['width' => 210, 'height' => 210, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); +$section->addImage('resources/_earth.jpg', ['width' => 210, 'height' => 210, 'alignment' => PhpOffice\PhpWord\SimpleType\Jc::CENTER]); // Remote image printSeparator($section); @@ -59,14 +59,14 @@ $section->addImage( 'resources/_mars.jpg', [ - 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(3), - 'height' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(3), - 'positioning' => \PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE, - 'posHorizontal' => \PhpOffice\PhpWord\Style\Image::POSITION_HORIZONTAL_RIGHT, - 'posHorizontalRel' => \PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_PAGE, - 'posVerticalRel' => \PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_PAGE, - 'marginLeft' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(15.5), - 'marginTop' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(1.55), + 'width' => Converter::cmToPixel(3), + 'height' => Converter::cmToPixel(3), + 'positioning' => PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE, + 'posHorizontal' => PhpOffice\PhpWord\Style\Image::POSITION_HORIZONTAL_RIGHT, + 'posHorizontalRel' => PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_PAGE, + 'posVerticalRel' => PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_PAGE, + 'marginLeft' => Converter::cmToPixel(15.5), + 'marginTop' => Converter::cmToPixel(1.55), ] ); @@ -77,13 +77,13 @@ $section->addImage( 'resources/_mars.jpg', [ - 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(3), - 'height' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(3), - 'positioning' => \PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE, - 'posHorizontal' => \PhpOffice\PhpWord\Style\Image::POSITION_HORIZONTAL_CENTER, - 'posHorizontalRel' => \PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_COLUMN, - 'posVertical' => \PhpOffice\PhpWord\Style\Image::POSITION_VERTICAL_TOP, - 'posVerticalRel' => \PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_LINE, + 'width' => Converter::cmToPixel(3), + 'height' => Converter::cmToPixel(3), + 'positioning' => PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE, + 'posHorizontal' => PhpOffice\PhpWord\Style\Image::POSITION_HORIZONTAL_CENTER, + 'posHorizontalRel' => PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_COLUMN, + 'posVertical' => PhpOffice\PhpWord\Style\Image::POSITION_VERTICAL_TOP, + 'posVerticalRel' => PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_LINE, ] ); diff --git a/samples/Sample_14_ListItem.php b/samples/Sample_14_ListItem.php index 3b509f3577..f82c3ec064 100644 --- a/samples/Sample_14_ListItem.php +++ b/samples/Sample_14_ListItem.php @@ -4,7 +4,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // Define styles $fontStyleName = 'myOwnStyle'; @@ -25,7 +25,7 @@ ] ); -$predefinedMultilevelStyle = ['listType' => \PhpOffice\PhpWord\Style\ListItem::TYPE_NUMBER_NESTED]; +$predefinedMultilevelStyle = ['listType' => PhpOffice\PhpWord\Style\ListItem::TYPE_NUMBER_NESTED]; // New section $section = $phpWord->addSection(); diff --git a/samples/Sample_15_Link.php b/samples/Sample_15_Link.php index faef305962..43994deaa2 100644 --- a/samples/Sample_15_Link.php +++ b/samples/Sample_15_Link.php @@ -4,7 +4,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // Define styles $linkFontStyleName = 'myOwnLinStyle'; @@ -17,7 +17,7 @@ $section->addLink( 'https://github.com/PHPOffice/PHPWord', 'PHPWord on GitHub', - ['color' => '0000FF', 'underline' => \PhpOffice\PhpWord\Style\Font::UNDERLINE_SINGLE] + ['color' => '0000FF', 'underline' => PhpOffice\PhpWord\Style\Font::UNDERLINE_SINGLE] ); $section->addTextBreak(2); $section->addLink('http://www.bing.com', null, $linkFontStyleName); diff --git a/samples/Sample_16_Object.php b/samples/Sample_16_Object.php index b68fb1675b..8562e25256 100644 --- a/samples/Sample_16_Object.php +++ b/samples/Sample_16_Object.php @@ -4,7 +4,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // Begin code $section = $phpWord->addSection(); diff --git a/samples/Sample_17_TitleTOC.php b/samples/Sample_17_TitleTOC.php index dcf060b0e6..3102ebda83 100644 --- a/samples/Sample_17_TitleTOC.php +++ b/samples/Sample_17_TitleTOC.php @@ -4,7 +4,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); $phpWord->getSettings()->setUpdateFields(true); // New section diff --git a/samples/Sample_18_Watermark.php b/samples/Sample_18_Watermark.php index aebb369023..977a903261 100644 --- a/samples/Sample_18_Watermark.php +++ b/samples/Sample_18_Watermark.php @@ -4,7 +4,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // Begin code $section = $phpWord->addSection(); diff --git a/samples/Sample_19_TextBreak.php b/samples/Sample_19_TextBreak.php index 45c79beeb6..0b41110b18 100644 --- a/samples/Sample_19_TextBreak.php +++ b/samples/Sample_19_TextBreak.php @@ -4,7 +4,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // Define styles $fontStyle24 = ['size' => 24]; diff --git a/samples/Sample_20_BGColor.php b/samples/Sample_20_BGColor.php index 915a824171..e0ce4d6436 100644 --- a/samples/Sample_20_BGColor.php +++ b/samples/Sample_20_BGColor.php @@ -4,14 +4,14 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // New section $section = $phpWord->addSection(); $section->addText( 'This is some text highlighted using fgColor (limited to 15 colors)', - ['fgColor' => \PhpOffice\PhpWord\Style\Font::FGCOLOR_YELLOW] + ['fgColor' => PhpOffice\PhpWord\Style\Font::FGCOLOR_YELLOW] ); $section->addText('This one uses bgColor and is using hex value (0xfbbb10)', ['bgColor' => 'fbbb10']); $section->addText('Compatible with font colors', ['color' => '0000ff', 'bgColor' => 'fbbb10']); diff --git a/samples/Sample_21_TableRowRules.php b/samples/Sample_21_TableRowRules.php index 42fc2d92a5..4495c10034 100644 --- a/samples/Sample_21_TableRowRules.php +++ b/samples/Sample_21_TableRowRules.php @@ -4,7 +4,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // New section $section = $phpWord->addSection(); @@ -19,7 +19,7 @@ $table1 = $section->addTable(['cellMargin' => 0, 'cellMarginRight' => 0, 'cellMarginBottom' => 0, 'cellMarginLeft' => 0]); $table1->addRow(3750); $cell1 = $table1->addCell(null, ['valign' => 'top', 'borderSize' => 30, 'borderColor' => 'ff0000']); -$cell1->addImage('./resources/_earth.jpg', ['width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); +$cell1->addImage('./resources/_earth.jpg', ['width' => 250, 'height' => 250, 'alignment' => PhpOffice\PhpWord\SimpleType\Jc::CENTER]); $section->addTextBreak(); $section->addText("But if we set the rowStyle 'exactHeight' to true, the real row height is used, removing the textbreak:"); @@ -34,7 +34,7 @@ ); $table2->addRow(3750, ['exactHeight' => true]); $cell2 = $table2->addCell(null, ['valign' => 'top', 'borderSize' => 30, 'borderColor' => '00ff00']); -$cell2->addImage('./resources/_earth.jpg', ['width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); +$cell2->addImage('./resources/_earth.jpg', ['width' => 250, 'height' => 250, 'alignment' => PhpOffice\PhpWord\SimpleType\Jc::CENTER]); $section->addTextBreak(); $section->addText('In this example, image is 250px height. Rows are calculated in twips, and 1px = 15twips.'); diff --git a/samples/Sample_22_CheckBox.php b/samples/Sample_22_CheckBox.php index 33d4e39c66..91685924b0 100644 --- a/samples/Sample_22_CheckBox.php +++ b/samples/Sample_22_CheckBox.php @@ -4,7 +4,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // New section $section = $phpWord->addSection(); diff --git a/samples/Sample_23_TemplateBlock.php b/samples/Sample_23_TemplateBlock.php index 6da66a72d4..b6e11b2ac0 100644 --- a/samples/Sample_23_TemplateBlock.php +++ b/samples/Sample_23_TemplateBlock.php @@ -4,7 +4,7 @@ // Template processor instance creation echo date('H:i:s') , ' Creating new TemplateProcessor instance...' , EOL; -$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor('resources/Sample_23_TemplateBlock.docx'); +$templateProcessor = new PhpOffice\PhpWord\TemplateProcessor('resources/Sample_23_TemplateBlock.docx'); // Will clone everything between ${tag} and ${/tag}, the number of times. By default, 1. $templateProcessor->cloneBlock('CLONEME', 3); diff --git a/samples/Sample_24_ReadODText.php b/samples/Sample_24_ReadODText.php index 73c110203e..1b3a43cd57 100644 --- a/samples/Sample_24_ReadODText.php +++ b/samples/Sample_24_ReadODText.php @@ -7,7 +7,7 @@ $source = __DIR__ . "/resources/{$name}.odt"; echo date('H:i:s'), " Reading contents from `{$source}`", EOL; -$phpWord = \PhpOffice\PhpWord\IOFactory::load($source, 'ODText'); +$phpWord = PhpOffice\PhpWord\IOFactory::load($source, 'ODText'); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_25_TextBox.php b/samples/Sample_25_TextBox.php index a897a6269f..b9b528337c 100644 --- a/samples/Sample_25_TextBox.php +++ b/samples/Sample_25_TextBox.php @@ -4,7 +4,7 @@ // New Word Document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // New section $section = $phpWord->addSection(); @@ -12,7 +12,7 @@ // In section $textbox = $section->addTextBox( [ - 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER, + 'alignment' => PhpOffice\PhpWord\SimpleType\Jc::CENTER, 'width' => 400, 'height' => 150, 'borderSize' => 1, diff --git a/samples/Sample_26_Html.php b/samples/Sample_26_Html.php index daf109966c..971c317c43 100644 --- a/samples/Sample_26_Html.php +++ b/samples/Sample_26_Html.php @@ -4,7 +4,7 @@ // New Word Document echo date('H:i:s') , ' Create new PhpWord object' , EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); $phpWord->addParagraphStyle('Heading2', ['alignment' => 'center']); $section = $phpWord->addSection(); @@ -93,7 +93,7 @@ $html .= '

The text below is not visible, click on show/hide to reveil it:

'; $html .= '

This is hidden text

'; -\PhpOffice\PhpWord\Shared\Html::addHtml($section, $html, false, false); +PhpOffice\PhpWord\Shared\Html::addHtml($section, $html, false, false); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_27_Field.php b/samples/Sample_27_Field.php index fd441ba022..e1dbb4f258 100644 --- a/samples/Sample_27_Field.php +++ b/samples/Sample_27_Field.php @@ -6,7 +6,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); PhpOffice\PhpWord\Style::addTitleStyle(1, ['size' => 14]); // New section @@ -49,7 +49,7 @@ $section->addText('The actual index:'); $section->addField('INDEX', [], ['\\e " "'], 'right click to update the index'); -$textrun = $section->addTextRun(['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]); +$textrun = $section->addTextRun(['alignment' => PhpOffice\PhpWord\SimpleType\Jc::CENTER]); $textrun->addText('This is the date of lunar calendar '); $textrun->addField('DATE', ['dateformat' => 'd-M-yyyy H:mm:ss'], ['PreserveFormat', 'LunarCalendar']); $textrun->addText(' written in a textrun.'); diff --git a/samples/Sample_28_ReadRTF.php b/samples/Sample_28_ReadRTF.php index 43b859ac28..52aa74a9a5 100644 --- a/samples/Sample_28_ReadRTF.php +++ b/samples/Sample_28_ReadRTF.php @@ -7,7 +7,7 @@ $source = __DIR__ . "/resources/{$name}.rtf"; echo date('H:i:s'), " Reading contents from `{$source}`", EOL; -$phpWord = \PhpOffice\PhpWord\IOFactory::load($source, 'RTF'); +$phpWord = PhpOffice\PhpWord\IOFactory::load($source, 'RTF'); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_29_Line.php b/samples/Sample_29_Line.php index e5f41b8340..2fdf33c30d 100644 --- a/samples/Sample_29_Line.php +++ b/samples/Sample_29_Line.php @@ -4,7 +4,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // New section $section = $phpWord->addSection(); @@ -14,16 +14,16 @@ $section->addText('Horizontal Line (Inline style):'); $section->addLine( [ - 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(4), - 'height' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(0), + 'width' => PhpOffice\PhpWord\Shared\Converter::cmToPixel(4), + 'height' => PhpOffice\PhpWord\Shared\Converter::cmToPixel(0), 'positioning' => 'absolute', ] ); $section->addText('Vertical Line (Inline style):'); $section->addLine( [ - 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(0), - 'height' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(1), + 'width' => PhpOffice\PhpWord\Shared\Converter::cmToPixel(0), + 'height' => PhpOffice\PhpWord\Shared\Converter::cmToPixel(1), 'positioning' => 'absolute', ] ); @@ -33,14 +33,14 @@ $section->addText('Positioned Line (red):'); $section->addLine( [ - 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(4), - 'height' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(1), + 'width' => PhpOffice\PhpWord\Shared\Converter::cmToPixel(4), + 'height' => PhpOffice\PhpWord\Shared\Converter::cmToPixel(1), 'positioning' => 'absolute', 'posHorizontalRel' => 'page', 'posVerticalRel' => 'page', - 'marginLeft' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(10), - 'marginTop' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(8), - 'wrappingStyle' => \PhpOffice\PhpWord\Style\Image::WRAPPING_STYLE_SQUARE, + 'marginLeft' => PhpOffice\PhpWord\Shared\Converter::cmToPixel(10), + 'marginTop' => PhpOffice\PhpWord\Shared\Converter::cmToPixel(8), + 'wrappingStyle' => PhpOffice\PhpWord\Style\Image::WRAPPING_STYLE_SQUARE, 'color' => 'red', ] ); @@ -48,12 +48,12 @@ $section->addText('Horizontal Formatted Line'); $section->addLine( [ - 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(15), - 'height' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(0), + 'width' => PhpOffice\PhpWord\Shared\Converter::cmToPixel(15), + 'height' => PhpOffice\PhpWord\Shared\Converter::cmToPixel(0), 'positioning' => 'absolute', - 'beginArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK, - 'endArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_OVAL, - 'dash' => \PhpOffice\PhpWord\Style\Line::DASH_STYLE_LONG_DASH_DOT_DOT, + 'beginArrow' => PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK, + 'endArrow' => PhpOffice\PhpWord\Style\Line::ARROW_STYLE_OVAL, + 'dash' => PhpOffice\PhpWord\Style\Line::DASH_STYLE_LONG_DASH_DOT_DOT, 'weight' => 10, ] ); diff --git a/samples/Sample_30_ReadHTML.php b/samples/Sample_30_ReadHTML.php index 8698fe639a..b6564eddc8 100644 --- a/samples/Sample_30_ReadHTML.php +++ b/samples/Sample_30_ReadHTML.php @@ -7,7 +7,7 @@ $source = realpath(__DIR__ . "/resources/{$name}.html"); echo date('H:i:s'), " Reading contents from `{$source}`", EOL; -$phpWord = \PhpOffice\PhpWord\IOFactory::load($source, 'HTML'); +$phpWord = PhpOffice\PhpWord\IOFactory::load($source, 'HTML'); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_31_Shape.php b/samples/Sample_31_Shape.php index 90e364e7be..7f68f3fc2a 100644 --- a/samples/Sample_31_Shape.php +++ b/samples/Sample_31_Shape.php @@ -4,7 +4,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // New section $section = $phpWord->addSection(); diff --git a/samples/Sample_32_Chart.php b/samples/Sample_32_Chart.php index 7e99984e41..c8c65e989e 100644 --- a/samples/Sample_32_Chart.php +++ b/samples/Sample_32_Chart.php @@ -6,7 +6,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // Define styles $phpWord->addTitleStyle(1, ['size' => 14, 'bold' => true], ['keepNext' => true, 'spaceBefore' => 240]); diff --git a/samples/Sample_33_FormField.php b/samples/Sample_33_FormField.php index 24ef6ee947..223fdd2987 100644 --- a/samples/Sample_33_FormField.php +++ b/samples/Sample_33_FormField.php @@ -4,7 +4,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); $phpWord->getSettings()->getDocumentProtection()->setEditing('forms'); // New section diff --git a/samples/Sample_34_SDT.php b/samples/Sample_34_SDT.php index c1722b5b5c..4c8f588e81 100644 --- a/samples/Sample_34_SDT.php +++ b/samples/Sample_34_SDT.php @@ -4,7 +4,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // New section $section = $phpWord->addSection(); diff --git a/samples/Sample_35_InternalLink.php b/samples/Sample_35_InternalLink.php index e59c353001..ef10c4b61f 100644 --- a/samples/Sample_35_InternalLink.php +++ b/samples/Sample_35_InternalLink.php @@ -4,7 +4,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); $section = $phpWord->addSection(); $section->addTitle('This is page 1', 1); diff --git a/samples/Sample_36_RTL.php b/samples/Sample_36_RTL.php index b3baca90cb..e3cf84576a 100644 --- a/samples/Sample_36_RTL.php +++ b/samples/Sample_36_RTL.php @@ -6,7 +6,7 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); $phpWord->setDefaultFontName('DejaVu Sans'); // for good rendition of PDF $rendererName = Settings::PDF_RENDERER_MPDF; $rendererLibraryPath = $vendorDirPath . '/mpdf/mpdf'; @@ -18,17 +18,17 @@ $textrun = $section->addTextRun(); $textrun->addText('This is a Left to Right paragraph.'); -$textrun = $section->addTextRun(['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::END]); +$textrun = $section->addTextRun(['alignment' => PhpOffice\PhpWord\SimpleType\Jc::END]); $textrun->addText('سلام این یک پاراگراف راست به چپ است', ['rtl' => true]); $section->addText('Table visually presented as RTL'); $style = ['rtl' => true, 'size' => 12]; -$tableStyle = ['borderSize' => 6, 'borderColor' => '000000', 'width' => 5000, 'unit' => \PhpOffice\PhpWord\SimpleType\TblWidth::PERCENT, 'bidiVisual' => true]; +$tableStyle = ['borderSize' => 6, 'borderColor' => '000000', 'width' => 5000, 'unit' => PhpOffice\PhpWord\SimpleType\TblWidth::PERCENT, 'bidiVisual' => true]; $table = $section->addTable($tableStyle); -$cellHCentered = ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER]; -$cellHEnd = ['alignment' => \PhpOffice\PhpWord\SimpleType\Jc::END]; -$cellVCentered = ['valign' => \PhpOffice\PhpWord\SimpleType\VerticalJc::CENTER]; +$cellHCentered = ['alignment' => PhpOffice\PhpWord\SimpleType\Jc::CENTER]; +$cellHEnd = ['alignment' => PhpOffice\PhpWord\SimpleType\Jc::END]; +$cellVCentered = ['valign' => PhpOffice\PhpWord\SimpleType\VerticalJc::CENTER]; //Vidually bidirectinal table $table->addRow(); diff --git a/samples/Sample_37_Comments.php b/samples/Sample_37_Comments.php index 79647478e8..b3de8e10ef 100644 --- a/samples/Sample_37_Comments.php +++ b/samples/Sample_37_Comments.php @@ -4,10 +4,10 @@ // New Word Document echo date('H:i:s') , ' Create new PhpWord object' , EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // A comment -$comment = new \PhpOffice\PhpWord\Element\Comment('Authors name', new \DateTime(), 'my_initials'); +$comment = new PhpOffice\PhpWord\Element\Comment('Authors name', new DateTime(), 'my_initials'); $comment->addText('Test', ['bold' => true]); $phpWord->addComment($comment); @@ -22,7 +22,7 @@ $section->addTextBreak(2); // Let's create a comment that we will link to a start element and an end element -$commentWithStartAndEnd = new \PhpOffice\PhpWord\Element\Comment('Foo Bar', new \DateTime()); +$commentWithStartAndEnd = new PhpOffice\PhpWord\Element\Comment('Foo Bar', new DateTime()); $commentWithStartAndEnd->addText('A comment with a start and an end'); $phpWord->addComment($commentWithStartAndEnd); @@ -37,7 +37,7 @@ $section->addTextBreak(2); // Let's add a comment on an image -$commentOnImage = new \PhpOffice\PhpWord\Element\Comment('Mr Smart', new \DateTime()); +$commentOnImage = new PhpOffice\PhpWord\Element\Comment('Mr Smart', new DateTime()); $imageComment = $commentOnImage->addTextRun(); $imageComment->addText('Hey, Mars does look '); $imageComment->addText('red', ['color' => 'FF0000']); @@ -50,7 +50,7 @@ // We can also do things the other way round, link the comment to the element $anotherText = $section->addText('another text'); -$comment1 = new \PhpOffice\PhpWord\Element\Comment('Authors name', new \DateTime(), 'my_initials'); +$comment1 = new PhpOffice\PhpWord\Element\Comment('Authors name', new DateTime(), 'my_initials'); $comment1->addText('Test', ['bold' => true]); $comment1->setStartElement($anotherText); $comment1->setEndElement($anotherText); diff --git a/samples/Sample_38_Protection.php b/samples/Sample_38_Protection.php index 9f61538096..737946d51a 100644 --- a/samples/Sample_38_Protection.php +++ b/samples/Sample_38_Protection.php @@ -6,7 +6,7 @@ // New Word Document echo date('H:i:s') , ' Create new PhpWord object' , EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); $documentProtection = $phpWord->getSettings()->getDocumentProtection(); $documentProtection->setEditing(DocProtect::READ_ONLY); diff --git a/samples/Sample_39_TrackChanges.php b/samples/Sample_39_TrackChanges.php index a95d98cb81..a2c2bcf61c 100644 --- a/samples/Sample_39_TrackChanges.php +++ b/samples/Sample_39_TrackChanges.php @@ -6,7 +6,7 @@ // New Word Document echo date('H:i:s') , ' Create new PhpWord object' , EOL; -$phpWord = new \PhpOffice\PhpWord\PhpWord(); +$phpWord = new PhpOffice\PhpWord\PhpWord(); // New portrait section $section = $phpWord->addSection(); @@ -21,7 +21,7 @@ $text->setTrackChange(new TrackChange(TrackChange::INSERTED, 'Fred')); $text = $textRun->addText('go to sleep'); -$text->setChangeInfo(TrackChange::DELETED, 'Barney', new \DateTime('@' . (time() - 3600))); +$text->setChangeInfo(TrackChange::DELETED, 'Barney', new DateTime('@' . (time() - 3600))); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_40_TemplateSetComplexValue.php b/samples/Sample_40_TemplateSetComplexValue.php index 38ecb3f7ae..83785d155b 100644 --- a/samples/Sample_40_TemplateSetComplexValue.php +++ b/samples/Sample_40_TemplateSetComplexValue.php @@ -9,7 +9,7 @@ // Template processor instance creation echo date('H:i:s'), ' Creating new TemplateProcessor instance...', EOL; -$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor('resources/Sample_40_TemplateSetComplexValue.docx'); +$templateProcessor = new PhpOffice\PhpWord\TemplateProcessor('resources/Sample_40_TemplateSetComplexValue.docx'); $title = new TextRun(); $title->addText('This title has been set ', ['bold' => true, 'italic' => true, 'color' => 'blue']); diff --git a/samples/Sample_41_TemplateSetChart.php b/samples/Sample_41_TemplateSetChart.php index 88eb2ccbd9..417605d78a 100644 --- a/samples/Sample_41_TemplateSetChart.php +++ b/samples/Sample_41_TemplateSetChart.php @@ -7,7 +7,7 @@ // Template processor instance creation echo date('H:i:s'), ' Creating new TemplateProcessor instance...', EOL; -$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor('resources/Sample_41_TemplateSetChart.docx'); +$templateProcessor = new PhpOffice\PhpWord\TemplateProcessor('resources/Sample_41_TemplateSetChart.docx'); $chartTypes = ['pie', 'doughnut', 'bar', 'column', 'line', 'area', 'scatter', 'radar', 'stacked_bar', 'percent_stacked_bar', 'stacked_column', 'percent_stacked_column']; $twoSeries = ['bar', 'column', 'line', 'area', 'scatter', 'radar', 'stacked_bar', 'percent_stacked_bar', 'stacked_column', 'percent_stacked_column']; diff --git a/samples/Sample_44_ExtractVariablesFromReaderWord2007.php b/samples/Sample_44_ExtractVariablesFromReaderWord2007.php index 24574e5fb7..8c1703499f 100644 --- a/samples/Sample_44_ExtractVariablesFromReaderWord2007.php +++ b/samples/Sample_44_ExtractVariablesFromReaderWord2007.php @@ -9,6 +9,6 @@ echo date('H:i:s'), " Reading contents from `{$source}`", EOL; -$variables = \PhpOffice\PhpWord\IOFactory::extractVariables($source); +$variables = PhpOffice\PhpWord\IOFactory::extractVariables($source); var_dump($variables); diff --git a/samples/Sample_Header.php b/samples/Sample_Header.php index 8d05a2a34e..679848ad83 100644 --- a/samples/Sample_Header.php +++ b/samples/Sample_Header.php @@ -61,7 +61,7 @@ /** * Write documents. * - * @param \PhpOffice\PhpWord\PhpWord $phpWord + * @param PhpOffice\PhpWord\PhpWord $phpWord * @param string $filename * @param array $writers * diff --git a/src/PhpWord/Element/AbstractContainer.php b/src/PhpWord/Element/AbstractContainer.php index f9b2822a12..f1e40b3a8f 100644 --- a/src/PhpWord/Element/AbstractContainer.php +++ b/src/PhpWord/Element/AbstractContainer.php @@ -80,7 +80,7 @@ abstract class AbstractContainer extends AbstractElement * @param mixed $function * @param mixed $args * - * @return \PhpOffice\PhpWord\Element\AbstractElement + * @return AbstractElement */ public function __call($function, $args) { @@ -130,7 +130,7 @@ public function __call($function, $args) * * @param string $elementName * - * @return \PhpOffice\PhpWord\Element\AbstractElement + * @return AbstractElement */ protected function addElement($elementName) { @@ -149,7 +149,7 @@ protected function addElement($elementName) $elementArgs = $args; array_shift($elementArgs); // Shift the $elementName off the beginning of array - /** @var \PhpOffice\PhpWord\Element\AbstractElement $element Type hint */ + /** @var AbstractElement $element Type hint */ $element = $reflection->newInstanceArgs($elementArgs); // Set parent container @@ -177,7 +177,7 @@ public function getElements() * * @param int $index * - * @return null|\PhpOffice\PhpWord\Element\AbstractElement + * @return null|AbstractElement */ public function getElement($index) { @@ -191,13 +191,13 @@ public function getElement($index) /** * Removes the element at requested index. * - * @param int|\PhpOffice\PhpWord\Element\AbstractElement $toRemove + * @param AbstractElement|int $toRemove */ public function removeElement($toRemove): void { if (is_int($toRemove) && array_key_exists($toRemove, $this->elements)) { unset($this->elements[$toRemove]); - } elseif ($toRemove instanceof \PhpOffice\PhpWord\Element\AbstractElement) { + } elseif ($toRemove instanceof AbstractElement) { foreach ($this->elements as $key => $element) { if ($element->getElementId() === $toRemove->getElementId()) { unset($this->elements[$key]); diff --git a/src/PhpWord/Element/Cell.php b/src/PhpWord/Element/Cell.php index b0aa0c4ed4..dd01ba4cf5 100644 --- a/src/PhpWord/Element/Cell.php +++ b/src/PhpWord/Element/Cell.php @@ -47,7 +47,7 @@ class Cell extends AbstractContainer * Create new instance. * * @param null|int $width - * @param array|\PhpOffice\PhpWord\Style\Cell $style + * @param array|CellStyle $style */ public function __construct($width = null, $style = null) { diff --git a/src/PhpWord/Element/Comment.php b/src/PhpWord/Element/Comment.php index 7e7c5241fa..3919aa100f 100644 --- a/src/PhpWord/Element/Comment.php +++ b/src/PhpWord/Element/Comment.php @@ -91,7 +91,7 @@ public function setStartElement(AbstractElement $value): void /** * Get the element where this comment starts. * - * @return \PhpOffice\PhpWord\Element\AbstractElement + * @return AbstractElement */ public function getStartElement() { @@ -112,7 +112,7 @@ public function setEndElement(AbstractElement $value): void /** * Get the element where this comment ends. * - * @return \PhpOffice\PhpWord\Element\AbstractElement + * @return AbstractElement */ public function getEndElement() { diff --git a/src/PhpWord/Element/Field.php b/src/PhpWord/Element/Field.php index b371bb80d7..d284c823b7 100644 --- a/src/PhpWord/Element/Field.php +++ b/src/PhpWord/Element/Field.php @@ -124,16 +124,16 @@ class Field extends AbstractElement /** * Font style. * - * @var \PhpOffice\PhpWord\Style\Font|string + * @var Font|string */ protected $fontStyle; /** * Set Font style. * - * @param array|\PhpOffice\PhpWord\Style\Font|string $style + * @param array|Font|string $style * - * @return \PhpOffice\PhpWord\Style\Font|string + * @return Font|string */ public function setFontStyle($style = null) { @@ -154,7 +154,7 @@ public function setFontStyle($style = null) /** * Get Font style. * - * @return \PhpOffice\PhpWord\Style\Font|string + * @return Font|string */ public function getFontStyle() { @@ -168,7 +168,7 @@ public function getFontStyle() * @param array $properties * @param array $options * @param null|string|TextRun $text - * @param array|\PhpOffice\PhpWord\Style\Font|string $fontStyle + * @param array|Font|string $fontStyle */ public function __construct($type = null, $properties = [], $options = [], $text = null, $fontStyle = null) { diff --git a/src/PhpWord/Element/Footnote.php b/src/PhpWord/Element/Footnote.php index 7a08091abc..686f192478 100644 --- a/src/PhpWord/Element/Footnote.php +++ b/src/PhpWord/Element/Footnote.php @@ -29,7 +29,7 @@ class Footnote extends AbstractContainer /** * Paragraph style. * - * @var null|\PhpOffice\PhpWord\Style\Paragraph|string + * @var null|Paragraph|string */ protected $paragraphStyle; @@ -43,7 +43,7 @@ class Footnote extends AbstractContainer /** * Create new instance. * - * @param array|\PhpOffice\PhpWord\Style\Paragraph|string $paragraphStyle + * @param array|Paragraph|string $paragraphStyle */ public function __construct($paragraphStyle = null) { @@ -54,7 +54,7 @@ public function __construct($paragraphStyle = null) /** * Get paragraph style. * - * @return null|\PhpOffice\PhpWord\Style\Paragraph|string + * @return null|Paragraph|string */ public function getParagraphStyle() { diff --git a/src/PhpWord/Element/Link.php b/src/PhpWord/Element/Link.php index b8acba1d3b..e15f32edc0 100644 --- a/src/PhpWord/Element/Link.php +++ b/src/PhpWord/Element/Link.php @@ -43,14 +43,14 @@ class Link extends AbstractElement /** * Font style. * - * @var null|\PhpOffice\PhpWord\Style\Font|string + * @var null|Font|string */ private $fontStyle; /** * Paragraph style. * - * @var null|\PhpOffice\PhpWord\Style\Paragraph|string + * @var null|Paragraph|string */ private $paragraphStyle; @@ -109,7 +109,7 @@ public function getText() /** * Get Text style. * - * @return null|\PhpOffice\PhpWord\Style\Font|string + * @return null|Font|string */ public function getFontStyle() { @@ -119,7 +119,7 @@ public function getFontStyle() /** * Get Paragraph style. * - * @return null|\PhpOffice\PhpWord\Style\Paragraph|string + * @return null|Paragraph|string */ public function getParagraphStyle() { diff --git a/src/PhpWord/Element/ListItem.php b/src/PhpWord/Element/ListItem.php index d3f25c29b7..f989b57e91 100644 --- a/src/PhpWord/Element/ListItem.php +++ b/src/PhpWord/Element/ListItem.php @@ -35,7 +35,7 @@ class ListItem extends AbstractElement /** * Text object. * - * @var \PhpOffice\PhpWord\Element\Text + * @var Text */ private $textObject; @@ -81,7 +81,7 @@ public function getStyle() /** * Get Text object. * - * @return \PhpOffice\PhpWord\Element\Text + * @return Text */ public function getTextObject() { diff --git a/src/PhpWord/Element/PreserveText.php b/src/PhpWord/Element/PreserveText.php index 7370b63743..16dad788b7 100644 --- a/src/PhpWord/Element/PreserveText.php +++ b/src/PhpWord/Element/PreserveText.php @@ -36,14 +36,14 @@ class PreserveText extends AbstractElement /** * Text style. * - * @var null|\PhpOffice\PhpWord\Style\Font|string + * @var null|Font|string */ private $fontStyle; /** * Paragraph style. * - * @var null|\PhpOffice\PhpWord\Style\Paragraph|string + * @var null|Paragraph|string */ private $paragraphStyle; @@ -69,7 +69,7 @@ public function __construct($text = null, $fontStyle = null, $paragraphStyle = n /** * Get Text style. * - * @return null|\PhpOffice\PhpWord\Style\Font|string + * @return null|Font|string */ public function getFontStyle() { @@ -79,7 +79,7 @@ public function getFontStyle() /** * Get Paragraph style. * - * @return null|\PhpOffice\PhpWord\Style\Paragraph|string + * @return null|Paragraph|string */ public function getParagraphStyle() { diff --git a/src/PhpWord/Element/Row.php b/src/PhpWord/Element/Row.php index f97df595f2..1fd4812793 100644 --- a/src/PhpWord/Element/Row.php +++ b/src/PhpWord/Element/Row.php @@ -65,7 +65,7 @@ public function __construct($height = null, $style = null) * @param int $width * @param mixed $style * - * @return \PhpOffice\PhpWord\Element\Cell + * @return Cell */ public function addCell($width = null, $style = null) { diff --git a/src/PhpWord/Element/Section.php b/src/PhpWord/Element/Section.php index dbba7f5ccb..66873470d3 100644 --- a/src/PhpWord/Element/Section.php +++ b/src/PhpWord/Element/Section.php @@ -203,7 +203,7 @@ private function addHeaderFooter($type = Header::AUTO, $header = true) if (in_array($type, [Header::AUTO, Header::FIRST, Header::EVEN])) { $index = count($collection); - /** @var \PhpOffice\PhpWord\Element\AbstractContainer $container Type hint */ + /** @var AbstractContainer $container Type hint */ $container = new $containerClass($this->sectionId, ++$index, $type); $container->setPhpWord($this->phpWord); diff --git a/src/PhpWord/Element/TOC.php b/src/PhpWord/Element/TOC.php index 320c3e9975..d1a3e6dcb3 100644 --- a/src/PhpWord/Element/TOC.php +++ b/src/PhpWord/Element/TOC.php @@ -29,14 +29,14 @@ class TOC extends AbstractElement /** * TOC style. * - * @var \PhpOffice\PhpWord\Style\TOC + * @var TOCStyle */ private $tocStyle; /** * Font style. * - * @var \PhpOffice\PhpWord\Style\Font|string + * @var Font|string */ private $fontStyle; @@ -94,7 +94,7 @@ public function getTitles() $titles = $this->phpWord->getTitles()->getItems(); foreach ($titles as $i => $title) { - /** @var \PhpOffice\PhpWord\Element\Title $title Type hint */ + /** @var Title $title Type hint */ $depth = $title->getDepth(); if ($this->minDepth > $depth) { unset($titles[$i]); @@ -110,7 +110,7 @@ public function getTitles() /** * Get TOC Style. * - * @return \PhpOffice\PhpWord\Style\TOC + * @return TOCStyle */ public function getStyleTOC() { @@ -120,7 +120,7 @@ public function getStyleTOC() /** * Get Font Style. * - * @return \PhpOffice\PhpWord\Style\Font|string + * @return Font|string */ public function getStyleFont() { diff --git a/src/PhpWord/Element/Table.php b/src/PhpWord/Element/Table.php index 53a828a9ea..90b9b21c47 100644 --- a/src/PhpWord/Element/Table.php +++ b/src/PhpWord/Element/Table.php @@ -61,7 +61,7 @@ public function __construct($style = null) * @param int $height * @param mixed $style * - * @return \PhpOffice\PhpWord\Element\Row + * @return Row */ public function addRow($height = null, $style = null) { @@ -78,7 +78,7 @@ public function addRow($height = null, $style = null) * @param int $width * @param mixed $style * - * @return \PhpOffice\PhpWord\Element\Cell + * @return Cell */ public function addCell($width = null, $style = null) { @@ -102,7 +102,7 @@ public function getRows() /** * Get table style. * - * @return null|\PhpOffice\PhpWord\Style\Table|string + * @return null|string|TableStyle */ public function getStyle() { @@ -140,7 +140,7 @@ public function countColumns() $rowCount = count($this->rows); for ($i = 0; $i < $rowCount; ++$i) { - /** @var \PhpOffice\PhpWord\Element\Row $row Type hint */ + /** @var Row $row Type hint */ $row = $this->rows[$i]; $cellCount = count($row->getCells()); if ($columnCount < $cellCount) { diff --git a/src/PhpWord/Element/Text.php b/src/PhpWord/Element/Text.php index 9695395324..470e91da60 100644 --- a/src/PhpWord/Element/Text.php +++ b/src/PhpWord/Element/Text.php @@ -36,14 +36,14 @@ class Text extends AbstractElement /** * Text style. * - * @var \PhpOffice\PhpWord\Style\Font|string + * @var Font|string */ protected $fontStyle; /** * Paragraph style. * - * @var \PhpOffice\PhpWord\Style\Paragraph|string + * @var Paragraph|string */ protected $paragraphStyle; @@ -64,10 +64,10 @@ public function __construct($text = null, $fontStyle = null, $paragraphStyle = n /** * Set Text style. * - * @param array|\PhpOffice\PhpWord\Style\Font|string $style - * @param array|\PhpOffice\PhpWord\Style\Paragraph|string $paragraphStyle + * @param array|Font|string $style + * @param array|Paragraph|string $paragraphStyle * - * @return \PhpOffice\PhpWord\Style\Font|string + * @return Font|string */ public function setFontStyle($style = null, $paragraphStyle = null) { @@ -90,7 +90,7 @@ public function setFontStyle($style = null, $paragraphStyle = null) /** * Get Text style. * - * @return \PhpOffice\PhpWord\Style\Font|string + * @return Font|string */ public function getFontStyle() { @@ -100,9 +100,9 @@ public function getFontStyle() /** * Set Paragraph style. * - * @param array|\PhpOffice\PhpWord\Style\Paragraph|string $style + * @param array|Paragraph|string $style * - * @return \PhpOffice\PhpWord\Style\Paragraph|string + * @return Paragraph|string */ public function setParagraphStyle($style = null) { @@ -123,7 +123,7 @@ public function setParagraphStyle($style = null) /** * Get Paragraph style. * - * @return \PhpOffice\PhpWord\Style\Paragraph|string + * @return Paragraph|string */ public function getParagraphStyle() { diff --git a/src/PhpWord/Element/TextBreak.php b/src/PhpWord/Element/TextBreak.php index c3cd087d74..206c6cbbf0 100644 --- a/src/PhpWord/Element/TextBreak.php +++ b/src/PhpWord/Element/TextBreak.php @@ -28,14 +28,14 @@ class TextBreak extends AbstractElement /** * Paragraph style. * - * @var null|\PhpOffice\PhpWord\Style\Paragraph|string + * @var null|Paragraph|string */ private $paragraphStyle; /** * Text style. * - * @var null|\PhpOffice\PhpWord\Style\Font|string + * @var null|Font|string */ private $fontStyle; @@ -61,7 +61,7 @@ public function __construct($fontStyle = null, $paragraphStyle = null) * @param mixed $style * @param mixed $paragraphStyle * - * @return \PhpOffice\PhpWord\Style\Font|string + * @return Font|string */ public function setFontStyle($style = null, $paragraphStyle = null) { @@ -82,7 +82,7 @@ public function setFontStyle($style = null, $paragraphStyle = null) /** * Get Text style. * - * @return null|\PhpOffice\PhpWord\Style\Font|string + * @return null|Font|string */ public function getFontStyle() { @@ -92,9 +92,9 @@ public function getFontStyle() /** * Set Paragraph style. * - * @param array|\PhpOffice\PhpWord\Style\Paragraph|string $style + * @param array|Paragraph|string $style * - * @return \PhpOffice\PhpWord\Style\Paragraph|string + * @return Paragraph|string */ public function setParagraphStyle($style = null) { @@ -113,7 +113,7 @@ public function setParagraphStyle($style = null) /** * Get Paragraph style. * - * @return null|\PhpOffice\PhpWord\Style\Paragraph|string + * @return null|Paragraph|string */ public function getParagraphStyle() { diff --git a/src/PhpWord/Element/TextRun.php b/src/PhpWord/Element/TextRun.php index 33c55f6584..8ddc9cd7ba 100644 --- a/src/PhpWord/Element/TextRun.php +++ b/src/PhpWord/Element/TextRun.php @@ -32,14 +32,14 @@ class TextRun extends AbstractContainer /** * Paragraph style. * - * @var \PhpOffice\PhpWord\Style\Paragraph|string + * @var Paragraph|string */ protected $paragraphStyle; /** * Create new instance. * - * @param array|\PhpOffice\PhpWord\Style\Paragraph|string $paragraphStyle + * @param array|Paragraph|string $paragraphStyle */ public function __construct($paragraphStyle = null) { @@ -49,7 +49,7 @@ public function __construct($paragraphStyle = null) /** * Get Paragraph style. * - * @return \PhpOffice\PhpWord\Style\Paragraph|string + * @return Paragraph|string */ public function getParagraphStyle() { @@ -59,9 +59,9 @@ public function getParagraphStyle() /** * Set Paragraph style. * - * @param array|\PhpOffice\PhpWord\Style\Paragraph|string $style + * @param array|Paragraph|string $style * - * @return \PhpOffice\PhpWord\Style\Paragraph|string + * @return Paragraph|string */ public function setParagraphStyle($style = null) { diff --git a/src/PhpWord/IOFactory.php b/src/PhpWord/IOFactory.php index 9ceb7026a3..6fcb0d3310 100644 --- a/src/PhpWord/IOFactory.php +++ b/src/PhpWord/IOFactory.php @@ -61,9 +61,9 @@ public static function createReader($name = 'Word2007') * * @param string $type * @param string $name - * @param \PhpOffice\PhpWord\PhpWord $phpWord + * @param PhpWord $phpWord * - * @return \PhpOffice\PhpWord\Reader\ReaderInterface|\PhpOffice\PhpWord\Writer\WriterInterface + * @return ReaderInterface|WriterInterface */ private static function createObject($type, $name, $phpWord = null) { @@ -81,11 +81,11 @@ private static function createObject($type, $name, $phpWord = null) * @param string $filename The name of the file * @param string $readerName * - * @return \PhpOffice\PhpWord\PhpWord $phpWord + * @return PhpWord $phpWord */ public static function load($filename, $readerName = 'Word2007') { - /** @var \PhpOffice\PhpWord\Reader\ReaderInterface $reader */ + /** @var ReaderInterface $reader */ $reader = self::createReader($readerName); return $reader->load($filename); @@ -100,7 +100,7 @@ public static function load($filename, $readerName = 'Word2007') */ public static function extractVariables(string $filename, string $readerName = 'Word2007'): array { - /** @var \PhpOffice\PhpWord\Reader\ReaderInterface $reader */ + /** @var ReaderInterface $reader */ $reader = self::createReader($readerName); $document = $reader->load($filename); $extractedVariables = []; diff --git a/src/PhpWord/Metadata/Settings.php b/src/PhpWord/Metadata/Settings.php index 2de9ef8959..cd1ae69e72 100644 --- a/src/PhpWord/Metadata/Settings.php +++ b/src/PhpWord/Metadata/Settings.php @@ -93,14 +93,14 @@ class Settings /** * Spelling and Grammatical Checking State. * - * @var \PhpOffice\PhpWord\ComplexType\ProofState + * @var ProofState */ private $proofState; /** * Document Editing Restrictions. * - * @var \PhpOffice\PhpWord\Metadata\Protection + * @var Protection */ private $documentProtection; @@ -266,7 +266,7 @@ public function setEvenAndOddHeaders($evenAndOddHeaders): void /** * Get the Visibility of Annotation Types. * - * @return \PhpOffice\PhpWord\ComplexType\TrackChangesView + * @return TrackChangesView */ public function getRevisionView() { diff --git a/src/PhpWord/PhpWord.php b/src/PhpWord/PhpWord.php index a7aa95ce45..2373515b6c 100644 --- a/src/PhpWord/PhpWord.php +++ b/src/PhpWord/PhpWord.php @@ -134,7 +134,7 @@ public function __call($function, $args) if (in_array($function, $addCollection)) { $key = ucfirst(str_replace('add', '', $function) . 's'); - /** @var \PhpOffice\PhpWord\Collection\AbstractCollection $collectionObject */ + /** @var Collection\AbstractCollection $collectionObject */ $collectionObject = $this->collections[$key]; return $collectionObject->addItem($args[0] ?? null); @@ -152,7 +152,7 @@ public function __call($function, $args) /** * Get document properties object. * - * @return \PhpOffice\PhpWord\Metadata\DocInfo + * @return Metadata\DocInfo */ public function getDocInfo() { @@ -162,7 +162,7 @@ public function getDocInfo() /** * Get compatibility. * - * @return \PhpOffice\PhpWord\Metadata\Compatibility + * @return Metadata\Compatibility * * @since 0.12.0 */ @@ -174,7 +174,7 @@ public function getCompatibility() /** * Get compatibility. * - * @return \PhpOffice\PhpWord\Metadata\Settings + * @return Metadata\Settings * * @since 0.14.0 */ @@ -198,7 +198,7 @@ public function getSections() * * @param int $index * - * @return null|\PhpOffice\PhpWord\Element\Section + * @return null|Section */ public function getSection($index) { @@ -214,7 +214,7 @@ public function getSection($index) * * @param null|array|string $style * - * @return \PhpOffice\PhpWord\Element\Section + * @return Section */ public function addSection($style = null) { @@ -282,7 +282,7 @@ public function setDefaultFontSize($fontSize): void * * @param array $styles Paragraph style definition * - * @return \PhpOffice\PhpWord\Style\Paragraph + * @return Style\Paragraph */ public function setDefaultParagraphStyle($styles) { @@ -334,7 +334,7 @@ public function save($filename, $format = 'Word2007', $download = false) * * @param array $settings * - * @return \PhpOffice\PhpWord\Element\Section + * @return Section * * @codeCoverageIgnore */ @@ -348,7 +348,7 @@ public function createSection($settings = null) * * @deprecated 0.12.0 * - * @return \PhpOffice\PhpWord\Metadata\DocInfo + * @return Metadata\DocInfo * * @codeCoverageIgnore */ @@ -362,7 +362,7 @@ public function getDocumentProperties() * * @deprecated 0.12.0 * - * @param \PhpOffice\PhpWord\Metadata\DocInfo $documentProperties + * @param Metadata\DocInfo $documentProperties * * @return self * diff --git a/src/PhpWord/Reader/HTML.php b/src/PhpWord/Reader/HTML.php index 30257d98cf..ed17587362 100644 --- a/src/PhpWord/Reader/HTML.php +++ b/src/PhpWord/Reader/HTML.php @@ -33,7 +33,7 @@ class HTML extends AbstractReader implements ReaderInterface * * @param string $docFile * - * @return \PhpOffice\PhpWord\PhpWord + * @return PhpWord */ public function load($docFile) { diff --git a/src/PhpWord/Reader/ODText.php b/src/PhpWord/Reader/ODText.php index d7f8344443..4888a3be6d 100644 --- a/src/PhpWord/Reader/ODText.php +++ b/src/PhpWord/Reader/ODText.php @@ -32,7 +32,7 @@ class ODText extends AbstractReader implements ReaderInterface * * @param string $docFile * - * @return \PhpOffice\PhpWord\PhpWord + * @return PhpWord */ public function load($docFile) { @@ -58,7 +58,7 @@ private function readPart(PhpWord $phpWord, array $relationships, string $partNa { $partClass = "PhpOffice\\PhpWord\\Reader\\ODText\\{$partName}"; if (class_exists($partClass)) { - /** @var \PhpOffice\PhpWord\Reader\ODText\AbstractPart $part Type hint */ + /** @var ODText\AbstractPart $part Type hint */ $part = new $partClass($docFile, $xmlFile); $part->setRels($relationships); $part->read($phpWord); diff --git a/src/PhpWord/Reader/RTF.php b/src/PhpWord/Reader/RTF.php index 2fdfb03839..8c13943b34 100644 --- a/src/PhpWord/Reader/RTF.php +++ b/src/PhpWord/Reader/RTF.php @@ -33,7 +33,7 @@ class RTF extends AbstractReader implements ReaderInterface * * @param string $docFile * - * @return \PhpOffice\PhpWord\PhpWord + * @return PhpWord */ public function load($docFile) { diff --git a/src/PhpWord/Reader/RTF/Document.php b/src/PhpWord/Reader/RTF/Document.php index 21b76cf71f..6f60256526 100644 --- a/src/PhpWord/Reader/RTF/Document.php +++ b/src/PhpWord/Reader/RTF/Document.php @@ -42,7 +42,7 @@ class Document /** * PhpWord object. * - * @var \PhpOffice\PhpWord\PhpWord + * @var PhpWord */ private $phpWord; diff --git a/src/PhpWord/Reader/Word2007.php b/src/PhpWord/Reader/Word2007.php index bb20a8fed2..1cc446c542 100644 --- a/src/PhpWord/Reader/Word2007.php +++ b/src/PhpWord/Reader/Word2007.php @@ -39,7 +39,7 @@ class Word2007 extends AbstractReader implements ReaderInterface * * @param string $docFile * - * @return \PhpOffice\PhpWord\PhpWord + * @return PhpWord */ public function load($docFile) { diff --git a/src/PhpWord/Reader/Word2007/AbstractPart.php b/src/PhpWord/Reader/Word2007/AbstractPart.php index 95799387ed..784f19e9dc 100644 --- a/src/PhpWord/Reader/Word2007/AbstractPart.php +++ b/src/PhpWord/Reader/Word2007/AbstractPart.php @@ -182,7 +182,7 @@ protected function getCommentReference(string $id): array /** * Read w:p. * - * @param \PhpOffice\PhpWord\Element\AbstractContainer $parent + * @param AbstractContainer $parent * @param string $docPart * * @todo Get font style for preserve text @@ -307,7 +307,7 @@ private function getHeadingDepth(?array $paragraphStyle = null) /** * Read w:r. * - * @param \PhpOffice\PhpWord\Element\AbstractContainer $parent + * @param AbstractContainer $parent * @param string $docPart * @param mixed $paragraphStyle * diff --git a/src/PhpWord/Reader/Word2007/Document.php b/src/PhpWord/Reader/Word2007/Document.php index da42bddc9e..daa90acc46 100644 --- a/src/PhpWord/Reader/Word2007/Document.php +++ b/src/PhpWord/Reader/Word2007/Document.php @@ -34,7 +34,7 @@ class Document extends AbstractPart /** * PhpWord object. * - * @var \PhpOffice\PhpWord\PhpWord + * @var PhpWord */ private $phpWord; diff --git a/src/PhpWord/Settings.php b/src/PhpWord/Settings.php index 984486ccfe..fd28ee903b 100644 --- a/src/PhpWord/Settings.php +++ b/src/PhpWord/Settings.php @@ -29,7 +29,7 @@ class Settings */ public const ZIPARCHIVE = 'ZipArchive'; public const PCLZIP = 'PclZip'; - public const OLD_LIB = \PhpOffice\PhpWord\Shared\ZipArchive::class; // @deprecated 0.11 + public const OLD_LIB = Shared\ZipArchive::class; // @deprecated 0.11 /** * PDF rendering libraries. diff --git a/src/PhpWord/Shared/Html.php b/src/PhpWord/Shared/Html.php index 2022f7da09..b6ad83bf66 100644 --- a/src/PhpWord/Shared/Html.php +++ b/src/PhpWord/Shared/Html.php @@ -57,7 +57,7 @@ class Html * Warning: Do not pass user-generated HTML here, as that would allow an attacker to read arbitrary * files or perform server-side request forgery by passing local file paths or URLs in . * - * @param \PhpOffice\PhpWord\Element\AbstractContainer $element Where the parts need to be added + * @param AbstractContainer $element Where the parts need to be added * @param string $html The code to parse * @param bool $fullHTML If it's a full HTML, no need to add 'body' tag * @param bool $preserveWhiteSpace If false, the whitespaces between nodes will be removed @@ -183,7 +183,7 @@ protected static function parseInlineStyle($node, $styles = []) * Parse a node and add a corresponding element to the parent element. * * @param DOMNode $node node to parse - * @param \PhpOffice\PhpWord\Element\AbstractContainer $element object to add an element corresponding with the node + * @param AbstractContainer $element object to add an element corresponding with the node * @param array $styles Array with all styles * @param array $data Array to transport data to a next level in the DOM tree, for example level of listitems */ @@ -274,7 +274,7 @@ protected static function parseNode($node, $element, $styles = [], $data = []): * Parse child nodes. * * @param DOMNode $node - * @param \PhpOffice\PhpWord\Element\AbstractContainer|Row|Table $element + * @param AbstractContainer|Row|Table $element * @param array $styles * @param array $data */ @@ -296,7 +296,7 @@ protected static function parseChildNodes($node, $element, $styles, $data): void * Parse paragraph node. * * @param DOMNode $node - * @param \PhpOffice\PhpWord\Element\AbstractContainer $element + * @param AbstractContainer $element * @param array &$styles * * @return \PhpOffice\PhpWord\Element\PageBreak|\PhpOffice\PhpWord\Element\TextRun @@ -315,7 +315,7 @@ protected static function parseParagraph($node, $element, &$styles) * Parse input node. * * @param DOMNode $node - * @param \PhpOffice\PhpWord\Element\AbstractContainer $element + * @param AbstractContainer $element * @param array &$styles */ protected static function parseInput($node, $element, &$styles): void @@ -339,7 +339,7 @@ protected static function parseInput($node, $element, &$styles): void /** * Parse heading node. * - * @param \PhpOffice\PhpWord\Element\AbstractContainer $element + * @param AbstractContainer $element * @param array &$styles * @param string $argument1 Name of heading style * @@ -360,7 +360,7 @@ protected static function parseHeading($element, &$styles, $argument1) * Parse text node. * * @param DOMNode $node - * @param \PhpOffice\PhpWord\Element\AbstractContainer $element + * @param AbstractContainer $element * @param array &$styles */ protected static function parseText($node, $element, &$styles): void @@ -404,7 +404,7 @@ protected static function parseSpan($node, &$styles): void * Parse table node. * * @param DOMNode $node - * @param \PhpOffice\PhpWord\Element\AbstractContainer $element + * @param AbstractContainer $element * @param array &$styles * * @return Table $element @@ -435,7 +435,7 @@ protected static function parseTable($node, $element, &$styles) * Parse a table row. * * @param DOMNode $node - * @param \PhpOffice\PhpWord\Element\Table $element + * @param Table $element * @param array &$styles * * @return Row $element @@ -458,7 +458,7 @@ protected static function parseRow($node, $element, &$styles) * Parse table cell. * * @param DOMNode $node - * @param \PhpOffice\PhpWord\Element\Table $element + * @param Table $element * @param array &$styles * * @return \PhpOffice\PhpWord\Element\Cell|\PhpOffice\PhpWord\Element\TextRun $element @@ -552,7 +552,7 @@ protected static function filterOutNonInheritedStyles(array $styles) * Parse list node. * * @param DOMNode $node - * @param \PhpOffice\PhpWord\Element\AbstractContainer $element + * @param AbstractContainer $element * @param array &$styles * @param array &$data */ @@ -642,7 +642,7 @@ protected static function getListStyle($isOrderedList) * Parse list item node. * * @param DOMNode $node - * @param \PhpOffice\PhpWord\Element\AbstractContainer $element + * @param AbstractContainer $element * @param array &$styles * @param array $data * @@ -884,7 +884,7 @@ protected static function parseStyleDeclarations(array $selectors, array $styles * Parse image node. * * @param DOMNode $node - * @param \PhpOffice\PhpWord\Element\AbstractContainer $element + * @param AbstractContainer $element * * @return \PhpOffice\PhpWord\Element\Image */ @@ -1105,7 +1105,7 @@ protected static function mapListType($cssListType) /** * Parse line break. * - * @param \PhpOffice\PhpWord\Element\AbstractContainer $element + * @param AbstractContainer $element */ protected static function parseLineBreak($element): void { @@ -1116,7 +1116,7 @@ protected static function parseLineBreak($element): void * Parse link node. * * @param DOMNode $node - * @param \PhpOffice\PhpWord\Element\AbstractContainer $element + * @param AbstractContainer $element * @param array $styles */ protected static function parseLink($node, $element, &$styles) @@ -1144,7 +1144,7 @@ protected static function parseLink($node, $element, &$styles) * Note: Word rule is not the same as HTML's
since it does not support width and thus neither alignment. * * @param DOMNode $node - * @param \PhpOffice\PhpWord\Element\AbstractContainer $element + * @param AbstractContainer $element */ protected static function parseHorizRule($node, $element): void { diff --git a/src/PhpWord/SimpleType/Jc.php b/src/PhpWord/SimpleType/Jc.php index ab665822c4..bc4019f1ce 100644 --- a/src/PhpWord/SimpleType/Jc.php +++ b/src/PhpWord/SimpleType/Jc.php @@ -26,7 +26,7 @@ * Since ISO/IEC-29500:2008 the type must not be used for table alignment. * * @since 0.13.0 - * @see \PhpOffice\PhpWord\SimpleType\JcTable For table alignment modes available since ISO/IEC-29500:2008. + * @see JcTable For table alignment modes available since ISO/IEC-29500:2008. * @see http://www.datypic.com/sc/ooxml/t-w_ST_Jc.html */ final class Jc extends AbstractEnum diff --git a/src/PhpWord/Style.php b/src/PhpWord/Style.php index ea039622df..6788069c01 100644 --- a/src/PhpWord/Style.php +++ b/src/PhpWord/Style.php @@ -41,7 +41,7 @@ class Style * @param string $styleName * @param AbstractStyle|array $styles * - * @return \PhpOffice\PhpWord\Style\Paragraph + * @return Paragraph */ public static function addParagraphStyle($styleName, $styles) { @@ -55,7 +55,7 @@ public static function addParagraphStyle($styleName, $styles) * @param AbstractStyle|array $fontStyle * @param AbstractStyle|array $paragraphStyle * - * @return \PhpOffice\PhpWord\Style\Font + * @return Font */ public static function addFontStyle($styleName, $fontStyle, $paragraphStyle = null) { @@ -68,7 +68,7 @@ public static function addFontStyle($styleName, $fontStyle, $paragraphStyle = nu * @param string $styleName * @param AbstractStyle|array $styles * - * @return \PhpOffice\PhpWord\Style\Font + * @return Font */ public static function addLinkStyle($styleName, $styles) { @@ -81,7 +81,7 @@ public static function addLinkStyle($styleName, $styles) * @param string $styleName * @param AbstractStyle|array $styleValues * - * @return \PhpOffice\PhpWord\Style\Numbering + * @return Numbering * * @since 0.10.0 */ @@ -97,7 +97,7 @@ public static function addNumberingStyle($styleName, $styleValues) * @param AbstractStyle|array $fontStyle * @param AbstractStyle|array $paragraphStyle * - * @return \PhpOffice\PhpWord\Style\Font + * @return Font */ public static function addTitleStyle($depth, $fontStyle, $paragraphStyle = null) { @@ -117,7 +117,7 @@ public static function addTitleStyle($depth, $fontStyle, $paragraphStyle = null) * @param array $styleTable * @param null|array $styleFirstRow * - * @return \PhpOffice\PhpWord\Style\Table + * @return Table */ public static function addTableStyle($styleName, $styleTable, $styleFirstRow = null) { @@ -151,7 +151,7 @@ public static function resetStyles(): void * * @param AbstractStyle|array $styles Paragraph style definition * - * @return \PhpOffice\PhpWord\Style\Paragraph + * @return Paragraph */ public static function setDefaultParagraphStyle($styles) { diff --git a/src/PhpWord/Style/AbstractStyle.php b/src/PhpWord/Style/AbstractStyle.php index 4e5def618d..0b1c7df635 100644 --- a/src/PhpWord/Style/AbstractStyle.php +++ b/src/PhpWord/Style/AbstractStyle.php @@ -134,7 +134,7 @@ public function setAuto($value = true) /** * Return style value of child style object, e.g. `left` from `Indentation` child style of `Paragraph`. * - * @param \PhpOffice\PhpWord\Style\AbstractStyle $substyleObject + * @param AbstractStyle $substyleObject * @param string $substyleProperty * * @return mixed @@ -325,7 +325,7 @@ protected function setObjectVal($value, $styleName, &$style) { $styleClass = substr(static::class, 0, strrpos(static::class, '\\')) . '\\' . $styleName; if (is_array($value)) { - /** @var \PhpOffice\PhpWord\Style\AbstractStyle $style Type hint */ + /** @var AbstractStyle $style Type hint */ if (!$style instanceof $styleClass) { $style = new $styleClass(); } diff --git a/src/PhpWord/Style/Cell.php b/src/PhpWord/Style/Cell.php index 3246471fd5..f96ec5941d 100644 --- a/src/PhpWord/Style/Cell.php +++ b/src/PhpWord/Style/Cell.php @@ -100,7 +100,7 @@ class Cell extends Border /** * Shading. * - * @var \PhpOffice\PhpWord\Style\Shading + * @var Shading */ private $shading; @@ -260,7 +260,7 @@ public function setVMerge($value = null) /** * Get shading. * - * @return \PhpOffice\PhpWord\Style\Shading + * @return Shading */ public function getShading() { diff --git a/src/PhpWord/Style/Font.php b/src/PhpWord/Style/Font.php index fda95a9432..41baeffa60 100644 --- a/src/PhpWord/Style/Font.php +++ b/src/PhpWord/Style/Font.php @@ -219,14 +219,14 @@ class Font extends AbstractStyle /** * Paragraph style. * - * @var \PhpOffice\PhpWord\Style\Paragraph + * @var Paragraph */ private $paragraph; /** * Shading. * - * @var \PhpOffice\PhpWord\Style\Shading + * @var Shading */ private $shading; @@ -248,7 +248,7 @@ class Font extends AbstractStyle /** * Languages. * - * @var null|\PhpOffice\PhpWord\Style\Language + * @var null|Language */ private $lang; @@ -288,7 +288,7 @@ class Font extends AbstractStyle * Create new font style. * * @param string $type Type of font - * @param array|\PhpOffice\PhpWord\Style\AbstractStyle|string $paragraph Paragraph styles definition + * @param AbstractStyle|array|string $paragraph Paragraph styles definition */ public function __construct($type = 'text', $paragraph = null) { @@ -690,7 +690,7 @@ public function getBgColor() * * @param string $value * - * @return \PhpOffice\PhpWord\Style\Table + * @return Table */ public function setBgColor($value = null) { @@ -820,7 +820,7 @@ public function setLineHeight($value) /** * Get paragraph style. * - * @return \PhpOffice\PhpWord\Style\Paragraph + * @return Paragraph */ public function getParagraph() { @@ -868,7 +868,7 @@ public function setRTL($value = true) /** * Get shading. * - * @return \PhpOffice\PhpWord\Style\Shading + * @return Shading */ public function getShading() { @@ -892,7 +892,7 @@ public function setShading($value = null) /** * Get language. * - * @return null|\PhpOffice\PhpWord\Style\Language + * @return null|Language */ public function getLang() { diff --git a/src/PhpWord/Style/Paragraph.php b/src/PhpWord/Style/Paragraph.php index c77617403d..8d5e988bae 100644 --- a/src/PhpWord/Style/Paragraph.php +++ b/src/PhpWord/Style/Paragraph.php @@ -86,14 +86,14 @@ class Paragraph extends Border /** * Indentation. * - * @var null|\PhpOffice\PhpWord\Style\Indentation + * @var null|Indentation */ private $indentation; /** * Spacing. * - * @var \PhpOffice\PhpWord\Style\Spacing + * @var Spacing */ private $spacing; @@ -156,7 +156,7 @@ class Paragraph extends Border /** * Shading. * - * @var \PhpOffice\PhpWord\Style\Shading + * @var Shading */ private $shading; @@ -324,7 +324,7 @@ public function setNext($value = null) /** * Get indentation. * - * @return null|\PhpOffice\PhpWord\Style\Indentation + * @return null|Indentation */ public function getIndentation() { @@ -392,7 +392,7 @@ public function setHanging($value = null) /** * Get spacing. * - * @return \PhpOffice\PhpWord\Style\Spacing + * @return Spacing * * @todo Rename to getSpacing in 1.0 */ @@ -498,7 +498,7 @@ public function getSpacingLineRule() * * @param string $value Possible values are defined in LineSpacingRule * - * @return \PhpOffice\PhpWord\Style\Paragraph + * @return Paragraph */ public function setSpacingLineRule($value) { @@ -712,7 +712,7 @@ public function setTabs($value = null) /** * Get shading. * - * @return \PhpOffice\PhpWord\Style\Shading + * @return Shading */ public function getShading() { diff --git a/src/PhpWord/Style/Section.php b/src/PhpWord/Style/Section.php index 3b08aa5f38..d7130ea065 100644 --- a/src/PhpWord/Style/Section.php +++ b/src/PhpWord/Style/Section.php @@ -58,7 +58,7 @@ class Section extends Border /** * Paper size. * - * @var \PhpOffice\PhpWord\Style\Paper + * @var Paper */ private $paper; @@ -137,7 +137,7 @@ class Section extends Border /** * Line numbering. * - * @var \PhpOffice\PhpWord\Style\LineNumbering + * @var LineNumbering * * @see http://www.schemacentral.com/sc/ooxml/e-w_lnNumType-1.html */ @@ -278,7 +278,7 @@ public function getPageSizeW() /** * @param null|float|int $value * - * @return \PhpOffice\PhpWord\Style\Section + * @return Section * * @since 0.12.0 */ @@ -304,7 +304,7 @@ public function getPageSizeH() /** * @param null|float|int $value * - * @return \PhpOffice\PhpWord\Style\Section + * @return Section * * @since 0.12.0 */ @@ -486,7 +486,7 @@ public function setBreakType($value = null) /** * Get line numbering. * - * @return \PhpOffice\PhpWord\Style\LineNumbering + * @return LineNumbering */ public function getLineNumbering() { diff --git a/src/PhpWord/Style/Shape.php b/src/PhpWord/Style/Shape.php index 7dd62a1f71..dfd48662c6 100644 --- a/src/PhpWord/Style/Shape.php +++ b/src/PhpWord/Style/Shape.php @@ -51,35 +51,35 @@ class Shape extends AbstractStyle /** * Frame. * - * @var \PhpOffice\PhpWord\Style\Frame + * @var Frame */ private $frame; /** * Fill. * - * @var \PhpOffice\PhpWord\Style\Fill + * @var Fill */ private $fill; /** * Outline. * - * @var \PhpOffice\PhpWord\Style\Outline + * @var Outline */ private $outline; /** * Shadow. * - * @var \PhpOffice\PhpWord\Style\Shadow + * @var Shadow */ private $shadow; /** * 3D extrusion. * - * @var \PhpOffice\PhpWord\Style\Extrusion + * @var Extrusion */ private $extrusion; @@ -144,7 +144,7 @@ public function setRoundness($value = null) /** * Get frame. * - * @return \PhpOffice\PhpWord\Style\Frame + * @return Frame */ public function getFrame() { @@ -168,7 +168,7 @@ public function setFrame($value = null) /** * Get fill. * - * @return \PhpOffice\PhpWord\Style\Fill + * @return Fill */ public function getFill() { @@ -192,7 +192,7 @@ public function setFill($value = null) /** * Get outline. * - * @return \PhpOffice\PhpWord\Style\Outline + * @return Outline */ public function getOutline() { @@ -216,7 +216,7 @@ public function setOutline($value = null) /** * Get shadow. * - * @return \PhpOffice\PhpWord\Style\Shadow + * @return Shadow */ public function getShadow() { @@ -240,7 +240,7 @@ public function setShadow($value = null) /** * Get 3D extrusion. * - * @return \PhpOffice\PhpWord\Style\Extrusion + * @return Extrusion */ public function getExtrusion() { diff --git a/src/PhpWord/Style/Table.php b/src/PhpWord/Style/Table.php index 3adb1a38f5..fce0f0bc75 100644 --- a/src/PhpWord/Style/Table.php +++ b/src/PhpWord/Style/Table.php @@ -50,7 +50,7 @@ class Table extends Border /** * Style for first row. * - * @var \PhpOffice\PhpWord\Style\Table + * @var Table */ private $firstRowStyle; @@ -113,7 +113,7 @@ class Table extends Border /** * Shading. * - * @var \PhpOffice\PhpWord\Style\Shading + * @var Shading */ private $shading; @@ -208,7 +208,7 @@ public function getCellSpacing() /** * Set first row. * - * @return \PhpOffice\PhpWord\Style\Table + * @return Table */ public function getFirstRow() { @@ -538,7 +538,7 @@ public function hasMargin() /** * Get shading. * - * @return \PhpOffice\PhpWord\Style\Shading + * @return Shading */ public function getShading() { diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index 900169bd68..cd7326b270 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -154,7 +154,7 @@ public function __destruct() * To replace an image: $templateProcessor->zip()->AddFromString("word/media/image1.jpg", file_get_contents($file));
* To read a file: $templateProcessor->zip()->getFromName("word/media/image1.jpg"); * - * @return \PhpOffice\PhpWord\Shared\ZipArchive + * @return ZipArchive */ public function zip() { @@ -281,7 +281,7 @@ public function setComplexValue($search, Element\AbstractElement $complexType): $objectClass = 'PhpOffice\\PhpWord\\Writer\\Word2007\\Element\\' . $elementName; $xmlWriter = new XMLWriter(); - /** @var \PhpOffice\PhpWord\Writer\Word2007\Element\AbstractElement $elementWriter */ + /** @var Writer\Word2007\Element\AbstractElement $elementWriter */ $elementWriter = new $objectClass($xmlWriter, $complexType, true); $elementWriter->write(); @@ -308,7 +308,7 @@ public function setComplexBlock($search, Element\AbstractElement $complexType): $objectClass = 'PhpOffice\\PhpWord\\Writer\\Word2007\\Element\\' . $elementName; $xmlWriter = new XMLWriter(); - /** @var \PhpOffice\PhpWord\Writer\Word2007\Element\AbstractElement $elementWriter */ + /** @var Writer\Word2007\Element\AbstractElement $elementWriter */ $elementWriter = new $objectClass($xmlWriter, $complexType, false); $elementWriter->write(); @@ -406,7 +406,7 @@ public function setChart($search, Element\AbstractElement $chart): void $filename = "charts/chart{$rId}.xml"; // Get the part writer - $writerPart = new \PhpOffice\PhpWord\Writer\Word2007\Part\Chart(); + $writerPart = new Writer\Word2007\Part\Chart(); $writerPart->setElement($chart); // ContentTypes.xml @@ -1339,7 +1339,7 @@ protected function replaceClonedVariables($variableReplacements, $xmlBlock) * @param string $block New block content * @param string $blockType XML tag type of block * - * @return \PhpOffice\PhpWord\TemplateProcessor Fluent interface + * @return TemplateProcessor Fluent interface */ public function replaceXmlBlock($macro, $block, $blockType = 'w:p') { diff --git a/src/PhpWord/Writer/AbstractWriter.php b/src/PhpWord/Writer/AbstractWriter.php index 8ebf98c7b5..85770a84fb 100644 --- a/src/PhpWord/Writer/AbstractWriter.php +++ b/src/PhpWord/Writer/AbstractWriter.php @@ -33,7 +33,7 @@ abstract class AbstractWriter implements WriterInterface /** * PHPWord object. * - * @var \PhpOffice\PhpWord\PhpWord + * @var PhpWord */ protected $phpWord; @@ -96,7 +96,7 @@ abstract class AbstractWriter implements WriterInterface /** * Get PhpWord object. * - * @return \PhpOffice\PhpWord\PhpWord + * @return PhpWord */ public function getPhpWord() { @@ -110,7 +110,7 @@ public function getPhpWord() /** * Set PhpWord object. * - * @param \PhpOffice\PhpWord\PhpWord + * @param PhpWord * * @return self */ @@ -267,7 +267,7 @@ protected function clearTempDir(): void * * @param string $filename * - * @return \PhpOffice\PhpWord\Shared\ZipArchive + * @return ZipArchive */ protected function getZipArchive($filename) { @@ -360,7 +360,7 @@ protected function addFilesToPackage(ZipArchive $zip, $elements): void * * Get the actual source from an archive image. * - * @param \PhpOffice\PhpWord\Shared\ZipArchive $zipPackage + * @param ZipArchive $zipPackage * @param string $source * @param string $target */ diff --git a/src/PhpWord/Writer/HTML.php b/src/PhpWord/Writer/HTML.php index 647890591d..49a375ac58 100644 --- a/src/PhpWord/Writer/HTML.php +++ b/src/PhpWord/Writer/HTML.php @@ -77,7 +77,7 @@ public function __construct(?PhpWord $phpWord = null) foreach ($this->parts as $partName) { $partClass = 'PhpOffice\\PhpWord\\Writer\\HTML\\Part\\' . $partName; if (class_exists($partClass)) { - /** @var \PhpOffice\PhpWord\Writer\HTML\Part\AbstractPart $part Type hint */ + /** @var HTML\Part\AbstractPart $part Type hint */ $part = new $partClass(); $part->setParentWriter($this); $this->writerParts[strtolower($partName)] = $part; diff --git a/src/PhpWord/Writer/HTML/Element/AbstractElement.php b/src/PhpWord/Writer/HTML/Element/AbstractElement.php index 7c7bde3189..b1a58e3aa0 100644 --- a/src/PhpWord/Writer/HTML/Element/AbstractElement.php +++ b/src/PhpWord/Writer/HTML/Element/AbstractElement.php @@ -37,7 +37,7 @@ abstract class AbstractElement /** * Element. * - * @var \PhpOffice\PhpWord\Element\AbstractElement + * @var Element */ protected $element; diff --git a/src/PhpWord/Writer/HTML/Element/Container.php b/src/PhpWord/Writer/HTML/Element/Container.php index 7909e73f21..d8c09094d9 100644 --- a/src/PhpWord/Writer/HTML/Element/Container.php +++ b/src/PhpWord/Writer/HTML/Element/Container.php @@ -53,7 +53,7 @@ public function write() $elementClass = get_class($element); $writerClass = str_replace('PhpOffice\\PhpWord\\Element', $this->namespace, $elementClass); if (class_exists($writerClass)) { - /** @var \PhpOffice\PhpWord\Writer\HTML\Element\AbstractElement $writer Type hint */ + /** @var AbstractElement $writer Type hint */ $writer = new $writerClass($this->parentWriter, $element, $withoutP); $content .= $writer->write(); } diff --git a/src/PhpWord/Writer/ODText.php b/src/PhpWord/Writer/ODText.php index 616119e5cc..42910f36a2 100644 --- a/src/PhpWord/Writer/ODText.php +++ b/src/PhpWord/Writer/ODText.php @@ -55,7 +55,7 @@ public function __construct(?PhpWord $phpWord = null) foreach (array_keys($this->parts) as $partName) { $partClass = static::class . '\\Part\\' . $partName; if (class_exists($partClass)) { - /** @var \PhpOffice\PhpWord\Writer\ODText\Part\AbstractPart $partObject Type hint */ + /** @var AbstractPart $partObject Type hint */ $partObject = new $partClass(); $partObject->setParentWriter($this); $this->writerParts[strtolower($partName)] = $partObject; diff --git a/src/PhpWord/Writer/ODText/Element/Table.php b/src/PhpWord/Writer/ODText/Element/Table.php index e12ae24b58..bdddf628ec 100644 --- a/src/PhpWord/Writer/ODText/Element/Table.php +++ b/src/PhpWord/Writer/ODText/Element/Table.php @@ -35,7 +35,7 @@ public function write(): void { $xmlWriter = $this->getXmlWriter(); $element = $this->getElement(); - if (!$element instanceof \PhpOffice\PhpWord\Element\Table) { + if (!$element instanceof TableElement) { return; } $rows = $element->getRows(); @@ -77,7 +77,7 @@ private function writeColumns(XMLWriter $xmlWriter, TableElement $element): void private function writeRow(XMLWriter $xmlWriter, RowElement $row): void { $xmlWriter->startElement('table:table-row'); - /** @var \PhpOffice\PhpWord\Element\Row $row Type hint */ + /** @var RowElement $row Type hint */ foreach ($row->getCells() as $cell) { $xmlWriter->startElement('table:table-cell'); $xmlWriter->writeAttribute('office:value-type', 'string'); diff --git a/src/PhpWord/Writer/ODText/Part/Content.php b/src/PhpWord/Writer/ODText/Part/Content.php index 00871d9c52..8dcc2e7c38 100644 --- a/src/PhpWord/Writer/ODText/Part/Content.php +++ b/src/PhpWord/Writer/ODText/Part/Content.php @@ -230,7 +230,7 @@ private function writeTextStyles(XMLWriter $xmlWriter): void } } foreach ($this->imageParagraphStyles as $style) { - $styleWriter = new \PhpOffice\PhpWord\Writer\ODText\Style\Paragraph($xmlWriter, $style); + $styleWriter = new ParagraphStyleWriter($xmlWriter, $style); $styleWriter->write(); } } @@ -256,7 +256,7 @@ private function getAutoStyles(PhpWord $phpWord): void * * Table style can be null or string of the style name * - * @param \PhpOffice\PhpWord\Element\AbstractContainer $container + * @param AbstractContainer $container * @param int $paragraphStyleCount * @param int $fontStyleCount * @@ -277,7 +277,7 @@ private function getContainerStyle($container, &$paragraphStyleCount, &$fontStyl $style = $element->getStyle(); $style->setStyleName('fr' . $element->getMediaIndex()); $this->autoStyles['Image'][] = $style; - $sty = new \PhpOffice\PhpWord\Style\Paragraph(); + $sty = new Paragraph(); $sty->setStyleName('IM' . $element->getMediaIndex()); $sty->setAuto(); $sty->setAlignment($style->getAlignment()); @@ -300,7 +300,7 @@ private function getContainerStyle($container, &$paragraphStyleCount, &$fontStyl /** * Get style of individual element. * - * @param \PhpOffice\PhpWord\Element\Text $element + * @param Text $element * @param int $paragraphStyleCount * @param int $fontStyleCount */ @@ -346,7 +346,7 @@ private function getElementStyle($element, &$paragraphStyleCount, &$fontStyleCou /** * Get font style of individual field element. * - * @param \PhpOffice\PhpWord\Element\Field $element + * @param Field $element * @param int $fontStyleCount */ private function getElementStyleField($element, &$fontStyleCount): void @@ -371,7 +371,7 @@ private function getElementStyleField($element, &$fontStyleCount): void /** * Get style of individual element. * - * @param \PhpOffice\PhpWord\Element\TextRun $element + * @param TextRun $element * @param int $paragraphStyleCount */ private function getElementStyleTextRun($element, &$paragraphStyleCount): void diff --git a/src/PhpWord/Writer/ODText/Style/Font.php b/src/PhpWord/Writer/ODText/Style/Font.php index 1d0d14de97..e445942bd7 100644 --- a/src/PhpWord/Writer/ODText/Style/Font.php +++ b/src/PhpWord/Writer/ODText/Style/Font.php @@ -39,7 +39,7 @@ public function write(): void if ($stylep instanceof \PhpOffice\PhpWord\Style\Paragraph) { $temp1 = clone $stylep; $temp1->setStyleName($style->getStyleName()); - $temp2 = new \PhpOffice\PhpWord\Writer\ODText\Style\Paragraph($xmlWriter, $temp1); + $temp2 = new Paragraph($xmlWriter, $temp1); $temp2->write(); } diff --git a/src/PhpWord/Writer/ODText/Style/Paragraph.php b/src/PhpWord/Writer/ODText/Style/Paragraph.php index 4459c76c01..188f40ba5c 100644 --- a/src/PhpWord/Writer/ODText/Style/Paragraph.php +++ b/src/PhpWord/Writer/ODText/Style/Paragraph.php @@ -45,7 +45,7 @@ class Paragraph extends AbstractStyle public function write(): void { $style = $this->getStyle(); - if (!$style instanceof \PhpOffice\PhpWord\Style\Paragraph) { + if (!$style instanceof Style\Paragraph) { return; } $xmlWriter = $this->getXmlWriter(); @@ -73,13 +73,13 @@ public function write(): void } elseif (substr($styleName, 0, 2) === 'HD') { $styleAuto = true; $psm = 'Heading_' . substr($styleName, 2); - $stylep = \PhpOffice\PhpWord\Style::getStyle($psm); - if ($stylep instanceof \PhpOffice\PhpWord\Style\Font) { + $stylep = Style::getStyle($psm); + if ($stylep instanceof Style\Font) { if (method_exists($stylep, 'getParagraph')) { $stylep = $stylep->getParagraph(); } } - if ($stylep instanceof \PhpOffice\PhpWord\Style\Paragraph) { + if ($stylep instanceof Style\Paragraph) { if ($stylep->hasPageBreakBefore()) { $breakbefore = true; } diff --git a/src/PhpWord/Writer/PDF.php b/src/PhpWord/Writer/PDF.php index f937f599c1..95db8711e2 100644 --- a/src/PhpWord/Writer/PDF.php +++ b/src/PhpWord/Writer/PDF.php @@ -32,7 +32,7 @@ class PDF /** * The wrapper for the requested PDF rendering engine. * - * @var \PhpOffice\PhpWord\Writer\PDF\AbstractRenderer + * @var AbstractRenderer */ private $renderer; diff --git a/src/PhpWord/Writer/RTF.php b/src/PhpWord/Writer/RTF.php index 0a04d4f53e..b2fb9dc900 100644 --- a/src/PhpWord/Writer/RTF.php +++ b/src/PhpWord/Writer/RTF.php @@ -44,7 +44,7 @@ public function __construct(?PhpWord $phpWord = null) foreach ($this->parts as $partName) { $partClass = static::class . '\\Part\\' . $partName; if (class_exists($partClass)) { - /** @var \PhpOffice\PhpWord\Writer\RTF\Part\AbstractPart $part Type hint */ + /** @var RTF\Part\AbstractPart $part Type hint */ $part = new $partClass(); $part->setParentWriter($this); $this->writerParts[strtolower($partName)] = $part; diff --git a/src/PhpWord/Writer/RTF/Element/AbstractElement.php b/src/PhpWord/Writer/RTF/Element/AbstractElement.php index dedbc8bfa1..c6044ece10 100644 --- a/src/PhpWord/Writer/RTF/Element/AbstractElement.php +++ b/src/PhpWord/Writer/RTF/Element/AbstractElement.php @@ -38,14 +38,14 @@ abstract class AbstractElement /** * Parent writer. * - * @var \PhpOffice\PhpWord\Writer\AbstractWriter + * @var AbstractWriter */ protected $parentWriter; /** * Element. * - * @var \PhpOffice\PhpWord\Element\AbstractElement + * @var Element */ protected $element; @@ -66,14 +66,14 @@ abstract public function write(); /** * Font style. * - * @var \PhpOffice\PhpWord\Style\Font + * @var FontStyle */ protected $fontStyle; /** * Paragraph style. * - * @var \PhpOffice\PhpWord\Style\Paragraph + * @var ParagraphStyle */ protected $paragraphStyle; diff --git a/src/PhpWord/Writer/RTF/Part/Document.php b/src/PhpWord/Writer/RTF/Part/Document.php index a0002583a9..2180f0bdc0 100644 --- a/src/PhpWord/Writer/RTF/Part/Document.php +++ b/src/PhpWord/Writer/RTF/Part/Document.php @@ -162,12 +162,12 @@ private function writeSections() foreach ($section->getHeaders() as $header) { $type = $header->getType(); - if ($evenOdd || $type !== FOOTER::EVEN) { + if ($evenOdd || $type !== Footer::EVEN) { $content .= '{\\header'; if ($type === Footer::FIRST) { $content .= 'f'; } elseif ($evenOdd) { - $content .= ($type === FOOTER::EVEN) ? 'l' : 'r'; + $content .= ($type === Footer::EVEN) ? 'l' : 'r'; } foreach ($header->getElements() as $element) { $cl = get_class($element); @@ -182,12 +182,12 @@ private function writeSections() } foreach ($section->getFooters() as $footer) { $type = $footer->getType(); - if ($evenOdd || $type !== FOOTER::EVEN) { + if ($evenOdd || $type !== Footer::EVEN) { $content .= '{\\footer'; if ($type === Footer::FIRST) { $content .= 'f'; } elseif ($evenOdd) { - $content .= ($type === FOOTER::EVEN) ? 'l' : 'r'; + $content .= ($type === Footer::EVEN) ? 'l' : 'r'; } foreach ($footer->getElements() as $element) { $cl = get_class($element); diff --git a/src/PhpWord/Writer/RTF/Part/Header.php b/src/PhpWord/Writer/RTF/Part/Header.php index e4ad4bee0b..ecc31d4fbb 100644 --- a/src/PhpWord/Writer/RTF/Part/Header.php +++ b/src/PhpWord/Writer/RTF/Part/Header.php @@ -210,7 +210,7 @@ private function registerFont(): void /** * Register border colors. * - * @param \PhpOffice\PhpWord\Style\Border $style + * @param Style\Border $style */ private function registerBorderColor($style): void { @@ -225,7 +225,7 @@ private function registerBorderColor($style): void /** * Register fonts and colors. * - * @param \PhpOffice\PhpWord\Style\AbstractStyle $style + * @param Style\AbstractStyle $style */ private function registerFontItems($style): void { diff --git a/src/PhpWord/Writer/Word2007.php b/src/PhpWord/Writer/Word2007.php index ab4fd1e3eb..aea2c85078 100644 --- a/src/PhpWord/Writer/Word2007.php +++ b/src/PhpWord/Writer/Word2007.php @@ -44,7 +44,7 @@ class Word2007 extends AbstractWriter implements WriterInterface /** * Create new Word2007 writer. * - * @param \PhpOffice\PhpWord\PhpWord + * @param PhpWord */ public function __construct(?PhpWord $phpWord = null) { @@ -78,7 +78,7 @@ public function __construct(?PhpWord $phpWord = null) foreach (array_keys($this->parts) as $partName) { $partClass = static::class . '\\Part\\' . $partName; if (class_exists($partClass)) { - /** @var \PhpOffice\PhpWord\Writer\Word2007\Part\AbstractPart $part Type hint */ + /** @var Word2007\Part\AbstractPart $part Type hint */ $part = new $partClass(); $part->setParentWriter($this); $this->writerParts[strtolower($partName)] = $part; @@ -179,7 +179,7 @@ private function addHeaderFooterMedia(ZipArchive $zip, $docPart): void $this->registerContentTypes($media); } - /** @var \PhpOffice\PhpWord\Writer\Word2007\Part\AbstractPart $writerPart Type hint */ + /** @var Word2007\Part\AbstractPart $writerPart Type hint */ $writerPart = $this->getWriterPart('relspart')->setMedia($media); $zip->addFromString("word/_rels/{$file}.xml.rels", $writerPart->write()); } @@ -206,7 +206,7 @@ private function addHeaderFooterContent(Section &$section, ZipArchive $zip, $elm $this->contentTypes['override']["/word/$elmFile"] = $elmType; $this->relationships[] = ['target' => $elmFile, 'type' => $elmType, 'rID' => $rId]; - /** @var \PhpOffice\PhpWord\Writer\Word2007\Part\AbstractPart $writerPart Type hint */ + /** @var Word2007\Part\AbstractPart $writerPart Type hint */ $writerPart = $this->getWriterPart($elmType)->setElement($element); $zip->addFromString("word/$elmFile", $writerPart->write()); } @@ -237,7 +237,7 @@ private function addNotes(ZipArchive $zip, &$rId, $noteType = 'footnote'): void // Write relationships file, e.g. word/_rels/footnotes.xml if (!empty($media)) { - /** @var \PhpOffice\PhpWord\Writer\Word2007\Part\AbstractPart $writerPart Type hint */ + /** @var Word2007\Part\AbstractPart $writerPart Type hint */ $writerPart = $this->getWriterPart('relspart')->setMedia($media); $zip->addFromString("word/_rels/{$partName}.xml.rels", $writerPart->write()); } diff --git a/src/PhpWord/Writer/Word2007/Element/AbstractElement.php b/src/PhpWord/Writer/Word2007/Element/AbstractElement.php index abd1324aad..6ebadfc201 100644 --- a/src/PhpWord/Writer/Word2007/Element/AbstractElement.php +++ b/src/PhpWord/Writer/Word2007/Element/AbstractElement.php @@ -33,14 +33,14 @@ abstract class AbstractElement /** * XML writer. * - * @var \PhpOffice\PhpWord\Shared\XMLWriter + * @var XMLWriter */ private $xmlWriter; /** * Element. * - * @var \PhpOffice\PhpWord\Element\AbstractElement + * @var Element */ private $element; @@ -76,7 +76,7 @@ public function __construct(XMLWriter $xmlWriter, Element $element, $withoutP = /** * Get XML Writer. * - * @return \PhpOffice\PhpWord\Shared\XMLWriter + * @return XMLWriter */ protected function getXmlWriter() { @@ -86,7 +86,7 @@ protected function getXmlWriter() /** * Get element. * - * @return \PhpOffice\PhpWord\Element\AbstractElement + * @return Element */ protected function getElement() { diff --git a/src/PhpWord/Writer/Word2007/Element/Container.php b/src/PhpWord/Writer/Word2007/Element/Container.php index 491e813c9e..4ee0dd82a2 100644 --- a/src/PhpWord/Writer/Word2007/Element/Container.php +++ b/src/PhpWord/Writer/Word2007/Element/Container.php @@ -62,7 +62,7 @@ public function write(): void $writeLastTextBreak = ($containerClass == 'Cell') && ($elementClass == '' || $elementClass == 'Table'); if ($writeLastTextBreak) { $writerClass = $this->namespace . '\\TextBreak'; - /** @var \PhpOffice\PhpWord\Writer\Word2007\Element\AbstractElement $writer Type hint */ + /** @var AbstractElement $writer Type hint */ $writer = new $writerClass($xmlWriter, new TextBreakElement(), $withoutP); $writer->write(); } @@ -81,7 +81,7 @@ private function writeElement(XMLWriter $xmlWriter, Element $element, $withoutP) $writerClass = $this->namespace . '\\' . $elementClass; if (class_exists($writerClass)) { - /** @var \PhpOffice\PhpWord\Writer\Word2007\Element\AbstractElement $writer Type hint */ + /** @var AbstractElement $writer Type hint */ $writer = new $writerClass($xmlWriter, $element, $withoutP); $writer->setPart($this->getPart()); $writer->write(); diff --git a/src/PhpWord/Writer/Word2007/Part/AbstractPart.php b/src/PhpWord/Writer/Word2007/Part/AbstractPart.php index ef823f104d..be03ff92fc 100644 --- a/src/PhpWord/Writer/Word2007/Part/AbstractPart.php +++ b/src/PhpWord/Writer/Word2007/Part/AbstractPart.php @@ -30,7 +30,7 @@ abstract class AbstractPart /** * Parent writer. * - * @var \PhpOffice\PhpWord\Writer\AbstractWriter + * @var AbstractWriter */ protected $parentWriter; @@ -57,7 +57,7 @@ public function setParentWriter(?AbstractWriter $writer = null): void /** * Get parent writer. * - * @return \PhpOffice\PhpWord\Writer\AbstractWriter + * @return AbstractWriter */ public function getParentWriter() { @@ -71,7 +71,7 @@ public function getParentWriter() /** * Get XML Writer. * - * @return \PhpOffice\PhpWord\Shared\XMLWriter + * @return XMLWriter */ protected function getXmlWriter() { diff --git a/src/PhpWord/Writer/Word2007/Part/Chart.php b/src/PhpWord/Writer/Word2007/Part/Chart.php index 314b6453f3..9aaf61f15b 100644 --- a/src/PhpWord/Writer/Word2007/Part/Chart.php +++ b/src/PhpWord/Writer/Word2007/Part/Chart.php @@ -31,7 +31,7 @@ class Chart extends AbstractPart /** * Chart element. * - * @var \PhpOffice\PhpWord\Element\Chart + * @var ChartElement */ private $element; diff --git a/src/PhpWord/Writer/Word2007/Part/ContentTypes.php b/src/PhpWord/Writer/Word2007/Part/ContentTypes.php index c1da573e12..ea24673c25 100644 --- a/src/PhpWord/Writer/Word2007/Part/ContentTypes.php +++ b/src/PhpWord/Writer/Word2007/Part/ContentTypes.php @@ -80,7 +80,7 @@ public function write() /** * Write content types element. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter XML Writer + * @param XMLWriter $xmlWriter XML Writer * @param array $parts * @param bool $isDefault */ diff --git a/src/PhpWord/Writer/Word2007/Part/Footnotes.php b/src/PhpWord/Writer/Word2007/Part/Footnotes.php index 9624ab7459..f13c3ecf8a 100644 --- a/src/PhpWord/Writer/Word2007/Part/Footnotes.php +++ b/src/PhpWord/Writer/Word2007/Part/Footnotes.php @@ -136,7 +136,7 @@ public function setElements($elements) /** * Write note item. * - * @param \PhpOffice\PhpWord\Element\Endnote|\PhpOffice\PhpWord\Element\Footnote $element + * @param Footnote|\PhpOffice\PhpWord\Element\Endnote $element */ protected function writeNote(XMLWriter $xmlWriter, $element): void { diff --git a/src/PhpWord/Writer/Word2007/Part/Styles.php b/src/PhpWord/Writer/Word2007/Part/Styles.php index 2112fd3ce6..dcee1da289 100644 --- a/src/PhpWord/Writer/Word2007/Part/Styles.php +++ b/src/PhpWord/Writer/Word2007/Part/Styles.php @@ -125,7 +125,7 @@ private function writeDefaultStyles(XMLWriter $xmlWriter, $styles): void if (isset($styles['Normal'])) { $normalStyle = $styles['Normal']; // w:pPr - if ($normalStyle instanceof Fontstyle && $normalStyle->getParagraph() != null) { + if ($normalStyle instanceof FontStyle && $normalStyle->getParagraph() != null) { $styleWriter = new ParagraphStyleWriter($xmlWriter, $normalStyle->getParagraph()); $styleWriter->write(); } elseif ($normalStyle instanceof ParagraphStyle) { diff --git a/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php b/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php index dc4eccd2ce..54dd6daee7 100644 --- a/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php +++ b/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php @@ -30,7 +30,7 @@ abstract class AbstractStyle /** * XML writer. * - * @var \PhpOffice\PhpWord\Shared\XMLWriter + * @var XMLWriter */ private $xmlWriter; @@ -60,7 +60,7 @@ public function __construct(XMLWriter $xmlWriter, $style = null) /** * Get XML Writer. * - * @return \PhpOffice\PhpWord\Shared\XMLWriter + * @return XMLWriter */ protected function getXmlWriter() { @@ -114,7 +114,7 @@ protected function writeChildStyle(XMLWriter $xmlWriter, $name, $value): void if ($value !== null) { $class = 'PhpOffice\\PhpWord\\Writer\\Word2007\\Style\\' . $name; - /** @var \PhpOffice\PhpWord\Writer\Word2007\Style\AbstractStyle $writer */ + /** @var AbstractStyle $writer */ $writer = new $class($xmlWriter, $value); $writer->write(); } diff --git a/src/PhpWord/Writer/Word2007/Style/Paragraph.php b/src/PhpWord/Writer/Word2007/Style/Paragraph.php index d4ec87a1ab..4ac842345d 100644 --- a/src/PhpWord/Writer/Word2007/Style/Paragraph.php +++ b/src/PhpWord/Writer/Word2007/Style/Paragraph.php @@ -171,7 +171,7 @@ private function writeNumbering(XMLWriter $xmlWriter, $numbering): void $numStyle = $numbering['style']; $numLevel = $numbering['level']; - /** @var \PhpOffice\PhpWord\Style\Numbering $numbering */ + /** @var Style\Numbering $numbering */ $numbering = Style::getStyle($numStyle); if ($numStyle !== null && $numbering !== null) { $xmlWriter->startElement('w:numPr'); diff --git a/tests/PhpWordTests/AbstractTestReader.php b/tests/PhpWordTests/AbstractTestReader.php index 121a213850..c65cef25e4 100644 --- a/tests/PhpWordTests/AbstractTestReader.php +++ b/tests/PhpWordTests/AbstractTestReader.php @@ -36,7 +36,7 @@ abstract class AbstractTestReader extends \PHPUnit\Framework\TestCase /** * Builds a PhpWord instance based on the xml passed. * - * @return \PhpOffice\PhpWord\PhpWord + * @return PhpWord */ protected function getDocumentFromString(array $partXmls = []) { diff --git a/tests/PhpWordTests/Escaper/RtfEscaper3Test.php b/tests/PhpWordTests/Escaper/RtfEscaper3Test.php index 6bbc089a2a..61f715be6e 100644 --- a/tests/PhpWordTests/Escaper/RtfEscaper3Test.php +++ b/tests/PhpWordTests/Escaper/RtfEscaper3Test.php @@ -35,7 +35,7 @@ protected function tearDown(): void public function escapestring(string $str): string { - \PhpOffice\PhpWord\Settings::setOutputEscapingEnabled(true); + Settings::setOutputEscapingEnabled(true); $parentWriter = new \PhpOffice\PhpWord\Writer\RTF(); $element = new \PhpOffice\PhpWord\Element\Text($str); $txt = new \PhpOffice\PhpWord\Writer\RTF\Element\Text($parentWriter, $element); diff --git a/tests/PhpWordTests/Exception/CopyFileExceptionTest.php b/tests/PhpWordTests/Exception/CopyFileExceptionTest.php index a4574b6be1..a5cd8cabea 100644 --- a/tests/PhpWordTests/Exception/CopyFileExceptionTest.php +++ b/tests/PhpWordTests/Exception/CopyFileExceptionTest.php @@ -33,7 +33,7 @@ class CopyFileExceptionTest extends \PHPUnit\Framework\TestCase */ public function testCopyFileExceptionCanBeThrown(): void { - $this->expectException(\PhpOffice\PhpWord\Exception\CopyFileException::class); + $this->expectException(CopyFileException::class); throw new CopyFileException('C:\source\dummy.txt', 'C:\destination\dummy.txt'); } diff --git a/tests/PhpWordTests/Exception/CreateTemporaryFileExceptionTest.php b/tests/PhpWordTests/Exception/CreateTemporaryFileExceptionTest.php index 834a1c09fc..b676bdbea5 100644 --- a/tests/PhpWordTests/Exception/CreateTemporaryFileExceptionTest.php +++ b/tests/PhpWordTests/Exception/CreateTemporaryFileExceptionTest.php @@ -33,7 +33,7 @@ class CreateTemporaryFileExceptionTest extends \PHPUnit\Framework\TestCase */ public function testCreateTemporaryFileExceptionCanBeThrown(): void { - $this->expectException(\PhpOffice\PhpWord\Exception\CreateTemporaryFileException::class); + $this->expectException(CreateTemporaryFileException::class); throw new CreateTemporaryFileException(); } diff --git a/tests/PhpWordTests/Exception/InvalidImageExceptionTest.php b/tests/PhpWordTests/Exception/InvalidImageExceptionTest.php index d3cb57578e..1f713b2633 100644 --- a/tests/PhpWordTests/Exception/InvalidImageExceptionTest.php +++ b/tests/PhpWordTests/Exception/InvalidImageExceptionTest.php @@ -35,7 +35,7 @@ class InvalidImageExceptionTest extends \PHPUnit\Framework\TestCase */ public function testThrowException(): void { - $this->expectException(\PhpOffice\PhpWord\Exception\InvalidImageException::class); + $this->expectException(InvalidImageException::class); throw new InvalidImageException(); } diff --git a/tests/PhpWordTests/Exception/InvalidStyleExceptionTest.php b/tests/PhpWordTests/Exception/InvalidStyleExceptionTest.php index d1da3b2a85..6bc106fbbc 100644 --- a/tests/PhpWordTests/Exception/InvalidStyleExceptionTest.php +++ b/tests/PhpWordTests/Exception/InvalidStyleExceptionTest.php @@ -35,7 +35,7 @@ class InvalidStyleExceptionTest extends \PHPUnit\Framework\TestCase */ public function testThrowException(): void { - $this->expectException(\PhpOffice\PhpWord\Exception\InvalidStyleException::class); + $this->expectException(InvalidStyleException::class); throw new InvalidStyleException(); } diff --git a/tests/PhpWordTests/Exception/UnsupportedImageTypeExceptionTest.php b/tests/PhpWordTests/Exception/UnsupportedImageTypeExceptionTest.php index e978b97254..03b53bd67a 100644 --- a/tests/PhpWordTests/Exception/UnsupportedImageTypeExceptionTest.php +++ b/tests/PhpWordTests/Exception/UnsupportedImageTypeExceptionTest.php @@ -33,7 +33,7 @@ class UnsupportedImageTypeExceptionTest extends \PHPUnit\Framework\TestCase */ public function testThrowException(): void { - $this->expectException(\PhpOffice\PhpWord\Exception\UnsupportedImageTypeException::class); + $this->expectException(UnsupportedImageTypeException::class); throw new UnsupportedImageTypeException(); } diff --git a/tests/PhpWordTests/Reader/Word2007/ElementTest.php b/tests/PhpWordTests/Reader/Word2007/ElementTest.php index f96d8ac1a2..9ff0063322 100644 --- a/tests/PhpWordTests/Reader/Word2007/ElementTest.php +++ b/tests/PhpWordTests/Reader/Word2007/ElementTest.php @@ -195,13 +195,13 @@ public function testReadTrackChange(): void self::assertEquals('two', $textRun->getElement(1)->getText()); self::assertNotNull($textRun->getElement(1)->getTrackChange()); - /** @var \PhpOffice\PhpWord\Element\TrackChange $trackChange */ + /** @var TrackChange $trackChange */ $trackChange = $textRun->getElement(1)->getTrackChange(); self::assertEquals(TrackChange::DELETED, $trackChange->getChangeType()); self::assertEquals('three', $textRun->getElement(2)->getText()); self::assertNotNull($textRun->getElement(2)->getTrackChange()); - /** @var \PhpOffice\PhpWord\Element\TrackChange $trackChange */ + /** @var TrackChange $trackChange */ $trackChange = $textRun->getElement(2)->getTrackChange(); self::assertEquals(TrackChange::INSERTED, $trackChange->getChangeType()); } diff --git a/tests/PhpWordTests/Reader/Word2007/StyleTest.php b/tests/PhpWordTests/Reader/Word2007/StyleTest.php index 015a3cfcb7..69e9f70ad5 100644 --- a/tests/PhpWordTests/Reader/Word2007/StyleTest.php +++ b/tests/PhpWordTests/Reader/Word2007/StyleTest.php @@ -67,7 +67,7 @@ public function testReadTablePosition(): void self::assertInstanceOf('PhpOffice\PhpWord\Style\Table', $elements[0]->getStyle()); self::assertNotNull($elements[0]->getStyle()->getPosition()); self::assertInstanceOf('PhpOffice\PhpWord\Style\TablePosition', $elements[0]->getStyle()->getPosition()); - /** @var \PhpOffice\PhpWord\Style\TablePosition $tableStyle */ + /** @var TablePosition $tableStyle */ $tableStyle = $elements[0]->getStyle()->getPosition(); self::assertEquals(10, $tableStyle->getLeftFromText()); self::assertEquals(20, $tableStyle->getRightFromText()); @@ -118,7 +118,7 @@ public function testReadTableCellSpacing(): void $elements = $phpWord->getSection(0)->getElements(); self::assertInstanceOf('PhpOffice\PhpWord\Element\Table', $elements[0]); self::assertInstanceOf('PhpOffice\PhpWord\Style\Table', $elements[0]->getStyle()); - /** @var \PhpOffice\PhpWord\Style\Table $tableStyle */ + /** @var Table $tableStyle */ $tableStyle = $elements[0]->getStyle(); self::assertEquals(TblWidth::AUTO, $tableStyle->getUnit()); self::assertEquals(10.5, $tableStyle->getCellSpacing()); @@ -187,7 +187,7 @@ public function testReadPosition(): void self::assertInstanceOf('PhpOffice\PhpWord\Element\TextRun', $textRun); self::assertInstanceOf('PhpOffice\PhpWord\Element\Text', $textRun->getElement(0)); self::assertInstanceOf('PhpOffice\PhpWord\Style\Font', $textRun->getElement(0)->getFontStyle()); - /** @var \PhpOffice\PhpWord\Style\Font $fontStyle */ + /** @var Style\Font $fontStyle */ $fontStyle = $textRun->getElement(0)->getFontStyle(); self::assertEquals(15, $fontStyle->getPosition()); } @@ -205,7 +205,7 @@ public function testReadIndent(): void $elements = $phpWord->getSection(0)->getElements(); self::assertInstanceOf('PhpOffice\PhpWord\Element\Table', $elements[0]); self::assertInstanceOf('PhpOffice\PhpWord\Style\Table', $elements[0]->getStyle()); - /** @var \PhpOffice\PhpWord\Style\Table $tableStyle */ + /** @var Table $tableStyle */ $tableStyle = $elements[0]->getStyle(); self::assertSame(TblWidth::TWIP, $tableStyle->getIndent()->getType()); self::assertSame(2160, $tableStyle->getIndent()->getValue()); @@ -224,7 +224,7 @@ public function testReadTableRTL(): void $elements = $phpWord->getSection(0)->getElements(); self::assertInstanceOf('PhpOffice\PhpWord\Element\Table', $elements[0]); self::assertInstanceOf('PhpOffice\PhpWord\Style\Table', $elements[0]->getStyle()); - /** @var \PhpOffice\PhpWord\Style\Table $tableStyle */ + /** @var Table $tableStyle */ $tableStyle = $elements[0]->getStyle(); self::assertTrue($tableStyle->isBidiVisual()); } @@ -248,7 +248,7 @@ public function testReadHidden(): void self::assertInstanceOf('PhpOffice\PhpWord\Element\TextRun', $textRun); self::assertInstanceOf('PhpOffice\PhpWord\Element\Text', $textRun->getElement(0)); self::assertInstanceOf('PhpOffice\PhpWord\Style\Font', $textRun->getElement(0)->getFontStyle()); - /** @var \PhpOffice\PhpWord\Style\Font $fontStyle */ + /** @var Style\Font $fontStyle */ $fontStyle = $textRun->getElement(0)->getFontStyle(); self::assertTrue($fontStyle->isHidden()); } diff --git a/tests/PhpWordTests/Style/ImageTest.php b/tests/PhpWordTests/Style/ImageTest.php index 49c737572f..430584c7cc 100644 --- a/tests/PhpWordTests/Style/ImageTest.php +++ b/tests/PhpWordTests/Style/ImageTest.php @@ -71,11 +71,11 @@ public function testSetStyleValue(): void 'marginTop' => 240, 'marginLeft' => 240, 'position' => 10, - 'positioning' => \PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE, - 'posHorizontal' => \PhpOffice\PhpWord\Style\Image::POSITION_HORIZONTAL_CENTER, - 'posVertical' => \PhpOffice\PhpWord\Style\Image::POSITION_VERTICAL_TOP, - 'posHorizontalRel' => \PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_COLUMN, - 'posVerticalRel' => \PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_IMARGIN, + 'positioning' => Image::POSITION_ABSOLUTE, + 'posHorizontal' => Image::POSITION_HORIZONTAL_CENTER, + 'posVertical' => Image::POSITION_VERTICAL_TOP, + 'posHorizontalRel' => Image::POSITION_RELATIVE_TO_COLUMN, + 'posVerticalRel' => Image::POSITION_RELATIVE_TO_IMARGIN, 'wrapDistanceLeft' => 10, 'wrapDistanceRight' => 20, 'wrapDistanceTop' => 30, diff --git a/tests/PhpWordTests/Style/LineTest.php b/tests/PhpWordTests/Style/LineTest.php index 5ace86750e..ca618e6e1e 100644 --- a/tests/PhpWordTests/Style/LineTest.php +++ b/tests/PhpWordTests/Style/LineTest.php @@ -36,10 +36,10 @@ public function testSetGetNormal(): void $object = new Line(); $properties = [ - 'connectorType' => \PhpOffice\PhpWord\Style\Line::CONNECTOR_TYPE_STRAIGHT, - 'beginArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK, - 'endArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_OVAL, - 'dash' => \PhpOffice\PhpWord\Style\Line::DASH_STYLE_LONG_DASH_DOT_DOT, + 'connectorType' => Line::CONNECTOR_TYPE_STRAIGHT, + 'beginArrow' => Line::ARROW_STYLE_BLOCK, + 'endArrow' => Line::ARROW_STYLE_OVAL, + 'dash' => Line::DASH_STYLE_LONG_DASH_DOT_DOT, 'weight' => 10, 'color' => 'red', ]; @@ -59,10 +59,10 @@ public function testSetStyleValue(): void $object = new Line(); $properties = [ - 'connectorType' => \PhpOffice\PhpWord\Style\Line::CONNECTOR_TYPE_STRAIGHT, - 'beginArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK, - 'endArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_OVAL, - 'dash' => \PhpOffice\PhpWord\Style\Line::DASH_STYLE_LONG_DASH_DOT_DOT, + 'connectorType' => Line::CONNECTOR_TYPE_STRAIGHT, + 'beginArrow' => Line::ARROW_STYLE_BLOCK, + 'endArrow' => Line::ARROW_STYLE_OVAL, + 'dash' => Line::DASH_STYLE_LONG_DASH_DOT_DOT, 'weight' => 10, 'color' => 'red', ]; @@ -89,7 +89,7 @@ public function testSetGetFlip(): void */ public function testSetGetConnectorType(): void { - $expected = \PhpOffice\PhpWord\Style\Line::CONNECTOR_TYPE_STRAIGHT; + $expected = Line::CONNECTOR_TYPE_STRAIGHT; $object = new Line(); $object->setConnectorType($expected); self::assertEquals($expected, $object->getConnectorType()); @@ -122,7 +122,7 @@ public function testSetGetColor(): void */ public function testSetGetDash(): void { - $expected = \PhpOffice\PhpWord\Style\Line::DASH_STYLE_LONG_DASH_DOT_DOT; + $expected = Line::DASH_STYLE_LONG_DASH_DOT_DOT; $object = new Line(); $object->setDash($expected); self::assertEquals($expected, $object->getDash()); @@ -133,7 +133,7 @@ public function testSetGetDash(): void */ public function testSetGetBeginArrow(): void { - $expected = \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK; + $expected = Line::ARROW_STYLE_BLOCK; $object = new Line(); $object->setBeginArrow($expected); self::assertEquals($expected, $object->getBeginArrow()); @@ -144,7 +144,7 @@ public function testSetGetBeginArrow(): void */ public function testSetGetEndArrow(): void { - $expected = \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_CLASSIC; + $expected = Line::ARROW_STYLE_CLASSIC; $object = new Line(); $object->setEndArrow($expected); self::assertEquals($expected, $object->getEndArrow()); diff --git a/tests/PhpWordTests/TemplateProcessorTest.php b/tests/PhpWordTests/TemplateProcessorTest.php index b8ad970ced..340ccb2fba 100644 --- a/tests/PhpWordTests/TemplateProcessorTest.php +++ b/tests/PhpWordTests/TemplateProcessorTest.php @@ -863,15 +863,15 @@ public function testSetImageValue(): void // dynamic generated doc $testFileName = 'images-test-sample.docx'; - $phpWord = new \PhpOffice\PhpWord\PhpWord(); + $phpWord = new PhpWord(); $section = $phpWord->addSection(); $section->addText('${Test:width=100:ratio=true}'); - $objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007'); + $objWriter = IOFactory::createWriter($phpWord, 'Word2007'); $objWriter->save($testFileName); self::assertFileExists($testFileName, "Generated file '{$testFileName}' not found!"); $resultFileName = 'images-test-result.docx'; - $templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor($testFileName); + $templateProcessor = new TemplateProcessor($testFileName); unlink($testFileName); $templateProcessor->setImageValue('Test', $imagePath); $templateProcessor->setImageValue('Test1', $imagePath); diff --git a/tests/PhpWordTests/TestHelperDOCX.php b/tests/PhpWordTests/TestHelperDOCX.php index de9f1a81b7..67d89c8326 100644 --- a/tests/PhpWordTests/TestHelperDOCX.php +++ b/tests/PhpWordTests/TestHelperDOCX.php @@ -42,7 +42,7 @@ class TestHelperDOCX * * @param string $writerName * - * @return \PhpOffice\PhpWordTests\XmlDocument + * @return XmlDocument */ public static function getDocument(PhpWord $phpWord, $writerName = 'Word2007') { diff --git a/tests/PhpWordTests/Writer/ODText/ElementTest.php b/tests/PhpWordTests/Writer/ODText/ElementTest.php index 0ad0325656..2c0ab24074 100644 --- a/tests/PhpWordTests/Writer/ODText/ElementTest.php +++ b/tests/PhpWordTests/Writer/ODText/ElementTest.php @@ -195,7 +195,7 @@ public function testTitleAndHeading(): void */ public function testTextRunTitle(): void { - $phpWord = new \PhpOffice\PhpWord\PhpWord(); + $phpWord = new PhpWord(); $phpWord->addTitleStyle(1, ['name' => 'Times New Roman', 'size' => 18, 'bold' => true]); $section = $phpWord->addSection(); $section->addTitle('Text Title', 1); @@ -275,7 +275,7 @@ public function testPageBreak(): void */ public function testTrackedChanges(): void { - $phpWord = new \PhpOffice\PhpWord\PhpWord(); + $phpWord = new PhpWord(); // New portrait section $section = $phpWord->addSection(); diff --git a/tests/PhpWordTests/Writer/ODText/Part/AbstractPartTest.php b/tests/PhpWordTests/Writer/ODText/Part/AbstractPartTest.php index 3ebc534b21..ec24c17734 100644 --- a/tests/PhpWordTests/Writer/ODText/Part/AbstractPartTest.php +++ b/tests/PhpWordTests/Writer/ODText/Part/AbstractPartTest.php @@ -33,7 +33,7 @@ class AbstractPartTest extends \PHPUnit\Framework\TestCase */ public function testSetGetParentWriter(): void { - $object = $this->getMockForAbstractClass(\PhpOffice\PhpWord\Writer\ODText\Part\AbstractPart::class); + $object = $this->getMockForAbstractClass(ODText\Part\AbstractPart::class); $object->setParentWriter(new ODText()); self::assertEquals(new ODText(), $object->getParentWriter()); } @@ -45,7 +45,7 @@ public function testSetGetParentWriterNull(): void { $this->expectException(Exception::class); $this->expectExceptionMessage('No parent WriterInterface assigned.'); - $object = $this->getMockForAbstractClass(\PhpOffice\PhpWord\Writer\ODText\Part\AbstractPart::class); + $object = $this->getMockForAbstractClass(ODText\Part\AbstractPart::class); $object->getParentWriter(); } } diff --git a/tests/PhpWordTests/Writer/ODText/Style/FontTest.php b/tests/PhpWordTests/Writer/ODText/Style/FontTest.php index 34e5e506b4..5dc851634b 100644 --- a/tests/PhpWordTests/Writer/ODText/Style/FontTest.php +++ b/tests/PhpWordTests/Writer/ODText/Style/FontTest.php @@ -42,7 +42,7 @@ public function testColors(): void $section = $phpWord->addSection(); $section->addText('This is red (800) in rtf/html, default in docx/odt', ['color' => '800']); $section->addText('This should be cyanish (008787)', ['color' => '008787']); - $section->addText('This should be dark green (FGCOLOR_DARKGREEN)', ['color' => \PhpOffice\PhpWord\Style\Font::FGCOLOR_DARKGREEN]); + $section->addText('This should be dark green (FGCOLOR_DARKGREEN)', ['color' => Font::FGCOLOR_DARKGREEN]); $section->addText('This color is default (unknow)', ['color' => 'unknow']); $doc = TestHelperDOCX::getDocument($phpWord, 'ODText'); @@ -219,7 +219,7 @@ public function testFieldStyles(): void $fld->setFontStyle(['color' => '008000']); $textrun = $section->addTextRun(); $fld = $textrun->addField('DATE'); - $font = new \PhpOffice\PhpWord\Style\Font(); + $font = new Font(); $font->setColor('000080'); $fld->setFontStyle($font); $textrun = $section->addTextRun(); diff --git a/tests/PhpWordTests/Writer/ODText/Style/ParagraphTest.php b/tests/PhpWordTests/Writer/ODText/Style/ParagraphTest.php index 778bb20b5f..fa9e0789f2 100644 --- a/tests/PhpWordTests/Writer/ODText/Style/ParagraphTest.php +++ b/tests/PhpWordTests/Writer/ODText/Style/ParagraphTest.php @@ -363,7 +363,7 @@ public function testHeadingPageBreakBefore(): void */ public function testTextRun(): void { - $phpWord = new \PhpOffice\PhpWord\PhpWord(); + $phpWord = new PhpWord(); $phpWord->addParagraphStyle('parstyle1', ['align' => 'start']); $phpWord->addParagraphStyle('parstyle2', ['align' => 'end']); $section = $phpWord->addSection(); @@ -403,7 +403,7 @@ public function testTextRun(): void */ public function testTextRunUnnamed(): void { - $phpWord = new \PhpOffice\PhpWord\PhpWord(); + $phpWord = new PhpWord(); $parstyle1 = ['align' => 'start']; $parstyle2 = ['align' => 'end']; $section = $phpWord->addSection(); @@ -437,7 +437,7 @@ public function testTextRunUnnamed(): void */ public function testEmptyFontAndParagraphStyles(): void { - $phpWord = new \PhpOffice\PhpWord\PhpWord(); + $phpWord = new PhpWord(); $section = $phpWord->addSection(); $phpWord->addFontStyle('namedfont', ['name' => 'Courier New', 'size' => 8]); $phpWord->addParagraphStyle('namedpar', ['lineHeight' => 1.08]); diff --git a/tests/PhpWordTests/Writer/ODText/Style/SectionTest.php b/tests/PhpWordTests/Writer/ODText/Style/SectionTest.php index cbd58da455..9eef1b0741 100644 --- a/tests/PhpWordTests/Writer/ODText/Style/SectionTest.php +++ b/tests/PhpWordTests/Writer/ODText/Style/SectionTest.php @@ -38,7 +38,7 @@ protected function tearDown(): void */ public function testHeaderFooterTabs(): void { - $phpWord = new \PhpOffice\PhpWord\PhpWord(); + $phpWord = new PhpWord(); $margins = \PhpOffice\PhpWord\Shared\Converter::INCH_TO_TWIP; $phpWord->addFontStyle('hdrstyle1', ['name' => 'Courier New', 'size' => 8]); $section = $phpWord->addSection(['paperSize' => 'Letter', 'marginTop' => $margins, 'marginBottom' => $margins]); diff --git a/tests/PhpWordTests/Writer/RTF/ElementTest.php b/tests/PhpWordTests/Writer/RTF/ElementTest.php index fd0842cd6c..d606a6bbcd 100644 --- a/tests/PhpWordTests/Writer/RTF/ElementTest.php +++ b/tests/PhpWordTests/Writer/RTF/ElementTest.php @@ -49,7 +49,7 @@ public function testFilenameField(): void { $parentWriter = new RTF(); $element = new \PhpOffice\PhpWord\Element\Field('FILENAME'); - $field = new \PhpOffice\PhpWord\Writer\RTF\Element\Field($parentWriter, $element); + $field = new RTF\Element\Field($parentWriter, $element); self::assertEquals("{\\field{\\*\\fldinst FILENAME}{\\fldrslt}}\\par\n", $this->removeCr($field)); } @@ -58,7 +58,7 @@ public function testFilenameFieldOptionsPath(): void { $parentWriter = new RTF(); $element = new \PhpOffice\PhpWord\Element\Field('FILENAME', [], ['Path']); - $field = new \PhpOffice\PhpWord\Writer\RTF\Element\Field($parentWriter, $element); + $field = new RTF\Element\Field($parentWriter, $element); self::assertEquals("{\\field{\\*\\fldinst FILENAME \\\\p}{\\fldrslt}}\\par\n", $this->removeCr($field)); } @@ -67,7 +67,7 @@ public function testPageField(): void { $parentWriter = new RTF(); $element = new \PhpOffice\PhpWord\Element\Field('PAGE'); - $field = new \PhpOffice\PhpWord\Writer\RTF\Element\Field($parentWriter, $element); + $field = new RTF\Element\Field($parentWriter, $element); self::assertEquals("{\\field{\\*\\fldinst PAGE}{\\fldrslt}}\\par\n", $this->removeCr($field)); } @@ -76,7 +76,7 @@ public function testNumpageField(): void { $parentWriter = new RTF(); $element = new \PhpOffice\PhpWord\Element\Field('NUMPAGES'); - $field = new \PhpOffice\PhpWord\Writer\RTF\Element\Field($parentWriter, $element); + $field = new RTF\Element\Field($parentWriter, $element); self::assertEquals("{\\field{\\*\\fldinst NUMPAGES}{\\fldrslt}}\\par\n", $this->removeCr($field)); } @@ -85,7 +85,7 @@ public function testDateField(): void { $parentWriter = new RTF(); $element = new \PhpOffice\PhpWord\Element\Field('DATE', ['dateformat' => 'd MM yyyy H:mm:ss']); - $field = new \PhpOffice\PhpWord\Writer\RTF\Element\Field($parentWriter, $element); + $field = new RTF\Element\Field($parentWriter, $element); self::assertEquals("{\\field{\\*\\fldinst DATE \\\\@ \"d MM yyyy H:mm:ss\"}{\\fldrslt}}\\par\n", $this->removeCr($field)); } @@ -94,7 +94,7 @@ public function testIndexField(): void { $parentWriter = new RTF(); $element = new \PhpOffice\PhpWord\Element\Field('INDEX'); - $field = new \PhpOffice\PhpWord\Writer\RTF\Element\Field($parentWriter, $element); + $field = new RTF\Element\Field($parentWriter, $element); self::assertEquals("{}\\par\n", $this->removeCr($field)); } @@ -115,7 +115,7 @@ public function testTable(): void $tce->addText('3'); $tce = $element->addCell($width); $tce->addText('4'); - $table = new \PhpOffice\PhpWord\Writer\RTF\Element\Table($parentWriter, $element); + $table = new RTF\Element\Table($parentWriter, $element); $expect = implode("\n", [ '\\pard', "\\trowd \\cellx$width \\cellx$width2 ", @@ -147,7 +147,7 @@ public function testTextRun(): void $element = new \PhpOffice\PhpWord\Element\TextRun(); $element->addText('Hello '); $element->addText('there.'); - $textrun = new \PhpOffice\PhpWord\Writer\RTF\Element\TextRun($parentWriter, $element); + $textrun = new RTF\Element\TextRun($parentWriter, $element); $expect = "\\pard\\nowidctlpar {{\\cf0\\f0 Hello }{\\cf0\\f0 there.}}\\par\n"; self::assertEquals($expect, $this->removeCr($textrun)); } @@ -158,7 +158,7 @@ public function testTextRunParagraphStyle(): void $element = new \PhpOffice\PhpWord\Element\TextRun(['spaceBefore' => 0, 'spaceAfter' => 0]); $element->addText('Hello '); $element->addText('there.'); - $textrun = new \PhpOffice\PhpWord\Writer\RTF\Element\TextRun($parentWriter, $element); + $textrun = new RTF\Element\TextRun($parentWriter, $element); $expect = "\\pard\\nowidctlpar \\sb0\\sa0{{\\cf0\\f0 Hello }{\\cf0\\f0 there.}}\\par\n"; self::assertEquals($expect, $this->removeCr($textrun)); } @@ -170,7 +170,7 @@ public function testTitle(): void $phpWord->addTitleStyle(1, [], ['spaceBefore' => 0, 'spaceAfter' => 0]); $section = $phpWord->addSection(); $element = $section->addTitle('First Heading', 1); - $elwrite = new \PhpOffice\PhpWord\Writer\RTF\Element\Title($parentWriter, $element); + $elwrite = new RTF\Element\Title($parentWriter, $element); $expect = "\\pard\\nowidctlpar \\sb0\\sa0{\\outlinelevel0{\\cf0\\f0 First Heading}\\par\n}"; self::assertEquals($expect, $this->removeCr($elwrite)); } diff --git a/tests/PhpWordTests/Writer/RTF/StyleTest.php b/tests/PhpWordTests/Writer/RTF/StyleTest.php index 8f09fec40c..ea02437a37 100644 --- a/tests/PhpWordTests/Writer/RTF/StyleTest.php +++ b/tests/PhpWordTests/Writer/RTF/StyleTest.php @@ -76,7 +76,7 @@ public function testIndentation(): void $indentation->setRight(2); $indentation->setFirstLine(3); - $indentWriter = new \PhpOffice\PhpWord\Writer\RTF\Style\Indentation($indentation); + $indentWriter = new RTF\Style\Indentation($indentation); $indentWriter->setParentWriter(new RTF()); $result = $indentWriter->write(); @@ -89,7 +89,7 @@ public function testRightTab(): void $tabRight->setType(\PhpOffice\PhpWord\Style\Tab::TAB_STOP_RIGHT); $tabRight->setPosition(5); - $tabWriter = new \PhpOffice\PhpWord\Writer\RTF\Style\Tab($tabRight); + $tabWriter = new RTF\Style\Tab($tabRight); $tabWriter->setParentWriter(new RTF()); $result = $tabWriter->write(); @@ -101,7 +101,7 @@ public function testCenterTab(): void $tabRight = new \PhpOffice\PhpWord\Style\Tab(); $tabRight->setType(\PhpOffice\PhpWord\Style\Tab::TAB_STOP_CENTER); - $tabWriter = new \PhpOffice\PhpWord\Writer\RTF\Style\Tab($tabRight); + $tabWriter = new RTF\Style\Tab($tabRight); $tabWriter->setParentWriter(new RTF()); $result = $tabWriter->write(); @@ -113,7 +113,7 @@ public function testDecimalTab(): void $tabRight = new \PhpOffice\PhpWord\Style\Tab(); $tabRight->setType(\PhpOffice\PhpWord\Style\Tab::TAB_STOP_DECIMAL); - $tabWriter = new \PhpOffice\PhpWord\Writer\RTF\Style\Tab($tabRight); + $tabWriter = new RTF\Style\Tab($tabRight); $tabWriter->setParentWriter(new RTF()); $result = $tabWriter->write(); @@ -124,7 +124,7 @@ public function testRTL(): void { $parentWriter = new RTF(); $element = new \PhpOffice\PhpWord\Element\Text('אב גד', ['RTL' => true]); - $text = new \PhpOffice\PhpWord\Writer\RTF\Element\Text($parentWriter, $element); + $text = new RTF\Element\Text($parentWriter, $element); $expect = "\\pard\\nowidctlpar {\\rtlch\\cf0\\f0 \\uc0{\\u1488}\\uc0{\\u1489} \\uc0{\\u1490}\\uc0{\\u1491}}\\par\n"; self::assertEquals($expect, $this->removeCr($text)); } @@ -134,7 +134,7 @@ public function testRTL2(): void Settings::setDefaultRtl(true); $parentWriter = new RTF(); $element = new \PhpOffice\PhpWord\Element\Text('אב גד'); - $text = new \PhpOffice\PhpWord\Writer\RTF\Element\Text($parentWriter, $element); + $text = new RTF\Element\Text($parentWriter, $element); $expect = "\\pard\\nowidctlpar \\qr{\\rtlch\\cf0\\f0 \\uc0{\\u1488}\\uc0{\\u1489} \\uc0{\\u1490}\\uc0{\\u1491}}\\par\n"; self::assertEquals($expect, $this->removeCr($text)); } @@ -143,7 +143,7 @@ public function testPageBreakLineHeight(): void { $parentWriter = new RTF(); $element = new \PhpOffice\PhpWord\Element\Text('New page', null, ['lineHeight' => 1.08, 'pageBreakBefore' => true]); - $text = new \PhpOffice\PhpWord\Writer\RTF\Element\Text($parentWriter, $element); + $text = new RTF\Element\Text($parentWriter, $element); $expect = "\\pard\\nowidctlpar \\sl259\\slmult1\\page{\\cf0\\f0 New page}\\par\n"; self::assertEquals($expect, $this->removeCr($text)); } @@ -153,7 +153,7 @@ public function testPageBreakLineHeight2(): void Settings::setDefaultRtl(false); $parentWriter = new RTF(); $element = new \PhpOffice\PhpWord\Element\Text('New page', null, ['lineHeight' => 1.08, 'pageBreakBefore' => true]); - $text = new \PhpOffice\PhpWord\Writer\RTF\Element\Text($parentWriter, $element); + $text = new RTF\Element\Text($parentWriter, $element); $expect = "\\pard\\nowidctlpar \\ql\\sl259\\slmult1\\page{\\cf0\\f0 New page}\\par\n"; self::assertEquals($expect, $this->removeCr($text)); } @@ -163,7 +163,7 @@ public function testPageNumberRestart(): void //$parentWriter = new RTF(); $phpword = new \PhpOffice\PhpWord\PhpWord(); $section = $phpword->addSection(['pageNumberingStart' => 5]); - $styleWriter = new \PhpOffice\PhpWord\Writer\RTF\Style\Section($section->getStyle()); + $styleWriter = new RTF\Style\Section($section->getStyle()); $wstyle = $this->removeCr($styleWriter); // following have default values which might change so don't use them $wstyle = preg_replace('/\\\\pgwsxn\\d+/', '', $wstyle); diff --git a/tests/PhpWordTests/Writer/Word2007/Part/AbstractPartTest.php b/tests/PhpWordTests/Writer/Word2007/Part/AbstractPartTest.php index 6e376f3e82..962918ff9e 100644 --- a/tests/PhpWordTests/Writer/Word2007/Part/AbstractPartTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Part/AbstractPartTest.php @@ -31,7 +31,7 @@ class AbstractPartTest extends \PHPUnit\Framework\TestCase */ public function testSetGetParentWriter(): void { - $object = $this->getMockForAbstractClass(\PhpOffice\PhpWord\Writer\Word2007\Part\AbstractPart::class); + $object = $this->getMockForAbstractClass(Word2007\Part\AbstractPart::class); $object->setParentWriter(new Word2007()); self::assertEquals(new Word2007(), $object->getParentWriter()); } @@ -43,7 +43,7 @@ public function testSetGetParentWriterNull(): void { $this->expectException(Exception::class); $this->expectExceptionMessage('No parent WriterInterface assigned.'); - $object = $this->getMockForAbstractClass(\PhpOffice\PhpWord\Writer\Word2007\Part\AbstractPart::class); + $object = $this->getMockForAbstractClass(Word2007\Part\AbstractPart::class); $object->getParentWriter(); } } diff --git a/tests/PhpWordTests/Writer/Word2007/Style/FontTest.php b/tests/PhpWordTests/Writer/Word2007/Style/FontTest.php index a8214ec35b..44223ea666 100644 --- a/tests/PhpWordTests/Writer/Word2007/Style/FontTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Style/FontTest.php @@ -43,7 +43,7 @@ protected function tearDown(): void */ public function testFontRTL(): void { - $phpWord = new \PhpOffice\PhpWord\PhpWord(); + $phpWord = new PhpWord(); $section = $phpWord->addSection(); $textrun = $section->addTextRun(); $textrun->addText('سلام این یک پاراگراف راست به چپ است', ['rtl' => true, 'lang' => 'ar-DZ']); @@ -56,7 +56,7 @@ public function testFontRTL(): void public function testFontRTLNamed(): void { - $phpWord = new \PhpOffice\PhpWord\PhpWord(); + $phpWord = new PhpWord(); $stnam = 'fstyle'; $phpWord->addFontStyle($stnam, [ 'rtl' => true, @@ -81,7 +81,7 @@ public function testFontRTLNamed(): void public function testFontNotRTLNamed(): void { - $phpWord = new \PhpOffice\PhpWord\PhpWord(); + $phpWord = new PhpWord(); $stnam = 'fstyle'; $phpWord->addFontStyle($stnam, [ //'rtl' => true, @@ -106,7 +106,7 @@ public function testFontNotRTLNamed(): void public function testNoProof(): void { - $phpWord = new \PhpOffice\PhpWord\PhpWord(); + $phpWord = new PhpWord(); $fontStyle = [ 'noProof' => true, 'name' => 'Courier New', @@ -133,7 +133,7 @@ public function testNoProof(): void */ public function testFontWithLang(): void { - $phpWord = new \PhpOffice\PhpWord\PhpWord(); + $phpWord = new PhpWord(); $section = $phpWord->addSection(); $section->addText('Ce texte-ci est en français.', ['lang' => \PhpOffice\PhpWord\Style\Language::FR_BE]); $doc = TestHelperDOCX::getDocument($phpWord, 'Word2007'); @@ -148,7 +148,7 @@ public function testFontWithLang(): void */ public function testPosition(): void { - $phpWord = new \PhpOffice\PhpWord\PhpWord(); + $phpWord = new PhpWord(); $section = $phpWord->addSection(); $section->addText('This text is lowered', ['position' => -20]); $doc = TestHelperDOCX::getDocument($phpWord, 'Word2007'); diff --git a/tests/PhpWordTests/Writer/Word2007/Style/SectionTest.php b/tests/PhpWordTests/Writer/Word2007/Style/SectionTest.php index e8f2dc67a7..8807806fe2 100644 --- a/tests/PhpWordTests/Writer/Word2007/Style/SectionTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Style/SectionTest.php @@ -40,7 +40,7 @@ protected function tearDown(): void public function testMarginInInches(): void { $unit = Settings::getMeasurementUnit(); - Settings::setMeasurementUnit(\PhpOffice\PhpWord\Settings::UNIT_INCH); + Settings::setMeasurementUnit(Settings::UNIT_INCH); $phpWord = new \PhpOffice\PhpWord\PhpWord(); $section = $phpWord->addSection(); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 845e59db70..002bbe6493 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -44,7 +44,7 @@ function phpunit10ErrorHandler(int $errno, string $errstr, string $filename, int return true; // message suppressed - stop error handling } - throw new \Exception("$errstr $filename $lineno"); + throw new Exception("$errstr $filename $lineno"); } return false; // continue error handling @@ -55,7 +55,7 @@ function utf8decode(string $value, string $toEncoding = 'ISO-8859-1'): string return function_exists('mb_convert_encoding') ? mb_convert_encoding($value, $toEncoding, 'UTF-8') : utf8_decode($value); } -if (!method_exists(\PHPUnit\Framework\TestCase::class, 'setOutputCallback')) { +if (!method_exists(PHPUnit\Framework\TestCase::class, 'setOutputCallback')) { ini_set('error_reporting', (string) E_ALL); set_error_handler('phpunit10ErrorHandler'); }