diff --git a/application/admin/controller/Index.php b/application/admin/controller/Index.php index b1c2c653..c0823f1d 100644 --- a/application/admin/controller/Index.php +++ b/application/admin/controller/Index.php @@ -210,13 +210,13 @@ class Index extends Base $admindata = AD::update($list); // 删除原来角色 - $aa = $admindata->authgroup()->delete();dump($aa); + $aa = $admindata->authgroup()->delete(); // 重组用户角色列表 foreach ($list['group_id'] as $key => $value) { $groupids[]=['group_id'=>$value]; } - $groupdata = $admindata->authgroup()->create($groupids); + $groupdata = $admindata->authgroup()->saveAll($groupids); // 根据更新结果设置返回提示信息 $admindata&&$groupdata ? $data=['msg'=>'更新成功','val'=>1] : $data=['msg'=>'数据处理错误','val'=>0]; diff --git a/composer.json b/composer.json index 074d83c7..7df97f1d 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,8 @@ "php4world/auth": "^1.0", "topthink/think-captcha": "^2.0", "whitehat101/apr1-md5": "^1.0", - "topthink/think-helper": "^1.0" + "topthink/think-helper": "^1.0", + "phpoffice/phpspreadsheet": "^1.5" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 42b64929..16e01ad2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,109 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d2caa71f351a54a74ac773af02033871", + "content-hash": "2212be96ae70e6b28e3e2834f503d4fa", "packages": [ + { + "name": "markbaker/complex", + "version": "1.4.7", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/1ea674a8308baf547cbcbd30c5fcd6d301b7c000", + "reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000", + "shasum": "", + "mirrors": [ + { + "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3", + "phpcompatibility/php-compatibility": "^8.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "2.*", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^4.8.35|^5.4.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "^3.3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + }, + "files": [ + "classes/src/functions/abs.php", + "classes/src/functions/acos.php", + "classes/src/functions/acosh.php", + "classes/src/functions/acot.php", + "classes/src/functions/acoth.php", + "classes/src/functions/acsc.php", + "classes/src/functions/acsch.php", + "classes/src/functions/argument.php", + "classes/src/functions/asec.php", + "classes/src/functions/asech.php", + "classes/src/functions/asin.php", + "classes/src/functions/asinh.php", + "classes/src/functions/atan.php", + "classes/src/functions/atanh.php", + "classes/src/functions/conjugate.php", + "classes/src/functions/cos.php", + "classes/src/functions/cosh.php", + "classes/src/functions/cot.php", + "classes/src/functions/coth.php", + "classes/src/functions/csc.php", + "classes/src/functions/csch.php", + "classes/src/functions/exp.php", + "classes/src/functions/inverse.php", + "classes/src/functions/ln.php", + "classes/src/functions/log2.php", + "classes/src/functions/log10.php", + "classes/src/functions/negative.php", + "classes/src/functions/pow.php", + "classes/src/functions/rho.php", + "classes/src/functions/sec.php", + "classes/src/functions/sech.php", + "classes/src/functions/sin.php", + "classes/src/functions/sinh.php", + "classes/src/functions/sqrt.php", + "classes/src/functions/tan.php", + "classes/src/functions/tanh.php", + "classes/src/functions/theta.php", + "classes/src/operations/add.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "time": "2018-10-13T23:28:42+00:00" + }, { "name": "php4world/auth", "version": "v1.0.3", @@ -48,6 +149,153 @@ "description": "ThinkPHP5.1 Auth Class.", "time": "2018-06-30T09:39:06+00:00" }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "2dfd06c59825914a1a325f2a2ed13634b9d8c411" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/2dfd06c59825914a1a325f2a2ed13634b9d8c411", + "reference": "2dfd06c59825914a1a325f2a2ed13634b9d8c411", + "shasum": "", + "mirrors": [ + { + "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "markbaker/complex": "^1.4.1", + "php": "^5.6|^7.0", + "psr/simple-cache": "^1.0" + }, + "require-dev": { + "dompdf/dompdf": "^0.8.0", + "friendsofphp/php-cs-fixer": "@stable", + "jpgraph/jpgraph": "^4.0", + "mpdf/mpdf": "^7.0.0", + "phpunit/phpunit": "^5.7", + "squizlabs/php_codesniffer": "^3.3", + "tecnickcom/tcpdf": "^6.2" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "http://blog.maartenballiauw.be" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Franck Lefevre", + "homepage": "http://rootslabs.net" + }, + { + "name": "Mark Baker", + "homepage": "http://markbakeruk.net" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "time": "2018-10-21T10:04:54+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "", + "mirrors": [ + { + "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" + }, { "name": "topthink/framework", "version": "v5.1.27", diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index e23e3d39..a886bad2 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -6,6 +6,48 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( + 'abede361264e2ae69ec1eee813a101af' => $vendorDir . '/markbaker/complex/classes/src/functions/abs.php', + '21a5860fbef5be28db5ddfbc3cca67c4' => $vendorDir . '/markbaker/complex/classes/src/functions/acos.php', + '1546e3f9d127f2a9bb2d1b6c31c26ef1' => $vendorDir . '/markbaker/complex/classes/src/functions/acosh.php', + 'd2516f7f4fba5ea5905f494b4a8262e0' => $vendorDir . '/markbaker/complex/classes/src/functions/acot.php', + '4511163d560956219b96882c0980b65e' => $vendorDir . '/markbaker/complex/classes/src/functions/acoth.php', + 'c361f5616dc2a8da4fa3e137077cd4ea' => $vendorDir . '/markbaker/complex/classes/src/functions/acsc.php', + '02d68920fc98da71991ce569c91df0f6' => $vendorDir . '/markbaker/complex/classes/src/functions/acsch.php', + '88e19525eae308b4a6aa3419364875d3' => $vendorDir . '/markbaker/complex/classes/src/functions/argument.php', + '60e8e2d0827b58bfc904f13957e51849' => $vendorDir . '/markbaker/complex/classes/src/functions/asec.php', + '13d2f040713999eab66c359b4d79871d' => $vendorDir . '/markbaker/complex/classes/src/functions/asech.php', + '838ab38beb32c68a79d3cd2c007d5a04' => $vendorDir . '/markbaker/complex/classes/src/functions/asin.php', + 'bb28eccd0f8f008333a1b3c163d604ac' => $vendorDir . '/markbaker/complex/classes/src/functions/asinh.php', + '9e483de83558c98f7d3feaa402c78cb3' => $vendorDir . '/markbaker/complex/classes/src/functions/atan.php', + '36b74b5b765ded91ee58c8ee3c0e85e3' => $vendorDir . '/markbaker/complex/classes/src/functions/atanh.php', + '05c15ee9510da7fd6bf6136f436500c0' => $vendorDir . '/markbaker/complex/classes/src/functions/conjugate.php', + 'd3208dfbce2505e370788f9f22f6785f' => $vendorDir . '/markbaker/complex/classes/src/functions/cos.php', + '141cf1fb3a3046f8b64534b0ebab33ca' => $vendorDir . '/markbaker/complex/classes/src/functions/cosh.php', + 'be660df75fd0dbe7fa7c03b7434b3294' => $vendorDir . '/markbaker/complex/classes/src/functions/cot.php', + '01e31ea298a51bc9e91517e3ce6b9e76' => $vendorDir . '/markbaker/complex/classes/src/functions/coth.php', + '803ddd97f7b1da68982a7b087c3476f6' => $vendorDir . '/markbaker/complex/classes/src/functions/csc.php', + '3001cdfd101ec3c32da34ee43c2e149b' => $vendorDir . '/markbaker/complex/classes/src/functions/csch.php', + '77b2d7629ef2a93fabb8c56754a91051' => $vendorDir . '/markbaker/complex/classes/src/functions/exp.php', + '4a4471296dec796c21d4f4b6552396a9' => $vendorDir . '/markbaker/complex/classes/src/functions/inverse.php', + 'c3e9897e1744b88deb56fcdc39d34d85' => $vendorDir . '/markbaker/complex/classes/src/functions/ln.php', + 'a83cacf2de942cff288de15a83afd26d' => $vendorDir . '/markbaker/complex/classes/src/functions/log2.php', + '6a861dacc9ee2f3061241d4c7772fa21' => $vendorDir . '/markbaker/complex/classes/src/functions/log10.php', + '4d2522d968c8ba78d6c13548a1b4200e' => $vendorDir . '/markbaker/complex/classes/src/functions/negative.php', + 'fd587ca933fc0447fa5ab4843bdd97f7' => $vendorDir . '/markbaker/complex/classes/src/functions/pow.php', + '383ef01c62028fc78cd4388082fce3c2' => $vendorDir . '/markbaker/complex/classes/src/functions/rho.php', + '150fbd1b95029dc47292da97ecab9375' => $vendorDir . '/markbaker/complex/classes/src/functions/sec.php', + '549abd9bae174286d660bdaa07407c68' => $vendorDir . '/markbaker/complex/classes/src/functions/sech.php', + '6bfbf5eaea6b17a0ed85cb21ba80370c' => $vendorDir . '/markbaker/complex/classes/src/functions/sin.php', + '22efe13f1a497b8e199540ae2d9dc59c' => $vendorDir . '/markbaker/complex/classes/src/functions/sinh.php', + 'e90135ab8e787795a509ed7147de207d' => $vendorDir . '/markbaker/complex/classes/src/functions/sqrt.php', + 'bb0a7923ffc6a90919cd64ec54ff06bc' => $vendorDir . '/markbaker/complex/classes/src/functions/tan.php', + '2d302f32ce0fd4e433dd91c5bb404a28' => $vendorDir . '/markbaker/complex/classes/src/functions/tanh.php', + '24dd4658a952171a4ee79218c4f9fd06' => $vendorDir . '/markbaker/complex/classes/src/functions/theta.php', + 'e49b7876281d6f5bc39536dde96d1f4a' => $vendorDir . '/markbaker/complex/classes/src/operations/add.php', + '47596e02b43cd6da7700134fd08f88cf' => $vendorDir . '/markbaker/complex/classes/src/operations/subtract.php', + '883af48563631547925fa4c3b48ead07' => $vendorDir . '/markbaker/complex/classes/src/operations/multiply.php', + 'f190e3308e6ca23234a2875edc985c03' => $vendorDir . '/markbaker/complex/classes/src/operations/divideby.php', + 'ac9e33ce6841aa5bf5d16d465a2f03a7' => $vendorDir . '/markbaker/complex/classes/src/operations/divideinto.php', '1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php', '9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php', 'ddc3cd2a04224f9638c5d0de6a69c7e3' => $vendorDir . '/topthink/think-migration/src/config.php', diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 64da9b24..4351db65 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -13,5 +13,8 @@ return array( 'php4world\\' => array($vendorDir . '/php4world/auth/src'), 'app\\' => array($baseDir . '/application'), 'WhiteHat101\\Crypt\\' => array($vendorDir . '/whitehat101/apr1-md5/src'), + 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), + 'PhpOffice\\PhpSpreadsheet\\' => array($vendorDir . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet'), 'Phinx\\' => array($vendorDir . '/topthink/think-migration/phinx/src/Phinx'), + 'Complex\\' => array($vendorDir . '/markbaker/complex/classes/src'), ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 5e1eb3b9..8f992256 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -7,6 +7,48 @@ namespace Composer\Autoload; class ComposerStaticInitbe7733f58d7b733cc58f1391b7bd5053 { public static $files = array ( + 'abede361264e2ae69ec1eee813a101af' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/abs.php', + '21a5860fbef5be28db5ddfbc3cca67c4' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acos.php', + '1546e3f9d127f2a9bb2d1b6c31c26ef1' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acosh.php', + 'd2516f7f4fba5ea5905f494b4a8262e0' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acot.php', + '4511163d560956219b96882c0980b65e' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acoth.php', + 'c361f5616dc2a8da4fa3e137077cd4ea' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acsc.php', + '02d68920fc98da71991ce569c91df0f6' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acsch.php', + '88e19525eae308b4a6aa3419364875d3' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/argument.php', + '60e8e2d0827b58bfc904f13957e51849' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/asec.php', + '13d2f040713999eab66c359b4d79871d' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/asech.php', + '838ab38beb32c68a79d3cd2c007d5a04' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/asin.php', + 'bb28eccd0f8f008333a1b3c163d604ac' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/asinh.php', + '9e483de83558c98f7d3feaa402c78cb3' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/atan.php', + '36b74b5b765ded91ee58c8ee3c0e85e3' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/atanh.php', + '05c15ee9510da7fd6bf6136f436500c0' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/conjugate.php', + 'd3208dfbce2505e370788f9f22f6785f' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/cos.php', + '141cf1fb3a3046f8b64534b0ebab33ca' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/cosh.php', + 'be660df75fd0dbe7fa7c03b7434b3294' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/cot.php', + '01e31ea298a51bc9e91517e3ce6b9e76' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/coth.php', + '803ddd97f7b1da68982a7b087c3476f6' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/csc.php', + '3001cdfd101ec3c32da34ee43c2e149b' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/csch.php', + '77b2d7629ef2a93fabb8c56754a91051' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/exp.php', + '4a4471296dec796c21d4f4b6552396a9' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/inverse.php', + 'c3e9897e1744b88deb56fcdc39d34d85' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/ln.php', + 'a83cacf2de942cff288de15a83afd26d' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/log2.php', + '6a861dacc9ee2f3061241d4c7772fa21' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/log10.php', + '4d2522d968c8ba78d6c13548a1b4200e' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/negative.php', + 'fd587ca933fc0447fa5ab4843bdd97f7' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/pow.php', + '383ef01c62028fc78cd4388082fce3c2' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/rho.php', + '150fbd1b95029dc47292da97ecab9375' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/sec.php', + '549abd9bae174286d660bdaa07407c68' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/sech.php', + '6bfbf5eaea6b17a0ed85cb21ba80370c' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/sin.php', + '22efe13f1a497b8e199540ae2d9dc59c' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/sinh.php', + 'e90135ab8e787795a509ed7147de207d' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/sqrt.php', + 'bb0a7923ffc6a90919cd64ec54ff06bc' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/tan.php', + '2d302f32ce0fd4e433dd91c5bb404a28' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/tanh.php', + '24dd4658a952171a4ee79218c4f9fd06' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/theta.php', + 'e49b7876281d6f5bc39536dde96d1f4a' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/add.php', + '47596e02b43cd6da7700134fd08f88cf' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/subtract.php', + '883af48563631547925fa4c3b48ead07' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/multiply.php', + 'f190e3308e6ca23234a2875edc985c03' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/divideby.php', + 'ac9e33ce6841aa5bf5d16d465a2f03a7' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/divideinto.php', '1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php', '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php', 'ddc3cd2a04224f9638c5d0de6a69c7e3' => __DIR__ . '/..' . '/topthink/think-migration/src/config.php', @@ -34,8 +76,14 @@ class ComposerStaticInitbe7733f58d7b733cc58f1391b7bd5053 ), 'P' => array ( + 'Psr\\SimpleCache\\' => 16, + 'PhpOffice\\PhpSpreadsheet\\' => 25, 'Phinx\\' => 6, ), + 'C' => + array ( + 'Complex\\' => 8, + ), ); public static $prefixDirsPsr4 = array ( @@ -67,10 +115,22 @@ class ComposerStaticInitbe7733f58d7b733cc58f1391b7bd5053 array ( 0 => __DIR__ . '/..' . '/whitehat101/apr1-md5/src', ), + 'Psr\\SimpleCache\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/simple-cache/src', + ), + 'PhpOffice\\PhpSpreadsheet\\' => + array ( + 0 => __DIR__ . '/..' . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet', + ), 'Phinx\\' => array ( 0 => __DIR__ . '/..' . '/topthink/think-migration/phinx/src/Phinx', ), + 'Complex\\' => + array ( + 0 => __DIR__ . '/..' . '/markbaker/complex/classes/src', + ), ); public static function getInitializer(ClassLoader $loader) diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 16d67653..1c0d7ea8 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,4 +1,107 @@ [ + { + "name": "markbaker/complex", + "version": "1.4.7", + "version_normalized": "1.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/1ea674a8308baf547cbcbd30c5fcd6d301b7c000", + "reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000", + "shasum": "", + "mirrors": [ + { + "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3", + "phpcompatibility/php-compatibility": "^8.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "2.*", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^4.8.35|^5.4.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "^3.3.0" + }, + "time": "2018-10-13T23:28:42+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + }, + "files": [ + "classes/src/functions/abs.php", + "classes/src/functions/acos.php", + "classes/src/functions/acosh.php", + "classes/src/functions/acot.php", + "classes/src/functions/acoth.php", + "classes/src/functions/acsc.php", + "classes/src/functions/acsch.php", + "classes/src/functions/argument.php", + "classes/src/functions/asec.php", + "classes/src/functions/asech.php", + "classes/src/functions/asin.php", + "classes/src/functions/asinh.php", + "classes/src/functions/atan.php", + "classes/src/functions/atanh.php", + "classes/src/functions/conjugate.php", + "classes/src/functions/cos.php", + "classes/src/functions/cosh.php", + "classes/src/functions/cot.php", + "classes/src/functions/coth.php", + "classes/src/functions/csc.php", + "classes/src/functions/csch.php", + "classes/src/functions/exp.php", + "classes/src/functions/inverse.php", + "classes/src/functions/ln.php", + "classes/src/functions/log2.php", + "classes/src/functions/log10.php", + "classes/src/functions/negative.php", + "classes/src/functions/pow.php", + "classes/src/functions/rho.php", + "classes/src/functions/sec.php", + "classes/src/functions/sech.php", + "classes/src/functions/sin.php", + "classes/src/functions/sinh.php", + "classes/src/functions/sqrt.php", + "classes/src/functions/tan.php", + "classes/src/functions/tanh.php", + "classes/src/functions/theta.php", + "classes/src/operations/add.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ] + }, { "name": "php4world/auth", "version": "v1.0.3", @@ -43,6 +146,157 @@ ], "description": "ThinkPHP5.1 Auth Class." }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.5.0", + "version_normalized": "1.5.0.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "2dfd06c59825914a1a325f2a2ed13634b9d8c411" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/2dfd06c59825914a1a325f2a2ed13634b9d8c411", + "reference": "2dfd06c59825914a1a325f2a2ed13634b9d8c411", + "shasum": "", + "mirrors": [ + { + "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "markbaker/complex": "^1.4.1", + "php": "^5.6|^7.0", + "psr/simple-cache": "^1.0" + }, + "require-dev": { + "dompdf/dompdf": "^0.8.0", + "friendsofphp/php-cs-fixer": "@stable", + "jpgraph/jpgraph": "^4.0", + "mpdf/mpdf": "^7.0.0", + "phpunit/phpunit": "^5.7", + "squizlabs/php_codesniffer": "^3.3", + "tecnickcom/tcpdf": "^6.2" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "time": "2018-10-21T10:04:54+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "http://blog.maartenballiauw.be" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Franck Lefevre", + "homepage": "http://rootslabs.net" + }, + { + "name": "Mark Baker", + "homepage": "http://markbakeruk.net" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ] + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "", + "mirrors": [ + { + "url": "https://dl.laravel-china.org/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2017-10-23T01:57:42+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ] + }, { "name": "topthink/framework", "version": "v5.1.27", diff --git a/vendor/markbaker/complex/README.md b/vendor/markbaker/complex/README.md new file mode 100644 index 00000000..c306394e --- /dev/null +++ b/vendor/markbaker/complex/README.md @@ -0,0 +1,156 @@ +PHPComplex +========== + +--- + +PHP Class for handling Complex numbers + +Master: [](http://travis-ci.org/MarkBaker/PHPComplex) + +Develop: [](http://travis-ci.org/MarkBaker/PHPComplex) + +[](https://xkcd.com/2028/) + +--- + +The library currently provides the following operations: + + - addition + - subtraction + - multiplication + - division + - division by + - division into + +together with functions for + + - theta (polar theta angle) + - rho (polar distance/radius) + - conjugate + * negative + - inverse (1 / complex) + - cos (cosine) + - acos (inverse cosine) + - cosh (hyperbolic cosine) + - acosh (inverse hyperbolic cosine) + - sin (sine) + - asin (inverse sine) + - sinh (hyperbolic sine) + - asinh (inverse hyperbolic sine) + - sec (secant) + - asec (inverse secant) + - sech (hyperbolic secant) + - asech (inverse hyperbolic secant) + - csc (cosecant) + - acsc (inverse cosecant) + - csch (hyperbolic secant) + - acsch (inverse hyperbolic secant) + - tan (tangent) + - atan (inverse tangent) + - tanh (hyperbolic tangent) + - atanh (inverse hyperbolic tangent) + - cot (cotangent) + - acot (inverse cotangent) + - coth (hyperbolic cotangent) + - acoth (inverse hyperbolic cotangent) + - sqrt (square root) + - exp (exponential) + - ln (natural log) + - log10 (base-10 log) + - log2 (base-2 log) + - pow (raised to the power of a real number) + + +--- + +# Usage + +To create a new complex object, you can provide either the real, imaginary and suffix parts as individual values, or as an array of values passed passed to the constructor; or a string representing the value. e.g + +``` +$real = 1.23; +$imaginary = -4.56; +$suffix = 'i'; + +$complexObject = new Complex\Complex($real, $imaginary, $suffix); +``` +or +``` +$real = 1.23; +$imaginary = -4.56; +$suffix = 'i'; + +$arguments = [$real, $imaginary, $suffix]; + +$complexObject = new Complex\Complex($arguments); +``` +or +``` +$complexString = '1.23-4.56i'; + +$complexObject = new Complex\Complex($complexString); +``` + +Complex objects are immutable: whenever you call a method or pass a complex value to a function that returns a complex value, a new Complex object will be returned, and the original will remain unchanged. +This also allows you to chain multiple methods as you would for a fluent interface (as long as they are methods that will return a Complex result). + +## Performing Mathematical Operations + +To perform mathematical operations with Complex values, you can call the appropriate method against a complex value, passing other values as arguments + +``` +$complexString1 = '1.23-4.56i'; +$complexString2 = '2.34+5.67i'; + +$complexObject = new Complex\Complex($complexString1); +echo $complexObject->add($complexString2); +``` +or pass all values to the appropriate function +``` +$complexString1 = '1.23-4.56i'; +$complexString2 = '2.34+5.67i'; + +echo Complex\add($complexString1, $complexString2); +``` +If you want to perform the same operation against multiple values (e.g. to add three or more complex numbers), then you can pass multiple arguments to any of the operations. + +You can pass these arguments as Complex objects, or as an array or string that will parse to a complex object. + +## Using functions + +When calling any of the available functions for a complex value, you can either call the relevant method for the Complex object +``` +$complexString = '1.23-4.56i'; + +$complexObject = new Complex\Complex($complexString); +echo $complexObject->sinh(); +``` +or you can call the function as you would in procedural code, passing the Complex object as an argument +``` +$complexString = '1.23-4.56i'; + +$complexObject = new Complex\Complex($complexString); +echo Complex\sinh($complexObject); +``` +When called procedurally using the function, you can pass in the argument as a Complex object, or as an array or string that will parse to a complex object. +``` +$complexString = '1.23-4.56i'; + +echo Complex\sinh($complexString); +``` + +In the case of the `pow()` function (the only implemented function that requires an additional argument) you need to pass both arguments when calling the function procedurally + +``` +$complexString = '1.23-4.56i'; + +$complexObject = new Complex\Complex($complexString); +echo Complex\pow($complexObject, 2); +``` +or pass the additional argument when calling the method +``` +$complexString = '1.23-4.56i'; + +$complexObject = new Complex\Complex($complexString); +echo $complexObject->pow(2); +``` diff --git a/vendor/markbaker/complex/classes/Autoloader.php b/vendor/markbaker/complex/classes/Autoloader.php new file mode 100644 index 00000000..e6e03ac0 --- /dev/null +++ b/vendor/markbaker/complex/classes/Autoloader.php @@ -0,0 +1,53 @@ +regex = $regex; + parent::__construct($it, $regex); + } +} + +class FilenameFilter extends FilesystemRegexFilter +{ + // Filter files against the regex + public function accept() + { + return (!$this->isFile() || preg_match($this->regex, $this->getFilename())); + } +} + + +$srcFolder = __DIR__ . DIRECTORY_SEPARATOR . 'src'; +$srcDirectory = new RecursiveDirectoryIterator($srcFolder); + +$filteredFileList = new FilenameFilter($srcDirectory, '/(?:php)$/i'); +$filteredFileList = new FilenameFilter($filteredFileList, '/^(?!.*(Complex|Exception)\.php).*$/i'); + +foreach (new RecursiveIteratorIterator($filteredFileList) as $file) { + if ($file->isFile()) { + include_once $file; + } +} diff --git a/vendor/markbaker/complex/classes/src/Complex.php b/vendor/markbaker/complex/classes/src/Complex.php new file mode 100644 index 00000000..5671eb28 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/Complex.php @@ -0,0 +1,387 @@ + 0.0 && empty($suffix)) { + $suffix = 'i'; + } + + // Set parsed values in our properties + $this->realPart = (float) $realPart; + $this->imaginaryPart = (float) $imaginaryPart; + $this->suffix = strtolower($suffix); + } + + /** + * Gets the real part of this complex number + * + * @return Float + */ + public function getReal() + { + return $this->realPart; + } + + /** + * Gets the imaginary part of this complex number + * + * @return Float + */ + public function getImaginary() + { + return $this->imaginaryPart; + } + + /** + * Gets the suffix of this complex number + * + * @return String + */ + public function getSuffix() + { + return $this->suffix; + } + + /** + * Returns true if this is a real value, false if a complex value + * + * @return Bool + */ + public function isReal() + { + return $this->imaginaryPart == 0.0; + } + + /** + * Returns true if this is a complex value, false if a real value + * + * @return Bool + */ + public function isComplex() + { + return !$this->isReal(); + } + + public function format() + { + $str = ""; + if ($this->imaginaryPart != 0.0) { + if (\abs($this->imaginaryPart) != 1.0) { + $str .= $this->imaginaryPart . $this->suffix; + } else { + $str .= (($this->imaginaryPart < 0.0) ? '-' : '') . $this->suffix; + } + } + if ($this->realPart != 0.0) { + if (($str) && ($this->imaginaryPart > 0.0)) { + $str = "+" . $str; + } + $str = $this->realPart . $str; + } + if (!$str) { + $str = "0.0"; + } + + return $str; + } + + public function __toString() + { + return $this->format(); + } + + /** + * Validates whether the argument is a valid complex number, converting scalar or array values if possible + * + * @param mixed $complex The value to validate + * @return Complex + * @throws Exception If the argument isn't a Complex number or cannot be converted to one + */ + public static function validateComplexArgument($complex) + { + if (is_scalar($complex) || is_array($complex)) { + $complex = new Complex($complex); + } elseif (!is_object($complex) || !($complex instanceof Complex)) { + throw new Exception('Value is not a valid complex number'); + } + + return $complex; + } + + /** + * Returns the reverse of this complex number + * + * @return Complex + */ + public function reverse() + { + return new Complex( + $this->imaginaryPart, + $this->realPart, + ($this->realPart == 0.0) ? null : $this->suffix + ); + } + + public function invertImaginary() + { + return new Complex( + $this->realPart, + $this->imaginaryPart * -1, + ($this->imaginaryPart == 0.0) ? null : $this->suffix + ); + } + + public function invertReal() + { + return new Complex( + $this->realPart * -1, + $this->imaginaryPart, + ($this->imaginaryPart == 0.0) ? null : $this->suffix + ); + } + + protected static $functions = [ + 'abs', + 'acos', + 'acosh', + 'acot', + 'acoth', + 'acsc', + 'acsch', + 'argument', + 'asec', + 'asech', + 'asin', + 'asinh', + 'atan', + 'atanh', + 'conjugate', + 'cos', + 'cosh', + 'cot', + 'coth', + 'csc', + 'csch', + 'exp', + 'inverse', + 'ln', + 'log2', + 'log10', + 'negative', + 'pow', + 'rho', + 'sec', + 'sech', + 'sin', + 'sinh', + 'sqrt', + 'tan', + 'tanh', + 'theta', + ]; + + protected static $operations = [ + 'add', + 'subtract', + 'multiply', + 'divideby', + 'divideinto', + ]; + + /** + * Returns the result of the function call or operation + * + * @return Complex|float + * @throws Exception|\InvalidArgumentException + */ + public function __call($functionName, $arguments) + { + $functionName = strtolower(str_replace('_', '', $functionName)); + + // Test for function calls + if (in_array($functionName, self::$functions)) { + $functionName = "\\" . __NAMESPACE__ . "\\{$functionName}"; + return $functionName($this, ...$arguments); + } + // Test for operation calls + if (in_array($functionName, self::$operations)) { + $functionName = "\\" . __NAMESPACE__ . "\\{$functionName}"; + return $functionName($this, ...$arguments); + } + throw new Exception('Function or Operation does not exist'); + } +} diff --git a/vendor/markbaker/complex/classes/src/Exception.php b/vendor/markbaker/complex/classes/src/Exception.php new file mode 100644 index 00000000..a2beb732 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/Exception.php @@ -0,0 +1,13 @@ +getReal() - $invsqrt->getImaginary(), + $complex->getImaginary() + $invsqrt->getReal() + ); + $log = ln($adjust); + + return new Complex( + $log->getImaginary(), + -1 * $log->getReal() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/acosh.php b/vendor/markbaker/complex/classes/src/functions/acosh.php new file mode 100644 index 00000000..18a992e4 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/acosh.php @@ -0,0 +1,34 @@ +isReal() && ($complex->getReal() > 1)) { + return new Complex(\acosh($complex->getReal())); + } + + $acosh = acos($complex) + ->reverse(); + if ($acosh->getReal() < 0.0) { + $acosh = $acosh->invertReal(); + } + + return $acosh; +} diff --git a/vendor/markbaker/complex/classes/src/functions/acot.php b/vendor/markbaker/complex/classes/src/functions/acot.php new file mode 100644 index 00000000..11bee466 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/acot.php @@ -0,0 +1,25 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return asin(inverse($complex)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/acsch.php b/vendor/markbaker/complex/classes/src/functions/acsch.php new file mode 100644 index 00000000..bb45d347 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/acsch.php @@ -0,0 +1,29 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return asinh(inverse($complex)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/argument.php b/vendor/markbaker/complex/classes/src/functions/argument.php new file mode 100644 index 00000000..d7209cc4 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/argument.php @@ -0,0 +1,28 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return acos(inverse($complex)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/asech.php b/vendor/markbaker/complex/classes/src/functions/asech.php new file mode 100644 index 00000000..b36c40e2 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/asech.php @@ -0,0 +1,29 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return acosh(inverse($complex)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/asin.php b/vendor/markbaker/complex/classes/src/functions/asin.php new file mode 100644 index 00000000..9c982aca --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/asin.php @@ -0,0 +1,37 @@ +getReal() - $complex->getImaginary(), + $invsqrt->getImaginary() + $complex->getReal() + ); + $log = ln($adjust); + + return new Complex( + $log->getImaginary(), + -1 * $log->getReal() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/asinh.php b/vendor/markbaker/complex/classes/src/functions/asinh.php new file mode 100644 index 00000000..c1243fd7 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/asinh.php @@ -0,0 +1,33 @@ +isReal() && ($complex->getReal() > 1)) { + return new Complex(\asinh($complex->getReal())); + } + + $asinh = clone $complex; + $asinh = $asinh->reverse() + ->invertReal(); + $asinh = asin($asinh); + return $asinh->reverse() + ->invertImaginary(); +} diff --git a/vendor/markbaker/complex/classes/src/functions/atan.php b/vendor/markbaker/complex/classes/src/functions/atan.php new file mode 100644 index 00000000..2c75dcf8 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/atan.php @@ -0,0 +1,45 @@ +isReal()) { + return new Complex(\atan($complex->getReal())); + } + + $t1Value = new Complex(-1 * $complex->getImaginary(), $complex->getReal()); + $uValue = new Complex(1, 0); + + $d1Value = clone $uValue; + $d1Value = subtract($d1Value, $t1Value); + $d2Value = add($t1Value, $uValue); + $uResult = $d1Value->divideBy($d2Value); + $uResult = ln($uResult); + + return new Complex( + (($uResult->getImaginary() == M_PI) ? -M_PI : $uResult->getImaginary()) * -0.5, + $uResult->getReal() * 0.5, + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/atanh.php b/vendor/markbaker/complex/classes/src/functions/atanh.php new file mode 100644 index 00000000..c53f2a9a --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/atanh.php @@ -0,0 +1,38 @@ +isReal()) { + $real = $complex->getReal(); + if ($real >= -1.0 && $real <= 1.0) { + return new Complex(\atanh($real)); + } else { + return new Complex(\atanh(1 / $real), (($real < 0.0) ? M_PI_2 : -1 * M_PI_2)); + } + } + + $iComplex = clone $complex; + $iComplex = $iComplex->invertImaginary() + ->reverse(); + return atan($iComplex) + ->invertReal() + ->reverse(); +} diff --git a/vendor/markbaker/complex/classes/src/functions/conjugate.php b/vendor/markbaker/complex/classes/src/functions/conjugate.php new file mode 100644 index 00000000..bd1984b7 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/conjugate.php @@ -0,0 +1,28 @@ +getReal(), + -1 * $complex->getImaginary(), + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/cos.php b/vendor/markbaker/complex/classes/src/functions/cos.php new file mode 100644 index 00000000..80a4683d --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/cos.php @@ -0,0 +1,34 @@ +isReal()) { + return new Complex(\cos($complex->getReal())); + } + + return conjugate( + new Complex( + \cos($complex->getReal()) * \cosh($complex->getImaginary()), + \sin($complex->getReal()) * \sinh($complex->getImaginary()), + $complex->getSuffix() + ) + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/cosh.php b/vendor/markbaker/complex/classes/src/functions/cosh.php new file mode 100644 index 00000000..a4bea653 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/cosh.php @@ -0,0 +1,32 @@ +isReal()) { + return new Complex(\cosh($complex->getReal())); + } + + return new Complex( + \cosh($complex->getReal()) * \cos($complex->getImaginary()), + \sinh($complex->getReal()) * \sin($complex->getImaginary()), + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/cot.php b/vendor/markbaker/complex/classes/src/functions/cot.php new file mode 100644 index 00000000..339101e1 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/cot.php @@ -0,0 +1,29 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return new Complex(INF); + } + + return inverse(tan($complex)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/coth.php b/vendor/markbaker/complex/classes/src/functions/coth.php new file mode 100644 index 00000000..7fe705a4 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/coth.php @@ -0,0 +1,24 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return inverse(sin($complex)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/csch.php b/vendor/markbaker/complex/classes/src/functions/csch.php new file mode 100644 index 00000000..f4500981 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/csch.php @@ -0,0 +1,29 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return inverse(sinh($complex)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/exp.php b/vendor/markbaker/complex/classes/src/functions/exp.php new file mode 100644 index 00000000..4cac6967 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/exp.php @@ -0,0 +1,34 @@ +getReal() == 0.0) && (\abs($complex->getImaginary()) == M_PI)) { + return new Complex(-1.0, 0.0); + } + + $rho = \exp($complex->getReal()); + + return new Complex( + $rho * \cos($complex->getImaginary()), + $rho * \sin($complex->getImaginary()), + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/inverse.php b/vendor/markbaker/complex/classes/src/functions/inverse.php new file mode 100644 index 00000000..7d3182ad --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/inverse.php @@ -0,0 +1,29 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + throw new \InvalidArgumentException('Division by zero'); + } + + return $complex->divideInto(1.0); +} diff --git a/vendor/markbaker/complex/classes/src/functions/ln.php b/vendor/markbaker/complex/classes/src/functions/ln.php new file mode 100644 index 00000000..39071cf6 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/ln.php @@ -0,0 +1,33 @@ +getReal() == 0.0) && ($complex->getImaginary() == 0.0)) { + throw new \InvalidArgumentException(); + } + + return new Complex( + \log(rho($complex)), + theta($complex), + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/log10.php b/vendor/markbaker/complex/classes/src/functions/log10.php new file mode 100644 index 00000000..694d3d08 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/log10.php @@ -0,0 +1,32 @@ +getReal() == 0.0) && ($complex->getImaginary() == 0.0)) { + throw new \InvalidArgumentException(); + } elseif (($complex->getReal() > 0.0) && ($complex->getImaginary() == 0.0)) { + return new Complex(\log10($complex->getReal()), 0.0, $complex->getSuffix()); + } + + return ln($complex) + ->multiply(\log10(Complex::EULER)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/log2.php b/vendor/markbaker/complex/classes/src/functions/log2.php new file mode 100644 index 00000000..081f2c49 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/log2.php @@ -0,0 +1,32 @@ +getReal() == 0.0) && ($complex->getImaginary() == 0.0)) { + throw new \InvalidArgumentException(); + } elseif (($complex->getReal() > 0.0) && ($complex->getImaginary() == 0.0)) { + return new Complex(\log($complex->getReal(), 2), 0.0, $complex->getSuffix()); + } + + return ln($complex) + ->multiply(\log(Complex::EULER, 2)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/negative.php b/vendor/markbaker/complex/classes/src/functions/negative.php new file mode 100644 index 00000000..dbd11922 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/negative.php @@ -0,0 +1,31 @@ +getReal(), + -1 * $complex->getImaginary(), + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/pow.php b/vendor/markbaker/complex/classes/src/functions/pow.php new file mode 100644 index 00000000..18ee2690 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/pow.php @@ -0,0 +1,40 @@ +getImaginary() == 0.0 && $complex->getReal() >= 0.0) { + return new Complex(\pow($complex->getReal(), $power)); + } + + $rValue = \sqrt(($complex->getReal() * $complex->getReal()) + ($complex->getImaginary() * $complex->getImaginary())); + $rPower = \pow($rValue, $power); + $theta = $complex->argument() * $power; + if ($theta == 0) { + return new Complex(1); + } + + return new Complex($rPower * \cos($theta), $rPower * \sin($theta), $complex->getSuffix()); +} diff --git a/vendor/markbaker/complex/classes/src/functions/rho.php b/vendor/markbaker/complex/classes/src/functions/rho.php new file mode 100644 index 00000000..750f3f99 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/rho.php @@ -0,0 +1,28 @@ +getReal() * $complex->getReal()) + + ($complex->getImaginary() * $complex->getImaginary()) + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/sec.php b/vendor/markbaker/complex/classes/src/functions/sec.php new file mode 100644 index 00000000..7dd43eaf --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/sec.php @@ -0,0 +1,25 @@ +isReal()) { + return new Complex(\sin($complex->getReal())); + } + + return new Complex( + \sin($complex->getReal()) * \cosh($complex->getImaginary()), + \cos($complex->getReal()) * \sinh($complex->getImaginary()), + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/sinh.php b/vendor/markbaker/complex/classes/src/functions/sinh.php new file mode 100644 index 00000000..4c0f6503 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/sinh.php @@ -0,0 +1,32 @@ +isReal()) { + return new Complex(\sinh($complex->getReal())); + } + + return new Complex( + \sinh($complex->getReal()) * \cos($complex->getImaginary()), + \cosh($complex->getReal()) * \sin($complex->getImaginary()), + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/sqrt.php b/vendor/markbaker/complex/classes/src/functions/sqrt.php new file mode 100644 index 00000000..9c171b88 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/sqrt.php @@ -0,0 +1,29 @@ +getSuffix()); +} diff --git a/vendor/markbaker/complex/classes/src/functions/tan.php b/vendor/markbaker/complex/classes/src/functions/tan.php new file mode 100644 index 00000000..014d7981 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/tan.php @@ -0,0 +1,40 @@ +isReal()) { + return new Complex(\tan($complex->getReal())); + } + + $real = $complex->getReal(); + $imaginary = $complex->getImaginary(); + $divisor = 1 + \pow(\tan($real), 2) * \pow(\tanh($imaginary), 2); + if ($divisor == 0.0) { + throw new \InvalidArgumentException('Division by zero'); + } + + return new Complex( + \pow(sech($imaginary)->getReal(), 2) * \tan($real) / $divisor, + \pow(sec($real)->getReal(), 2) * \tanh($imaginary) / $divisor, + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/tanh.php b/vendor/markbaker/complex/classes/src/functions/tanh.php new file mode 100644 index 00000000..028741d6 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/tanh.php @@ -0,0 +1,35 @@ +getReal(); + $imaginary = $complex->getImaginary(); + $divisor = \cos($imaginary) * \cos($imaginary) + \sinh($real) * \sinh($real); + if ($divisor == 0.0) { + throw new \InvalidArgumentException('Division by zero'); + } + + return new Complex( + \sinh($real) * \cosh($real) / $divisor, + 0.5 * \sin(2 * $imaginary) / $divisor, + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/theta.php b/vendor/markbaker/complex/classes/src/functions/theta.php new file mode 100644 index 00000000..d12866cd --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/theta.php @@ -0,0 +1,38 @@ +getReal() == 0.0) { + if ($complex->isReal()) { + return 0.0; + } elseif ($complex->getImaginary() < 0.0) { + return M_PI / -2; + } + return M_PI / 2; + } elseif ($complex->getReal() > 0.0) { + return \atan($complex->getImaginary() / $complex->getReal()); + } elseif ($complex->getImaginary() < 0.0) { + return -(M_PI - \atan(\abs($complex->getImaginary()) / \abs($complex->getReal()))); + } + + return M_PI - \atan($complex->getImaginary() / \abs($complex->getReal())); +} diff --git a/vendor/markbaker/complex/classes/src/operations/add.php b/vendor/markbaker/complex/classes/src/operations/add.php new file mode 100644 index 00000000..10bd42f4 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/operations/add.php @@ -0,0 +1,46 @@ +isComplex() && $complex->isComplex() && + $result->getSuffix() !== $complex->getSuffix()) { + throw new Exception('Suffix Mismatch'); + } + + $real = $result->getReal() + $complex->getReal(); + $imaginary = $result->getImaginary() + $complex->getImaginary(); + + $result = new Complex( + $real, + $imaginary, + ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix()) + ); + } + + return $result; +} diff --git a/vendor/markbaker/complex/classes/src/operations/divideby.php b/vendor/markbaker/complex/classes/src/operations/divideby.php new file mode 100644 index 00000000..089e0ef9 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/operations/divideby.php @@ -0,0 +1,56 @@ +isComplex() && $complex->isComplex() && + $result->getSuffix() !== $complex->getSuffix()) { + throw new Exception('Suffix Mismatch'); + } + if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) { + throw new \InvalidArgumentException('Division by zero'); + } + + $delta1 = ($result->getReal() * $complex->getReal()) + + ($result->getImaginary() * $complex->getImaginary()); + $delta2 = ($result->getImaginary() * $complex->getReal()) - + ($result->getReal() * $complex->getImaginary()); + $delta3 = ($complex->getReal() * $complex->getReal()) + + ($complex->getImaginary() * $complex->getImaginary()); + + $real = $delta1 / $delta3; + $imaginary = $delta2 / $delta3; + + $result = new Complex( + $real, + $imaginary, + ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix()) + ); + } + + return $result; +} diff --git a/vendor/markbaker/complex/classes/src/operations/divideinto.php b/vendor/markbaker/complex/classes/src/operations/divideinto.php new file mode 100644 index 00000000..3dfe085e --- /dev/null +++ b/vendor/markbaker/complex/classes/src/operations/divideinto.php @@ -0,0 +1,56 @@ +isComplex() && $complex->isComplex() && + $result->getSuffix() !== $complex->getSuffix()) { + throw new Exception('Suffix Mismatch'); + } + if ($result->getReal() == 0.0 && $result->getImaginary() == 0.0) { + throw new \InvalidArgumentException('Division by zero'); + } + + $delta1 = ($complex->getReal() * $result->getReal()) + + ($complex->getImaginary() * $result->getImaginary()); + $delta2 = ($complex->getImaginary() * $result->getReal()) - + ($complex->getReal() * $result->getImaginary()); + $delta3 = ($result->getReal() * $result->getReal()) + + ($result->getImaginary() * $result->getImaginary()); + + $real = $delta1 / $delta3; + $imaginary = $delta2 / $delta3; + + $result = new Complex( + $real, + $imaginary, + ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix()) + ); + } + + return $result; +} diff --git a/vendor/markbaker/complex/classes/src/operations/multiply.php b/vendor/markbaker/complex/classes/src/operations/multiply.php new file mode 100644 index 00000000..bf2473ea --- /dev/null +++ b/vendor/markbaker/complex/classes/src/operations/multiply.php @@ -0,0 +1,48 @@ +isComplex() && $complex->isComplex() && + $result->getSuffix() !== $complex->getSuffix()) { + throw new Exception('Suffix Mismatch'); + } + + $real = ($result->getReal() * $complex->getReal()) - + ($result->getImaginary() * $complex->getImaginary()); + $imaginary = ($result->getReal() * $complex->getImaginary()) + + ($result->getImaginary() * $complex->getReal()); + + $result = new Complex( + $real, + $imaginary, + ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix()) + ); + } + + return $result; +} diff --git a/vendor/markbaker/complex/classes/src/operations/subtract.php b/vendor/markbaker/complex/classes/src/operations/subtract.php new file mode 100644 index 00000000..075ef443 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/operations/subtract.php @@ -0,0 +1,46 @@ +isComplex() && $complex->isComplex() && + $result->getSuffix() !== $complex->getSuffix()) { + throw new Exception('Suffix Mismatch'); + } + + $real = $result->getReal() - $complex->getReal(); + $imaginary = $result->getImaginary() - $complex->getImaginary(); + + $result = new Complex( + $real, + $imaginary, + ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix()) + ); + } + + return $result; +} diff --git a/vendor/markbaker/complex/composer.json b/vendor/markbaker/complex/composer.json new file mode 100644 index 00000000..91e9e231 --- /dev/null +++ b/vendor/markbaker/complex/composer.json @@ -0,0 +1,91 @@ +{ + "name": "markbaker/complex", + "type": "library", + "description": "PHP Class for working with complex numbers", + "keywords": ["complex", "mathematics"], + "homepage": "https://github.com/MarkBaker/PHPComplex", + "license": "MIT", + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.4.0", + "phpdocumentor/phpdocumentor":"2.*", + "phpmd/phpmd": "2.*", + "sebastian/phpcpd": "2.*", + "phploc/phploc": "2.*", + "squizlabs/php_codesniffer": "^3.3.0", + "phpcompatibility/php-compatibility": "^8.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3" + }, + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + }, + "files": [ + "classes/src/functions/abs.php", + "classes/src/functions/acos.php", + "classes/src/functions/acosh.php", + "classes/src/functions/acot.php", + "classes/src/functions/acoth.php", + "classes/src/functions/acsc.php", + "classes/src/functions/acsch.php", + "classes/src/functions/argument.php", + "classes/src/functions/asec.php", + "classes/src/functions/asech.php", + "classes/src/functions/asin.php", + "classes/src/functions/asinh.php", + "classes/src/functions/atan.php", + "classes/src/functions/atanh.php", + "classes/src/functions/conjugate.php", + "classes/src/functions/cos.php", + "classes/src/functions/cosh.php", + "classes/src/functions/cot.php", + "classes/src/functions/coth.php", + "classes/src/functions/csc.php", + "classes/src/functions/csch.php", + "classes/src/functions/exp.php", + "classes/src/functions/inverse.php", + "classes/src/functions/ln.php", + "classes/src/functions/log2.php", + "classes/src/functions/log10.php", + "classes/src/functions/negative.php", + "classes/src/functions/pow.php", + "classes/src/functions/rho.php", + "classes/src/functions/sec.php", + "classes/src/functions/sech.php", + "classes/src/functions/sin.php", + "classes/src/functions/sinh.php", + "classes/src/functions/sqrt.php", + "classes/src/functions/tan.php", + "classes/src/functions/tanh.php", + "classes/src/functions/theta.php", + "classes/src/operations/add.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "scripts": { + "style": [ + "phpcs --report-width=200 --report-summary --report-full classes/src/ --standard=PSR2 -n" + ], + "mess": [ + "phpmd classes/src/ xml codesize,unusedcode,design,naming -n" + ], + "lines": [ + "phploc classes/src/ -n" + ], + "cpd": [ + "phpcpd classes/src/ -n" + ] + }, + "minimum-stability": "dev" +} \ No newline at end of file diff --git a/vendor/markbaker/complex/examples/complexTest.php b/vendor/markbaker/complex/examples/complexTest.php new file mode 100644 index 00000000..7dafd8a6 --- /dev/null +++ b/vendor/markbaker/complex/examples/complexTest.php @@ -0,0 +1,154 @@ +add(456); +echo $x, PHP_EOL; + +$x = new Complex(123.456); +$x->add(789.012); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->add(new Complex(-987.654, -32.1)); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->add(-987.654); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->add(new Complex(0, 1)); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->add(new Complex(0, -1)); +echo $x, PHP_EOL; + + +echo PHP_EOL, 'Subtract', PHP_EOL; + +$x = new Complex(123); +$x->subtract(456); +echo $x, PHP_EOL; + +$x = new Complex(123.456); +$x->subtract(789.012); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->subtract(new Complex(-987.654, -32.1)); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->subtract(-987.654); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->subtract(new Complex(0, 1)); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->subtract(new Complex(0, -1)); +echo $x, PHP_EOL; + + +echo PHP_EOL, 'Multiply', PHP_EOL; + +$x = new Complex(123); +$x->multiply(456); +echo $x, PHP_EOL; + +$x = new Complex(123.456); +$x->multiply(789.012); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->multiply(new Complex(-987.654, -32.1)); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->multiply(-987.654); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->multiply(new Complex(0, 1)); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->multiply(new Complex(0, -1)); +echo $x, PHP_EOL; + + +echo PHP_EOL, 'Divide By', PHP_EOL; + +$x = new Complex(123); +$x->divideBy(456); +echo $x, PHP_EOL; + +$x = new Complex(123.456); +$x->divideBy(789.012); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->divideBy(new Complex(-987.654, -32.1)); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->divideBy(-987.654); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->divideBy(new Complex(0, 1)); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->divideBy(new Complex(0, -1)); +echo $x, PHP_EOL; + + +echo PHP_EOL, 'Divide Into', PHP_EOL; + +$x = new Complex(123); +$x->divideInto(456); +echo $x, PHP_EOL; + +$x = new Complex(123.456); +$x->divideInto(789.012); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->divideInto(new Complex(-987.654, -32.1)); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->divideInto(-987.654); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->divideInto(new Complex(0, 1)); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->divideInto(new Complex(0, -1)); +echo $x, PHP_EOL; diff --git a/vendor/markbaker/complex/examples/testFunctions.php b/vendor/markbaker/complex/examples/testFunctions.php new file mode 100644 index 00000000..4d5ed735 --- /dev/null +++ b/vendor/markbaker/complex/examples/testFunctions.php @@ -0,0 +1,52 @@ +getMessage(), PHP_EOL; + } + } + echo PHP_EOL; + } +} diff --git a/vendor/markbaker/complex/examples/testOperations.php b/vendor/markbaker/complex/examples/testOperations.php new file mode 100644 index 00000000..f791263e --- /dev/null +++ b/vendor/markbaker/complex/examples/testOperations.php @@ -0,0 +1,34 @@ + ', $result, PHP_EOL; + +echo PHP_EOL; + +echo 'Subtraction', PHP_EOL; + +$result = \Complex\subtract(...$values); +echo '=> ', $result, PHP_EOL; + +echo PHP_EOL; + +echo 'Multiplication', PHP_EOL; + +$result = \Complex\multiply(...$values); +echo '=> ', $result, PHP_EOL; diff --git a/vendor/markbaker/complex/license.md b/vendor/markbaker/complex/license.md new file mode 100644 index 00000000..5b4b1561 --- /dev/null +++ b/vendor/markbaker/complex/license.md @@ -0,0 +1,25 @@ +The MIT License (MIT) +===================== + +Copyright © `2017` `Mark Baker` + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/vendor/phpoffice/phpspreadsheet/.gitattributes b/vendor/phpoffice/phpspreadsheet/.gitattributes new file mode 100644 index 00000000..0042fb0f --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/.gitattributes @@ -0,0 +1,3 @@ +/tests export-ignore +README.md export-ignore +*.min.js binary diff --git a/vendor/phpoffice/phpspreadsheet/.github/ISSUE_TEMPLATE.md b/vendor/phpoffice/phpspreadsheet/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..c25612aa --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,31 @@ +This is: + +``` +- [ ] a bug report +- [ ] a feature request +- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet) +``` + +### What is the expected behavior? + + +### What is the current behavior? + + +### What are the steps to reproduce? + +Please provide a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) of code that exhibits the issue without relying on an external Excel file or a web server: + +```php + + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. + + If this is still an issue for you, please try to help by debugging it + further and sharing your results. + + Thank you for your contributions. + +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false diff --git a/vendor/phpoffice/phpspreadsheet/.github/support.yml b/vendor/phpoffice/phpspreadsheet/.github/support.yml new file mode 100644 index 00000000..e66573e9 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/.github/support.yml @@ -0,0 +1,15 @@ +# Label used to mark issues as support requests +supportLabel: question +# Comment to post on issues marked as support requests. Add a link +# to a support page, or set to `false` to disable +supportComment: > + This looks like a support question. Please ask your support questions on + [StackOverflow](http://stackoverflow.com/questions/tagged/phpspreadsheet), + or [Gitter](https://gitter.im/PHPOffice/PhpSpreadsheet). + + Thank you for your contributions. + +# Whether to close issues marked as support requests +close: true +# Whether to lock issues marked as support requests +lock: false diff --git a/vendor/phpoffice/phpspreadsheet/.gitignore b/vendor/phpoffice/phpspreadsheet/.gitignore new file mode 100644 index 00000000..0723541d --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/.gitignore @@ -0,0 +1,10 @@ +/tests/codeCoverage +/analysis +/vendor/ +/phpunit.xml + +## IDE support +*.buildpath +*.project +/.settings +/.idea diff --git a/vendor/phpoffice/phpspreadsheet/.php_cs.dist b/vendor/phpoffice/phpspreadsheet/.php_cs.dist new file mode 100644 index 00000000..29b85d77 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/.php_cs.dist @@ -0,0 +1,182 @@ +exclude('vendor') + ->in('samples') + ->in('src') + ->in('tests'); + +return PhpCsFixer\Config::create() + ->setRiskyAllowed(true) + ->setFinder($finder) + ->setCacheFile(sys_get_temp_dir() . '/php-cs-fixer' . preg_replace('~\W~', '-', __DIR__)) + ->setRules([ + 'align_multiline_comment' => true, + 'array_syntax' => ['syntax' => 'short'], + 'backtick_to_shell_exec' => true, + 'binary_operator_spaces' => true, + 'blank_line_after_namespace' => true, + 'blank_line_after_opening_tag' => true, + 'blank_line_before_statement' => true, + 'braces' => true, + 'cast_spaces' => true, + 'class_attributes_separation' => ['elements' => ['method', 'property']], // const are often grouped with other related const + 'class_definition' => true, + 'class_keyword_remove' => false, // ::class keyword gives us beter support in IDE + 'combine_consecutive_issets' => true, + 'combine_consecutive_unsets' => true, + 'compact_nullable_typehint' => true, + 'concat_space' => ['spacing' => 'one'], + 'declare_equal_normalize' => true, + 'declare_strict_types' => false, // Too early to adopt strict types + 'dir_constant' => true, + 'doctrine_annotation_array_assignment' => true, + 'doctrine_annotation_braces' => true, + 'doctrine_annotation_indentation' => true, + 'doctrine_annotation_spaces' => true, + 'elseif' => true, + 'encoding' => true, + 'ereg_to_preg' => true, + 'escape_implicit_backslashes' => true, + 'explicit_indirect_variable' => false, // I feel it makes the code actually harder to read + 'explicit_string_variable' => false, // I feel it makes the code actually harder to read + 'final_internal_class' => true, + 'full_opening_tag' => true, + 'function_declaration' => true, + 'function_to_constant' => true, + 'function_typehint_space' => true, + 'general_phpdoc_annotation_remove' => false, // No use for that + 'hash_to_slash_comment' => true, + 'header_comment' => false, // We don't use common header in all our files + 'heredoc_to_nowdoc' => false, // Not sure about this one + 'include' => true, + 'increment_style' => true, + 'indentation_type' => true, + 'is_null' => ['use_yoda_style' => false], + 'linebreak_after_opening_tag' => true, + 'line_ending' => true, + 'list_syntax' => ['syntax' => 'long'], // Stay compatiblew with PHP 5.6 + 'lowercase_cast' => true, + 'lowercase_constants' => true, + 'lowercase_keywords' => true, + 'magic_constant_casing' => true, + 'mb_str_functions' => false, // No, too dangerous to change that + 'method_argument_space' => true, + 'method_chaining_indentation' => true, + 'method_separation' => true, + 'modernize_types_casting' => true, + 'multiline_comment_opening_closing' => true, + 'native_function_casing' => true, + 'native_function_invocation' => false, // This is risky and seems to be micro-optimization that make code uglier so not worth it, at least for now + 'new_with_braces' => true, + 'no_alias_functions' => true, + 'no_blank_lines_after_class_opening' => true, + 'no_blank_lines_after_phpdoc' => true, + 'no_blank_lines_before_namespace' => false, // we want 1 blank line before namespace + 'no_break_comment' => true, + 'no_closing_tag' => true, + 'no_empty_comment' => true, + 'no_empty_phpdoc' => true, + 'no_empty_statement' => true, + 'no_extra_blank_lines' => true, + 'no_homoglyph_names' => true, + 'no_leading_import_slash' => true, + 'no_leading_namespace_whitespace' => true, + 'no_mixed_echo_print' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_multiline_whitespace_before_semicolons' => true, + 'non_printable_character' => true, + 'no_null_property_initialization' => true, + 'no_php4_constructor' => true, + 'normalize_index_brace' => true, + 'no_short_bool_cast' => true, + 'no_short_echo_tag' => true, + 'no_singleline_whitespace_before_semicolons' => true, + 'no_spaces_after_function_name' => true, + 'no_spaces_around_offset' => true, + 'no_spaces_inside_parenthesis' => true, + 'no_superfluous_elseif' => false, // Might be risky on a huge code base + 'not_operator_with_space' => false, // No we prefer to keep '!' without spaces + 'not_operator_with_successor_space' => false, // idem + 'no_trailing_comma_in_list_call' => true, + 'no_trailing_comma_in_singleline_array' => true, + 'no_trailing_whitespace_in_comment' => true, + 'no_trailing_whitespace' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unneeded_curly_braces' => true, + 'no_unneeded_final_method' => true, + 'no_unreachable_default_argument_value' => true, + 'no_unused_imports' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'object_operator_without_whitespace' => true, + 'ordered_class_elements' => false, // We prefer to keep some freedom + 'ordered_imports' => true, + 'phpdoc_add_missing_param_annotation' => true, + 'phpdoc_align' => false, // Waste of time + 'phpdoc_annotation_without_dot' => true, + 'phpdoc_indent' => true, + 'phpdoc_inline_tag' => true, + 'phpdoc_no_access' => true, + 'phpdoc_no_alias_tag' => true, + 'phpdoc_no_empty_return' => true, + 'phpdoc_no_package' => true, + 'phpdoc_no_useless_inheritdoc' => true, + 'phpdoc_order' => true, + 'phpdoc_return_self_reference' => true, + 'phpdoc_scalar' => true, + 'phpdoc_separation' => true, + 'phpdoc_single_line_var_spacing' => true, + 'phpdoc_summary' => true, + 'phpdoc_to_comment' => true, + 'phpdoc_trim' => true, + 'phpdoc_types_order' => true, + 'phpdoc_types' => true, + 'phpdoc_var_without_name' => true, + 'php_unit_construct' => true, + 'php_unit_dedicate_assert' => true, + 'php_unit_expectation' => true, + 'php_unit_fqcn_annotation' => true, + 'php_unit_mock' => true, + 'php_unit_namespaced' => true, + 'php_unit_no_expectation_annotation' => true, + 'php_unit_strict' => false, // We sometime actually need assertEquals + 'php_unit_test_annotation' => true, + 'php_unit_test_class_requires_covers' => false, // We don't care as much as we should about coverage + 'pow_to_exponentiation' => false, + 'protected_to_private' => true, + 'psr0' => true, + 'psr4' => true, + 'random_api_migration' => false, // This breaks our unit tests + 'return_type_declaration' => true, + 'self_accessor' => true, + 'semicolon_after_instruction' => false, // Buggy in `samples/index.php` + 'short_scalar_cast' => true, + 'silenced_deprecation_error' => true, + 'simplified_null_return' => false, // While technically correct we prefer to be explicit when returning null + 'single_blank_line_at_eof' => true, + 'single_blank_line_before_namespace' => true, + 'single_class_element_per_statement' => true, + 'single_import_per_statement' => true, + 'single_line_after_imports' => true, + 'single_line_comment_style' => true, + 'single_quote' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'static_lambda' => false, // Risky if we can't guarantee nobody use `bindTo()` + 'strict_comparison' => false, // No, too dangerous to change that + 'strict_param' => false, // No, too dangerous to change that + 'switch_case_semicolon_to_colon' => true, + 'switch_case_space' => true, + 'ternary_operator_spaces' => true, + 'ternary_to_null_coalescing' => false, // Cannot use that with PHP 5.6 + 'trailing_comma_in_multiline_array' => true, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'visibility_required' => true, + 'void_return' => false, // Cannot use that with PHP 5.6 + 'whitespace_after_comma_in_array' => true, + 'yoda_style' => false, + ]); diff --git a/vendor/phpoffice/phpspreadsheet/.sami.php b/vendor/phpoffice/phpspreadsheet/.sami.php new file mode 100644 index 00000000..9a2fca35 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/.sami.php @@ -0,0 +1,24 @@ +files() + ->name('*.php') + ->in($dir = __DIR__ . '/src'); +$versions = GitVersionCollection::create($dir) + ->addFromTags(function ($version) { + return preg_match('~^\d+\.\d+\.\d+$~', $version); + }) + ->add('master'); + +return new Sami($iterator, [ + 'title' => 'PhpSpreadsheet', + 'versions' => $versions, + 'build_dir' => __DIR__ . '/build/%version%', + 'cache_dir' => __DIR__ . '/cache/%version%', + 'remote_repository' => new GitHubRemoteRepository('PHPOffice/PhpSpreadsheet', dirname($dir)), +]); diff --git a/vendor/phpoffice/phpspreadsheet/.scrutinizer.yml b/vendor/phpoffice/phpspreadsheet/.scrutinizer.yml new file mode 100644 index 00000000..748f3ac3 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/.scrutinizer.yml @@ -0,0 +1,27 @@ +checks: + php: true + +coding_style: + php: + spaces: + before_parentheses: + closure_definition: true + around_operators: + concatenation: true + +build: + nodes: + analysis: + tests: + override: + - php-scrutinizer-run + +tools: + external_code_coverage: + timeout: 3600 + +build_failure_conditions: + - 'elements.rating(<= C).new.exists' # No new classes/methods with a rating of C or worse allowed + - 'issues.severity(>= MAJOR).new.exists' # New issues of major or higher severity + - 'project.metric_change("scrutinizer.test_coverage", < 0)' # Code Coverage decreased from previous inspection + - 'patches.label("Unused Use Statements").new.exists' # No new unused imports patches allowed diff --git a/vendor/phpoffice/phpspreadsheet/.travis.yml b/vendor/phpoffice/phpspreadsheet/.travis.yml new file mode 100644 index 00000000..fd86412a --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/.travis.yml @@ -0,0 +1,60 @@ +language: php +dist: trusty +sudo: false + +php: + - 5.6 + - 7.0 + - 7.1 + - 7.2 + - 7.3 + +cache: + directories: + - cache + - vendor + - $HOME/.composer/cache + +before_script: + # Deactivate xdebug + - if [ -z "$KEEP_XDEBUG" ]; then rm -rfv /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ; fi + - composer install --ignore-platform-reqs + +script: + - ./vendor/bin/phpunit + +jobs: + include: + + - stage: Code style + php: 7.2 + script: + - ./vendor/bin/php-cs-fixer fix --diff --verbose --dry-run + - ./vendor/bin/phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PSR2 -n + + - stage: Coverage + php: 7.2 + env: KEEP_XDEBUG=1 + script: + - travis_wait 40 ./vendor/bin/phpunit --debug --coverage-clover coverage-clover.xml + after_script: + - wget https://scrutinizer-ci.com/ocular.phar + - php ocular.phar code-coverage:upload --format=php-clover tests/coverage-clover.xml + + - stage: API documentation + php: 7.2 + before_script: + - curl -O http://get.sensiolabs.org/sami.phar + script: + - git fetch origin master:master + - git fetch origin --tags + - php sami.phar update .sami.php + - echo '
If you are not automatically redirected, please go to the latest stable API documentation.
' > build/index.html + deploy: + provider: pages + skip-cleanup: true + local-dir: build + github-token: $GITHUB_TOKEN + on: + all_branches: true + condition: $TRAVIS_BRANCH =~ ^master|develop$ diff --git a/vendor/phpoffice/phpspreadsheet/CHANGELOG.PHPExcel.md b/vendor/phpoffice/phpspreadsheet/CHANGELOG.PHPExcel.md new file mode 100644 index 00000000..a32f78b5 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/CHANGELOG.PHPExcel.md @@ -0,0 +1,1593 @@ +# Changelog for PHPExcel + +This is the historic changelog of the project when it was still called PHPExcel. +It exists only for historical purposes and versions mentioned here should not be +confused with PhpSpreadsheet versions. + +## [1.8.1] - 2015-04-30 + +### Bugfixes + +- Fix for Writing an Open Document cell with non-numeric formula - @goncons [#397](https://github.com/PHPOffice/PHPExcel/issues/397) +- Avoid potential divide by zero in basedrawing - @sarciszewski [#329](https://github.com/PHPOffice/PHPExcel/issues/329) +- XML External Entity (XXE) Processing, different behaviour between simplexml_load_string() and simplexml_load_file(). - @ymaerschalck [#405](https://github.com/PHPOffice/PHPExcel/issues/405) +- Fix to ensure that current cell is maintained when executing formula calculations - @MarkBaker +- Keep/set the value on Reader _loadSheetsOnly as NULL, courtesy of Restless-ET - @MarkBaker [#350](https://github.com/PHPOffice/PHPExcel/issues/350) +- Loading an Excel 2007 spreadsheet throws an "Autofilter must be set on a range of cells" exception - @MarkBaker [CodePlex #18105](https://phpexcel.codeplex.com/workitem/18105) +- Fix to autoloader registration for backward compatibility with PHP 5.2.0 not accepting the prepend flag - @MarkBaker [#388](https://github.com/PHPOffice/PHPExcel/issues/388) +- DOM loadHTMLFile() failing with options flags when using PHP < 5.4.0 - @MarkBaker [#384](https://github.com/PHPOffice/PHPExcel/issues/384) +- Fix for percentage operator in formulae for BIFF Writer - @MarkBaker +- Fix to getStyle() call for cell object - @MarkBaker +- Discard Autofilters in Excel2007 Reader when filter range isn't a valid range - @MarkBaker +- Fix invalid NA return in VLOOKUP - @frozenstupidity [#423](https://github.com/PHPOffice/PHPExcel/issues/423) +- "No Impact" conditional formatting fix for NumberFormat - @wiseloren [CodePlex #21454](https://phpexcel.codeplex.com/workitem/21454) +- Bug in Excel2003XML reader, parsing merged cells - @bobwitlox [#467](https://github.com/PHPOffice/PHPExcel/issues/467) +- Fix for CEIL() and FLOOR() when number argument is zero - @MarkBaker [#302](https://github.com/PHPOffice/PHPExcel/issues/302) + +### General + +- Remove cells cleanly when calling RemoveRow() or RemoveColumn() - @MarkBaker +- Small performance improvement for autosize columns - @MarkBaker +- Change the getter/setter for zeroHeight to camel case - @frost-nzcr4 [#379](https://github.com/PHPOffice/PHPExcel/issues/379) +- DefaultValueBinder is too much aggressive when converting string to numeric - @MarkBaker [#394](https://github.com/PHPOffice/PHPExcel/issues/394) +- Default precalculate formulas to false for writers - @MarkBaker +- Set default Cyclic Reference behaviour to 1 to eliminate exception when using a single cyclic iteration in formulae - @MarkBaker + +### Features + +- Some Excel writer libraries erroneously use Codepage 21010 for UTF-16LE - @MarkBaker [#396](https://github.com/PHPOffice/PHPExcel/issues/396) +- Methods to manage most of the existing options for Chart Axis, Major Grid-lines and Minor Grid-lines - @WiktrzGE [#404](https://github.com/PHPOffice/PHPExcel/issues/404) +- ODS read/write comments in the cell - @frost-nzcr4 [#403](https://github.com/PHPOffice/PHPExcel/issues/403) +- Additional Mac CJK codepage definitions - @CQD [#389](https://github.com/PHPOffice/PHPExcel/issues/389) +- Update Worksheet.php getStyleByColumnAndRow() to allow a range of cells rather than just a single cell - @bolovincev [#269](https://github.com/PHPOffice/PHPExcel/issues/269) +- New methods added for testing cell status within merge groups - @MarkBaker +- Handling merge cells in HTML Reader - @cifren/MBaker [#205](https://github.com/PHPOffice/PHPExcel/issues/205) +- Helper to convert basic HTML markup to a Rich Text object - @MarkBaker +- Improved Iterators - @MarkBaker + - New Column Iterator + - Support for row and column ranges + - Improved handling for next/prev + +### Security + +- XML filescan in XML-based Readers to prevent XML Entity Expansion (XEE) - @MarkBaker + - (see http://projects.webappsec.org/w/page/13247002/XML%20Entity%20Expansion for an explanation of XEE injection) attacks + - Reference CVE-2015-3542 - Identification of problem courtesy of Dawid Golunski (Pentest Ltd.) + +## [1.8.0] - 2014-03-02 + +### Bugfixes + +- Undefined variable: fileHandle in CSV Reader - @MarkBaker [CodePlex #19830](https://phpexcel.codeplex.com/workitem/19830) +- Out of memory in style/supervisor.php - @MarkBaker [CodePlex #19968](https://phpexcel.codeplex.com/workitem/19968) +- Style error with merged cells in PDF Writer - @MarkBaker +- Problem with cloning worksheets - @MarkBaker +- Bug fix reading Open Office files - @tavoarcila [#259](https://github.com/PHPOffice/PHPExcel/issues/259) +- Serious bug in absolute cell reference used in shared formula - @MarkBaker [CodePlex #20397](https://phpexcel.codeplex.com/workitem/20397) + - Would also have affected insert/delete column/row- CHOOSE() returns "#VALUE!" if the 1st entry is chosen - @RomanSyroeshko [#267](https://github.com/PHPOffice/PHPExcel/issues/267) +- When duplicating styles, styles shifted by one column to the right - @Gemorroj [#268](https://github.com/PHPOffice/PHPExcel/issues/268) + - Fix also applied to duplicating conditional styles- Fix for formulae that reference a sheet whose name begins with a digit: - @IndrekHaav [#212](https://github.com/PHPOffice/PHPExcel/issues/212) + - these were erroneously identified as numeric values, causing the parser to throw an undefined variable error.- Fixed undefined variable error due to $styleArray being used before it's initialised - @IndrekHaav [CodePlex #16208](https://phpexcel.codeplex.com/workitem/16208) +- ISTEXT() return wrong result if referencing an empty but formatted cell - @PowerKiKi [#273](https://github.com/PHPOffice/PHPExcel/issues/273) +- Binary comparison of strings are case insensitive - @PowerKiKi [#270](https://github.com/PHPOffice/PHPExcel/issues/270), [#31](https://github.com/PHPOffice/PHPExcel/issues/31) +- Insert New Row/Column Before is not correctly updating formula references - @MarkBaker [#275](https://github.com/PHPOffice/PHPExcel/issues/275) +- Passing an array of cells to _generateRow() in the HTML/PDF Writer causes caching problems with last cell in the range - @MarkBaker [#257](https://github.com/PHPOffice/PHPExcel/issues/257) +- Fix to empty worksheet garbage collection when using cell caching - @MarkBaker [#193](https://github.com/PHPOffice/PHPExcel/issues/193) +- Excel2007 does not correctly mark rows as hidden - @Jazzo [#248](https://github.com/PHPOffice/PHPExcel/issues/248) +- Fixed typo in Chart/Layout set/getYMode() - @Roy Shahbazian [#299](https://github.com/PHPOffice/PHPExcel/issues/299) +- Fatal error: Call to a member function cellExists() line: 3327 in calculation.php if referenced worksheet doesn't exist - @EliuFlorez [#279](https://github.com/PHPOffice/PHPExcel/issues/279) +- AdvancedValueBinder "Division by zero"-error - @MarkBaker [#290](https://github.com/PHPOffice/PHPExcel/issues/290) +- Adding Sheet to Workbook Bug - @MarkBaker [CodePlex #20604](https://phpexcel.codeplex.com/workitem/20604) +- Calculation engine incorrectly evaluates empty cells as #VALUE - @MarkBaker [CodePlex #20703](https://phpexcel.codeplex.com/workitem/20703) +- Formula references to cell on another sheet in ODS files - @MarkBaker [CodePlex #20760](https://phpexcel.codeplex.com/workitem/20760) + +### Features + +- LibreOffice created XLSX files results in an empty file. - @MarkBaker [#321](https://github.com/PHPOffice/PHPExcel/issues/321), [#158](https://github.com/PHPOffice/PHPExcel/issues/158), [CodePlex #17824](https://phpexcel.codeplex.com/workitem/17824) +- Implementation of the Excel HLOOKUP() function - @amerov +- Added "Quote Prefix" to style settings (Excel2007 Reader and Writer only) - @MarkBaker +- Added Horizontal FILL alignment for Excel5 and Excel2007 Readers/Writers, and Horizontal DISTRIBUTED alignment for Excel2007 Reader/Writer - @MarkBaker +- Add support for reading protected (RC4 encrypted) .xls files - @trvrnrth [#261](https://github.com/PHPOffice/PHPExcel/issues/261) + +### General + +- Adding support for macros, Ribbon in Excel 2007 - @LWol [#252](https://github.com/PHPOffice/PHPExcel/issues/252) +- Remove array_shift in ReferenceHelper::insertNewBefore improves column or row delete speed - @cdhutch [CodePlex #20055](https://phpexcel.codeplex.com/workitem/20055) +- Improve stock chart handling and rendering, with help from Swashata Ghosh - @MarkBaker +- Fix to calculation properties for Excel2007 so that the opening application will only recalculate on load if it's actually required - @MarkBaker +- Modified Excel2007 Writer to default preCalculateFormulas to false - @MarkBaker + - Note that autosize columns will still recalculate affected formulae internally- Functionality to getHighestRow() for a specified column, and getHighestColumn() for a specified row - @dresenhista [#242](https://github.com/PHPOffice/PHPExcel/issues/242) +- Modify PHPExcel_Reader_Excel2007 to use zipClass from PHPExcel_Settings::getZipClass() - @adamriyadi [#247](https://github.com/PHPOffice/PHPExcel/issues/247) + - This allows the use of PCLZip when reading for people that don't have access to ZipArchive +### Security + +- Convert properties to string in OOCalc reader - @infojunkie [#276](https://github.com/PHPOffice/PHPExcel/issues/276) +- Disable libxml external entity loading by default. - @maartenba [#322](https://github.com/PHPOffice/PHPExcel/issues/322) + - This is to prevent XML External Entity Processing (XXE) injection attacks (see http://websec.io/2012/08/27/Preventing-XEE-in-PHP.html for an explanation of XXE injection). + - Reference CVE-2014-2054 + +## [1.7.9] - 2013-06-02 + +### Features + +- Include charts option for HTML Writer - @MarkBaker +- Added composer file - @MarkBaker +- cache_in_memory_gzip "eats" last worksheet line, cache_in_memory doesn't - @MarkBaker [CodePlex #18844](https://phpexcel.codeplex.com/workitem/18844) +- echo statements in HTML.php - @MarkBaker [#104](https://github.com/PHPOffice/PHPExcel/issues/104) + +### Bugfixes + +- Added getStyle() method to Cell object - @MarkBaker +- Error in PHPEXCEL/Calculation.php script on line 2976 (stack pop check) - @Asker [CodePlex #18777](https://phpexcel.codeplex.com/workitem/18777) +- CSV files without a file extension being identified as HTML - @MarkBaker [CodePlex #18794](https://phpexcel.codeplex.com/workitem/18794) +- Wrong check for maximum number of rows in Excel5 Writer - @AndreKR [#66](https://github.com/PHPOffice/PHPExcel/issues/66) +- Cache directory for DiscISAM cache storage cannot be set - @MarkBaker [#67](https://github.com/PHPOffice/PHPExcel/issues/67) +- Fix to Excel2007 Reader for hyperlinks with an anchor fragment (following a #), otherwise they were treated as sheet references - @MarkBaker [CodePlex #17976](https://phpexcel.codeplex.com/workitem/17976) +- getSheetNames() fails on numeric (floating point style) names with trailing zeroes - @MarkBaker [CodePlex #18963](https://phpexcel.codeplex.com/workitem/18963) +- Modify cell's getCalculatedValue() method to return the content of RichText objects rather than the RichText object itself - @MarkBaker +- Fixed formula/formatting bug when removing rows - @techhead [#70](https://github.com/PHPOffice/PHPExcel/issues/70) +- Fix to cellExists for non-existent namedRanges - @alexgann [#63](https://github.com/PHPOffice/PHPExcel/issues/63) +- Sheet View in Excel5 Writer - @Progi1984 [#22](https://github.com/PHPOffice/PHPExcel/issues/22) +- PHPExcel_Worksheet::getCellCollection() may not return last cached cell - @amironov [#82](https://github.com/PHPOffice/PHPExcel/issues/82) +- Rich Text containing UTF-8 characters creating unreadable content with Excel5 Writer - @teso [CodePlex #18551](https://phpexcel.codeplex.com/workitem/18551) +- Work item GH-8/CP11704 : Conditional formatting in Excel 5 Writer - @Progi1984 +- canRead() Error for GoogleDocs ODS files: in ODS files from Google Docs there is no mimetype file - @MarkBaker [#113](https://github.com/PHPOffice/PHPExcel/issues/113) +- "Sheet index is out of bounds." Exception - @MarkBaker [#80](https://github.com/PHPOffice/PHPExcel/issues/80) +- Fixed number format fatal error - @ccorliss [#105](https://github.com/PHPOffice/PHPExcel/issues/105) +- Add DROP TABLE in destructor for SQLite and SQLite3 cache controllers - @MarkBaker +- Fix merged-cell borders on HTML/PDF output - @alexgann [#154](https://github.com/PHPOffice/PHPExcel/issues/154) +- Fix: Hyperlinks break when removing rows - @Shanto [#161](https://github.com/PHPOffice/PHPExcel/issues/161) +- Fix Extra Table Row From Images and Charts - @neclimdul [#166](https://github.com/PHPOffice/PHPExcel/issues/166) + +### General + +- Single cell print area - @MarkBaker [#130](https://github.com/PHPOffice/PHPExcel/issues/130) +- Improved AdvancedValueBinder for currency - @kea [#69](https://github.com/PHPOffice/PHPExcel/issues/69) +- Fix for environments where there is no access to /tmp but to upload_tmp_dir - @MarkBaker + - Provided an option to set the sys_get_temp_dir() call to use the upload_tmp_dir; though by default the standard temp directory will still be used- Search style by identity in PHPExcel_Worksheet::duplicateStyle() - @amironov [#84](https://github.com/PHPOffice/PHPExcel/issues/84) +- Fill SheetView IO in Excel5 - @karak [#85](https://github.com/PHPOffice/PHPExcel/issues/85) +- Memory and Speed improvements in PHPExcel_Reader_Excel5 - @cfhay [CodePlex #18958](https://phpexcel.codeplex.com/workitem/18958) +- Modify listWorksheetNames() and listWorksheetInfo to use XMLReader with streamed XML rather than SimpleXML - @MarkBaker [#78](https://github.com/PHPOffice/PHPExcel/issues/78) +- Restructuring of PHPExcel Exceptions - @dbonsch +- Refactor Calculation Engine from singleton to a Multiton - @MarkBaker + - Ensures that calculation cache is maintained independently for different workbooks + +## [1.7.8] - 2012-10-12 + +### Features + +- Phar builder script to add phar file as a distribution option - @kkamkou +- Refactor PDF Writer to allow use with a choice of PDF Rendering library - @MarkBaker + - rather than restricting to tcPDF + - Current options are tcPDF, mPDF, DomPDF + - tcPDF Library has now been removed from the deployment bundle- Initial version of HTML Reader - @MarkBaker +- Implement support for AutoFilter in PHPExcel_Writer_Excel5 - @Progi1984 +- Modified ERF and ERFC Engineering functions to accept Excel 2010's modified acceptance of negative arguments - @MarkBaker +- Support SheetView `view` attribute (Excel2007) - @k1LoW +- Excel compatibility option added for writing CSV files - @MarkBaker + - While Excel 2010 can read CSV files with a simple UTF-8 BOM, Excel2007 and earlier require UTF-16LE encoded tab-separated files. + - The new setExcelCompatibility(TRUE) option for the CSV Writer will generate files with this formatting for easy import into Excel2007 and below.- Language implementations for Turkish (tr) - @MarkBaker +- Added fraction tests to advanced value binder - @MarkBaker + +### General + +- Allow call to font setUnderline() for underline format to specify a simple boolean for UNDERLINE_NONE or UNDERLINE_SINGLE - @MarkBaker +- Add Currency detection to the Advanced Value Binder - @alexgann +- setCellValueExplicitByColumnAndRow() do not return PHPExcel_Worksheet - @MarkBaker [CodePlex #18404](https://phpexcel.codeplex.com/workitem/18404) +- Reader factory doesn't read anymore XLTX and XLT files - @MarkBaker [CodePlex #18324](https://phpexcel.codeplex.com/workitem/18324) +- Magic __toString() method added to Cell object to return raw data value as a string - @MarkBaker +- Add cell indent to html rendering - @alexgann + +### Bugfixes + +- ZeroHeight for rows in sheet format - @Raghav1981 +- OOCalc cells containing| + | Readers | +Writers | +Methods | +||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| + | XLS | +XLSX | +Excel2003XML | +Ods | +Gnumeric | +CSV | +SYLK | +XLS | +XLSX | +Ods | +CSV | +HTML | +Getters | +Setters | +|
| Reader Options | +✔ | +✔ | +● | +● | +✔ | +N/A | +N/A | +N/A | +N/A | +N/A | +N/A | +N/A | +N/A | ++ | + |
| Read Data Only (no formatting) | +✔ | +✔ | +✖ | +✖ | +✔ | +N/A | +N/A | +N/A | +N/A | +N/A | +N/A | +N/A | +N/A | +$reader->getReadDataOnly() | +$reader->setReadDataOnly() | +
| Read Only Specified Worksheets | +✔ | +✔ | +✔ | +✔ | +✔ | +N/A | +N/A | +N/A | +N/A | +N/A | +N/A | +N/A | +N/A | +$reader->getLoadSheetsOnly() | +$reader->setLoadSheetsOnly() $reader->setLoadAllSheets() |
+
| Read Only Specified Cells | +✔ | +✔ | +✔ | +✔ | +✔ | +N/A | +N/A | +N/A | +N/A | +N/A | +N/A | +N/A | +N/A | +$reader->getReadFilter() | +$reader->setReadFilter() | +
| Document Properties | +● | +✔ | +✔ | +✔ | +✔ | +N/A | +N/A | +● | +✔ | +✔ | +N/A | +N/A | +● | ++ | + |
| Standard Properties | +✔ | +✔ | +✔ | +✔ | +✔ | +N/A | +N/A | +✔ | +✔ | +● | +N/A | +N/A | +● | ++ | + |
| Creator | +✔ | +✔ | +✔ | +✔ | +✔ | +N/A | +N/A | +✔ | +✔ | +✔ | +N/A | +✔ | +✔ | +$spreadsheet->getProperties()->getCreator() | +$spreadsheet->getProperties()->setCreator() | +
| Creation Date/Time | +✔ | +✔ | +✔ | +✔ | +✔ | +N/A | +N/A | +✔ | +✔ | +✔ | +N/A | +N/A | +✖ | +$spreadsheet->getProperties()->getCreated() | +$spreadsheet->getProperties()->setCreated() | +
| Modifier | +✔ | +✔ | +✔ | +N/A | +N/A | +N/A | +N/A | +✔ | +✔ | +✖ | +N/A | +N/A | +✖ | +$spreadsheet->getProperties()->getLastModifiedBy() | +$spreadsheet->getProperties()->setLastModifiedBy() | +
| Modified Date/Time | +✔ | +✔ | +✔ | +✔ | +N/A | +N/A | +N/A | +✔ | +✔ | +✖ | +N/A | +N/A | +✖ | +$spreadsheet->getProperties()->getModified() | +$spreadsheet->getProperties()->setModified() | +
| Title | +✔ | +✔ | +✔ | +✔ | +✔ | +N/A | +N/A | +✔ | +✔ | +✔ | +N/A | +✔ | +✔ | +$spreadsheet->getProperties()->getTitle() | +$spreadsheet->getProperties()->setTitle() | +
| Description | +✔ | +✔ | +✔ | +✔ | +✔ | +N/A | +N/A | +✔ | +✔ | +✔ | +N/A | +N/A | +✖ | +$spreadsheet->getProperties()->getDescription() | +$spreadsheet->getProperties()->setDescription() | +
| Subject | +✔ | +✔ | +✔ | +✔ | +✔ | +N/A | +N/A | +✔ | +✔ | +✔ | +N/A | +✔ | +✔ | +$spreadsheet->getProperties()->getSubject() | +$spreadsheet->getProperties()->setSubject() | +
| Keywords | +✔ | +✔ | +✔ | +✔ | +✔ | +N/A | +N/A | +✔ | +✔ | +✔ | +N/A | +✔ | +✔ | +$spreadsheet->getProperties()->getKeywords() | +$spreadsheet->getProperties()->setKeywords() | +
| Extended Properties | +✔ | +✔ | +✔ | +N/A | +✔ | +N/A | +N/A | ++ | ✔ | +● | +N/A | +N/A | ++ | + | + |
| Category | +✔ | +✔ | +✔ | +N/A | +✔ | +N/A | +N/A | ++ | ✔ | +✔ | +N/A | +N/A | ++ | $spreadsheet->getProperties()->getCategory() | +$spreadsheet->getProperties()->setCategory() | +
| Company | +✔ | +✔ | +✔ | +N/A | +✔ | +N/A | +N/A | ++ | ✔ | +✔ | +N/A | +N/A | ++ | $spreadsheet->getProperties()->getCompany() | +$spreadsheet->getProperties()->setCompany() | +
| Manager | +✔ | +✔ | +✔ | +N/A | +✔ | +N/A | +N/A | ++ | ✔ | +✖ | +N/A | +N/A | ++ | $spreadsheet->getProperties()->getManager() | +$spreadsheet->getProperties()->setManager() | +
| User-Defined (Custom) Properties | +✖ | +✔ | +✔ | +✔ | +N/A | +N/A | +N/A | ++ | ✔ | +✖ | +N/A | +N/A | ++ | $spreadsheet->getProperties()->getCustomProperties() $spreadsheet->getProperties()->isCustomPropertySet() $spreadsheet->getProperties()->getCustomPropertyValue() $spreadsheet->getProperties()->getCustomPropertyType() |
+ $spreadsheet->getProperties()->setCustomProperty() | +
| Text Properties | +✖ | +✔ | +✔ | +✔ | +N/A | +N/A | +N/A | ++ | ✔ | +✖ | +N/A | +N/A | ++ | + | + |
| Number Properties | +✖ | +✔ | +✔ | +✔ | +N/A | +N/A | +N/A | ++ | ✔ | +✖ | +N/A | +N/A | ++ | + | + |
| Date Properties | +✖ | +✔ | +✔ | +✔ | +N/A | +N/A | +N/A | ++ | ✔ | +✖ | +N/A | +N/A | ++ | + | + |
| Yes/No (Boolean) Properties | +✖ | +✔ | +✔ | +✔ | +N/A | +N/A | +N/A | ++ | ✔ | +✖ | +N/A | +N/A | ++ | + | + |
| Cell Data Types | ++ | + | + | + | ● | ++ | + | ● | ++ | + | + | + | + | + | + |
| Empty/NULL | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Boolean | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Integer | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Floating Point | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| String | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Error | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Formula | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Array | ++ | + | + | + | ✖ | ++ | + | + | + | + | + | + | + | + | + |
| Rich Text | +✔ | +✔ | ++ | + | ✖ | +N/A | ++ | ✖ | +✔ | ++ | N/A | ++ | + | + | + |
| Conditional Formatting | +✖ | +✔ | ++ | + | + | N/A | ++ | ✖ | +✔ | +N/A | ++ | + | + | + | + |
| Rows and Column Properties | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Row Height/Column Width | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Hidden | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Worksheet Properties | ++ | + | + | + | ✖ | ++ | + | + | + | + | + | + | + | + | + |
| Frozen Panes | ++ | + | + | + | ✖ | ++ | + | + | + | + | + | + | + | + | + |
| Coloured Tabs | ++ | + | + | + | N/A | ++ | + | + | + | + | + | + | + | + | + |
| Drawing hyperlink | ++ | ✔ | ++ | + | + | + | + | + | ✔ | ++ | + | + | + | $drawing->getHyperlink()->getUrl() | +$drawing->setHyperlink()->setUrl($url) | +
| Cell Formatting | ++ | + | + | + | ● | ++ | + | + | + | + | + | + | + | + | + |
| Number Format Mask | +✔ | +✔ | ++ | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Alignment | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Horizontal | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Vertical | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Wrapping | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Shring-to-Fit | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Indent | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Background Colour | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | ● | ++ | + | + |
| Patterned | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Font Attributes | ++ | + | + | + | ✔ | ++ | + | + | + | ● | ++ | + | + | + | + |
| Font Face | ++ | + | + | + | ✔ | ++ | + | + | + | ✔ | ++ | + | + | + | + |
| Font Size | ++ | + | + | + | ✔ | ++ | + | + | + | ✔ | ++ | + | + | + | + |
| Bold | ++ | + | + | + | ✔ | ++ | + | + | + | ✔ | ++ | + | + | + | + |
| Italic | ++ | + | + | + | ✔ | ++ | + | + | + | ✔ | ++ | + | + | + | + |
| Strikethrough | ++ | + | + | + | ✔ | ++ | + | + | + | ✖ | ++ | + | + | + | + |
| Underline | ++ | + | + | + | ✔ | ++ | + | + | + | ✔ | ++ | + | + | + | + |
| Superscript | ++ | + | + | + | ✔ | ++ | + | + | + | ✖ | ++ | + | + | + | + |
| Subscript | ++ | + | + | + | ✔ | ++ | + | + | + | ✖ | ++ | + | + | + | + |
| Borders | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Line Style | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Position | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Diagonal | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Hyperlinks | +✔ | +✔ | +✔ | +✔ | +✖ | +✖ | +✖ | +✔ | +✔ | +✖ | +✖ | +✔ | +✖ | +$cell->getHyperlink()->getUrl($url) | +$cell->getHyperlink()->setUrl($url) | +
| http | ++ | + | + | + | ✖ | ++ | + | + | + | + | + | + | + | + | + |
| Merged Cells | ++ | + | + | + | ✔ | ++ | + | + | + | + | + | + | + | + | + |
| Cell Comments | +● | +● | +● | +● | +✔ | +N/A | +N/A | +✖ | +● | +● | +N/A | +● 1 | +N/A | ++ | + |
| Rich Text | +✖ 2 | +✔ | +✖ | +✖ | +N/A | +N/A | +N/A | +✖ | +✔ | +✖ | +N/A | ++ | N/A | ++ | + |
| Alignment | +✖ 3 | +✖ | +✖ | +✖ | +N/A | +N/A | +N/A | +✖ | +✖ | +✖ | +N/A | ++ | N/A | ++ | + |
| Cell Validation | +✔ | +✔ | +✖ | +✖ | +✖ | +N/A | +N/A | +✔ | +✔ | +✖ | +N/A | +N/A | +N/A | +$cell->getDataValidation() | +$cell->setDataValidation() | +
| AutoFilters | +● | +● | ++ | + | + | + | + | ● | +● | ++ | + | + | + | $sheet->getAutoFilter() | +$sheet->setAutoFilter() | +
| AutoFilter Expressions | +✖ | +● | ++ | + | + | + | + | ✖ | +● | ++ | + | + | + | + | + |
| Filter | +✖ | +✔ | ++ | + | + | + | + | ✖ | +✔ | ++ | + | + | + | + | + |
| Custom Filter | +✖ | +✔ | ++ | + | + | + | + | ✖ | +✔ | ++ | + | + | + | + | + |
| DateGroup Filter | +✖ | +✔ | ++ | + | + | + | + | ✖ | +✔ | ++ | + | + | + | + | + |
| Dynamic Filter | +✖ | +✔ | ++ | + | + | + | + | ✖ | +✔ | ++ | + | + | + | + | + |
| Colour Filter | +✖ | +✖ | ++ | + | + | + | + | ✖ | +✖ | ++ | + | + | + | + | + |
| Icon Filter | +✖ | +✖ | ++ | + | + | + | + | ✖ | +✖ | ++ | + | + | + | + | + |
| Top 10 Filter | +✖ | +✔ | ++ | + | + | + | + | ✖ | +✔ | ++ | + | + | + | + | + |
| Macros | +✖ | +✔ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✔ | +✖ | +✖ | +✖ | +✖ | +$spreadsheet->getMacrosCode(); | +$spreadsheet->setMacrosCode(); | +
| Form Controls | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +
| Security | +● | +● | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +
| Protection (prevent editing) | +✔ | +✔ | +✖ | +✖ | +✖ | +✖ | +✖ | +✔ | +✔ | +✖ | +✖ | +✖ | +✖ | +$sheet->getProtection() | +$sheet->getProtection()->setSheet(true) | +
| Encryption (prevent viewing) | +✔ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | +✖ | ++ | + |
| + | XLS | +XLSX | +Excel2003XML | +Ods | +Gnumeric | +CSV | +SYLK | +XLS | +XLSX | +Ods | +CSV | +HTML | +Getters | +Setters | +|
| + | Readers | +Writers | +Methods | +||||||||||||
| ' . + $cell->getValue() . + ' | ' . PHP_EOL; + } + echo '
| ' . $value . ' | ' . PHP_EOL; + } + echo '
| ' . + $worksheet->getCell($col . $row) + ->getValue() . + ' | ' . PHP_EOL; + } + echo '
+ ```
+
+You might want to see:
+
+``` html
+
+```
+
+You can use the following code to achieve this result:
+
+``` php
+$writer->setImagesRoot('http://www.example.com');
+```
+
+#### Formula pre-calculation
+
+By default, this writer pre-calculates all formulas in the spreadsheet.
+This can be slow on large spreadsheets, and maybe even unwanted. You can
+however disable formula pre-calculation:
+
+``` php
+$writer = new \PhpOffice\PhpSpreadsheet\Writer\Html($spreadsheet);
+$writer->setPreCalculateFormulas(false);
+
+$writer->save("05featuredemo.htm");
+```
+
+#### Embedding generated HTML in a web page
+
+There might be a situation where you want to embed the generated HTML in
+an existing website. \PhpOffice\PhpSpreadsheet\Writer\Html provides
+support to generate only specific parts of the HTML code, which allows
+you to use these parts in your website.
+
+Supported methods:
+
+- `generateHTMLHeader()`
+- `generateStyles()`
+- `generateSheetData()`
+- `generateHTMLFooter()`
+
+Here's an example which retrieves all parts independently and merges
+them into a resulting HTML page:
+
+``` php
+generateHTMLHeader();
+?>
+
+
+?>
+
+-->
+
+
+generateSheetData();
+echo $writer->generateHTMLFooter();
+?>
+```
+
+#### Writing UTF-8 HTML files
+
+A HTML file can be marked as UTF-8 by writing a BOM file header. This
+can be enabled by using the following code:
+
+``` php
+$writer = new \PhpOffice\PhpSpreadsheet\Writer\Html($spreadsheet);
+$writer->setUseBOM(true);
+
+$writer->save("05featuredemo.htm");
+```
+
+#### Decimal and thousands separators
+
+See section `\PhpOffice\PhpSpreadsheet\Writer\Csv` how to control the
+appearance of these.
+
+## PDF
+
+PhpSpreadsheet allows you to write a spreadsheet into PDF format, for
+fast distribution of represented data.
+
+**PDF limitations** Please note that PDF file format has some limits
+regarding to styling cells, number formatting, ...
+
+### \PhpOffice\PhpSpreadsheet\Writer\Pdf
+
+PhpSpreadsheet’s PDF Writer is a wrapper for a 3rd-Party PDF Rendering
+library such as TCPDF, mPDF or Dompdf. You must now install a PDF
+rendering library yourself; but PhpSpreadsheet will work with a number
+of different libraries.
+
+Currently, the following libraries are supported:
+
+Library | Downloadable from | PhpSpreadsheet writer
+--------|-------------------------------------|----------------------
+TCPDF | https://github.com/tecnickcom/tcpdf | Tcpdf
+mPDF | https://github.com/mpdf/mpdf | Mpdf
+Dompdf | https://github.com/dompdf/dompdf | Dompdf
+
+The different libraries have different strengths and weaknesses. Some
+generate better formatted output than others, some are faster or use
+less memory than others, while some generate smaller .pdf files. It is
+the developers choice which one they wish to use, appropriate to their
+own circumstances.
+
+You can instantiate a writer with its specific name, like so:
+
+``` php
+$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Mpdf');
+```
+
+Or you can register which writer you are using with a more generic name,
+so you don't need to remember which library you chose, only that you want
+to write PDF files:
+
+``` php
+$class = \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf::class;
+\PhpOffice\PhpSpreadsheet\IOFactory::registerWriter('Pdf', $class);
+$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Pdf');
+```
+
+Or you can instantiate directly the writer of your choice like so:
+
+``` php
+$writer = \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf($spreadsheet);
+```
+
+#### Custom implementation or configuration
+
+If you need a custom implementation, or custom configuration, of a supported
+PDF library. You can extends the PDF library, and the PDF writer like so:
+
+``` php
+class My_Custom_TCPDF extends TCPDF
+{
+ // ...
+}
+
+class My_Custom_TCPDF_Writer extends \PhpOffice\PhpSpreadsheet\Writer\Pdf\Tcpdf
+{
+ protected function createExternalWriterInstance($orientation, $unit, $paperSize)
+ {
+ $instance = new My_Custom_TCPDF($orientation, $unit, $paperSize);
+
+ // more configuration of $instance
+
+ return $instance;
+ }
+}
+
+\PhpOffice\PhpSpreadsheet\IOFactory::registerWriter('Pdf', MY_TCPDF_WRITER::class);
+```
+
+#### Writing a spreadsheet
+
+Once you have identified the Renderer that you wish to use for PDF
+generation, you can write a .pdf file using the following code:
+
+``` php
+$writer = new \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf($spreadsheet);
+$writer->save("05featuredemo.pdf");
+```
+
+Please note that `\PhpOffice\PhpSpreadsheet\Writer\Pdf` only outputs the
+first worksheet by default.
+
+#### Write all worksheets
+
+PDF files can contain one or more worksheets. If you want to write all
+sheets into a single PDF file, use the following code:
+
+``` php
+$writer->writeAllSheets();
+```
+
+#### Write a specific worksheet
+
+PDF files can contain one or more worksheets. Therefore, you can specify
+which sheet to write to PDF:
+
+``` php
+$writer->setSheetIndex(0);
+```
+
+#### Formula pre-calculation
+
+By default, this writer pre-calculates all formulas in the spreadsheet.
+This can be slow on large spreadsheets, and maybe even unwanted. You can
+however disable formula pre-calculation:
+
+``` php
+$writer = new \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf($spreadsheet);
+$writer->setPreCalculateFormulas(false);
+
+$writer->save("05featuredemo.pdf");
+```
+
+#### Decimal and thousands separators
+
+See section `\PhpOffice\PhpSpreadsheet\Writer\Csv` how to control the
+appearance of these.
+
+## Generating Excel files from templates (read, modify, write)
+
+Readers and writers are the tools that allow you to generate Excel files
+from templates. This requires less coding effort than generating the
+Excel file from scratch, especially if your template has many styles,
+page setup properties, headers etc.
+
+Here is an example how to open a template file, fill in a couple of
+fields and save it again:
+
+``` php
+$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load('template.xlsx');
+
+$worksheet = $spreadsheet->getActiveSheet();
+
+$worksheet->getCell('A1')->setValue('John');
+$worksheet->getCell('A2')->setValue('Smith');
+
+$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Xls');
+$writer->save('write.xls');
+```
+
+Notice that it is ok to load an xlsx file and generate an xls file.
diff --git a/vendor/phpoffice/phpspreadsheet/docs/topics/reading-files.md b/vendor/phpoffice/phpspreadsheet/docs/topics/reading-files.md
new file mode 100644
index 00000000..779082dc
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/docs/topics/reading-files.md
@@ -0,0 +1,689 @@
+# Reading Files
+
+## Security
+
+XML-based formats such as OfficeOpen XML, Excel2003 XML, OASIS and
+Gnumeric are susceptible to XML External Entity Processing (XXE)
+injection attacks when reading spreadsheet files. This can lead to:
+
+- Disclosure whether a file is existent
+- Server Side Request Forgery
+- Command Execution (depending on the installed PHP wrappers)
+
+To prevent this, by default every XML-based Reader looks for XML
+entities declared inside the DOCTYPE and if any is found an exception
+is raised.
+
+Read more [about of XXE injection](https://websec.io/2012/08/27/Preventing-XXE-in-PHP.html).
+
+## Loading a Spreadsheet File
+
+The simplest way to load a workbook file is to let PhpSpreadsheet's IO
+Factory identify the file type and load it, calling the static `load()`
+method of the `\PhpOffice\PhpSpreadsheet\IOFactory` class.
+
+``` php
+$inputFileName = './sampleData/example1.xls';
+
+/** Load $inputFileName to a Spreadsheet Object **/
+$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($inputFileName);
+```
+
+See `samples/Reader/01_Simple_file_reader_using_IOFactory.php` for a working
+example of this code.
+
+The `load()` method will attempt to identify the file type, and
+instantiate a loader for that file type; using it to load the file and
+store the data and any formatting in a `Spreadsheet` object.
+
+The method makes an initial guess at the loader to instantiate based on
+the file extension; but will test the file before actually executing the
+load: so if (for example) the file is actually a CSV file or contains
+HTML markup, but that has been given a .xls extension (quite a common
+practise), it will reject the Xls loader that it would normally use for
+a .xls file; and test the file using the other loaders until it finds
+the appropriate loader, and then use that to read the file.
+
+While easy to implement in your code, and you don't need to worry about
+the file type; this isn't the most efficient method to load a file; and
+it lacks the flexibility to configure the loader in any way before
+actually reading the file into a `Spreadsheet` object.
+
+## Creating a Reader and Loading a Spreadsheet File
+
+If you know the file type of the spreadsheet file that you need to load,
+you can instantiate a new reader object for that file type, then use the
+reader's `load()` method to read the file to a `Spreadsheet` object. It is
+possible to instantiate the reader objects for each of the different
+supported filetype by name. However, you may get unpredictable results
+if the file isn't of the right type (e.g. it is a CSV with an extension
+of .xls), although this type of exception should normally be trapped.
+
+``` php
+$inputFileName = './sampleData/example1.xls';
+
+/** Create a new Xls Reader **/
+$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xls();
+// $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
+// $reader = new \PhpOffice\PhpSpreadsheet\Reader\Xml();
+// $reader = new \PhpOffice\PhpSpreadsheet\Reader\Ods();
+// $reader = new \PhpOffice\PhpSpreadsheet\Reader\Slk();
+// $reader = new \PhpOffice\PhpSpreadsheet\Reader\Gnumeric();
+// $reader = new \PhpOffice\PhpSpreadsheet\Reader\Csv();
+/** Load $inputFileName to a Spreadsheet Object **/
+$spreadsheet = $reader->load($inputFileName);
+```
+
+See `samples/Reader/02_Simple_file_reader_using_a_specified_reader.php`
+for a working example of this code.
+
+Alternatively, you can use the IO Factory's `createReader()` method to
+instantiate the reader object for you, simply telling it the file type
+of the reader that you want instantiating.
+
+``` php
+$inputFileType = 'Xls';
+// $inputFileType = 'Xlsx';
+// $inputFileType = 'Xml';
+// $inputFileType = 'Ods';
+// $inputFileType = 'Slk';
+// $inputFileType = 'Gnumeric';
+// $inputFileType = 'Csv';
+$inputFileName = './sampleData/example1.xls';
+
+/** Create a new Reader of the type defined in $inputFileType **/
+$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
+/** Load $inputFileName to a Spreadsheet Object **/
+$spreadsheet = $reader->load($inputFileName);
+```
+
+See `samples/Reader/03_Simple_file_reader_using_the_IOFactory_to_return_a_reader.php`
+for a working example of this code.
+
+If you're uncertain of the filetype, you can use the `IOFactory::identify()`
+method to identify the reader that you need, before using the
+`createReader()` method to instantiate the reader object.
+
+``` php
+$inputFileName = './sampleData/example1.xls';
+
+/** Identify the type of $inputFileName **/
+$inputFileType = \PhpOffice\PhpSpreadsheet\IOFactory::identify($inputFileName);
+/** Create a new Reader of the type that has been identified **/
+$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
+/** Load $inputFileName to a Spreadsheet Object **/
+$spreadsheet = $reader->load($inputFileName);
+```
+
+See `samples/Reader/04_Simple_file_reader_using_the_IOFactory_to_identify_a_reader_to_use.php`
+for a working example of this code.
+
+## Spreadsheet Reader Options
+
+Once you have created a reader object for the workbook that you want to
+load, you have the opportunity to set additional options before
+executing the `load()` method.
+
+### Reading Only Data from a Spreadsheet File
+
+If you're only interested in the cell values in a workbook, but don't
+need any of the cell formatting information, then you can set the reader
+to read only the data values and any formulae from each cell using the
+`setReadDataOnly()` method.
+
+``` php
+$inputFileType = 'Xls';
+$inputFileName = './sampleData/example1.xls';
+
+/** Create a new Reader of the type defined in $inputFileType **/
+$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
+/** Advise the Reader that we only want to load cell data **/
+$reader->setReadDataOnly(true);
+/** Load $inputFileName to a Spreadsheet Object **/
+$spreadsheet = $reader->load($inputFileName);
+```
+
+See `samples/Reader/05_Simple_file_reader_using_the_read_data_only_option.php`
+for a working example of this code.
+
+It is important to note that Workbooks (and PhpSpreadsheet) store dates
+and times as simple numeric values: they can only be distinguished from
+other numeric values by the format mask that is applied to that cell.
+When setting read data only to true, PhpSpreadsheet doesn't read the
+cell format masks, so it is not possible to differentiate between
+dates/times and numbers.
+
+The Gnumeric loader has been written to read the format masks for date
+values even when read data only has been set to true, so it can
+differentiate between dates/times and numbers; but this change hasn't
+yet been implemented for the other readers.
+
+Reading Only Data from a Spreadsheet File applies to Readers:
+
+Reader | Y/N |Reader | Y/N |Reader | Y/N |
+----------|:---:|--------|:---:|--------------|:---:|
+Xlsx | YES | Xls | YES | Xml | YES |
+Ods | YES | SYLK | NO | Gnumeric | YES |
+CSV | NO | HTML | NO
+
+### Reading Only Named WorkSheets from a File
+
+If your workbook contains a number of worksheets, but you are only
+interested in reading some of those, then you can use the
+`setLoadSheetsOnly()` method to identify those sheets you are interested
+in reading.
+
+To read a single sheet, you can pass that sheet name as a parameter to
+the `setLoadSheetsOnly()` method.
+
+``` php
+$inputFileType = 'Xls';
+$inputFileName = './sampleData/example1.xls';
+$sheetname = 'Data Sheet #2';
+
+/** Create a new Reader of the type defined in $inputFileType **/
+$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
+/** Advise the Reader of which WorkSheets we want to load **/
+$reader->setLoadSheetsOnly($sheetname);
+/** Load $inputFileName to a Spreadsheet Object **/
+$spreadsheet = $reader->load($inputFileName);
+```
+
+See `samples/Reader/07_Simple_file_reader_loading_a_single_named_worksheet.php`
+for a working example of this code.
+
+If you want to read more than just a single sheet, you can pass a list
+of sheet names as an array parameter to the `setLoadSheetsOnly()` method.
+
+``` php
+$inputFileType = 'Xls';
+$inputFileName = './sampleData/example1.xls';
+$sheetnames = ['Data Sheet #1','Data Sheet #3'];
+
+/** Create a new Reader of the type defined in $inputFileType **/
+$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
+/** Advise the Reader of which WorkSheets we want to load **/
+$reader->setLoadSheetsOnly($sheetnames);
+/** Load $inputFileName to a Spreadsheet Object **/
+$spreadsheet = $reader->load($inputFileName);
+```
+
+See `samples/Reader/08_Simple_file_reader_loading_several_named_worksheets.php`
+for a working example of this code.
+
+To reset this option to the default, you can call the `setLoadAllSheets()`
+method.
+
+``` php
+$inputFileType = 'Xls';
+$inputFileName = './sampleData/example1.xls';
+
+/** Create a new Reader of the type defined in $inputFileType **/
+$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
+/** Advise the Reader to load all Worksheets **/
+$reader->setLoadAllSheets();
+/** Load $inputFileName to a Spreadsheet Object **/
+$spreadsheet = $reader->load($inputFileName);
+```
+
+See `samples/Reader/06_Simple_file_reader_loading_all_worksheets.php` for a
+working example of this code.
+
+Reading Only Named WorkSheets from a File applies to Readers:
+
+Reader | Y/N |Reader | Y/N |Reader | Y/N |
+----------|:---:|--------|:---:|--------------|:---:|
+Xlsx | YES | Xls | YES | Xml | YES |
+Ods | YES | SYLK | NO | Gnumeric | YES |
+CSV | NO | HTML | NO
+
+### Reading Only Specific Columns and Rows from a File (Read Filters)
+
+If you are only interested in reading part of a worksheet, then you can
+write a filter class that identifies whether or not individual cells
+should be read by the loader. A read filter must implement the
+`\PhpOffice\PhpSpreadsheet\Reader\IReadFilter` interface, and contain a
+`readCell()` method that accepts arguments of `$column`, `$row` and
+`$worksheetName`, and return a boolean true or false that indicates
+whether a workbook cell identified by those arguments should be read or
+not.
+
+``` php
+$inputFileType = 'Xls';
+$inputFileName = './sampleData/example1.xls';
+$sheetname = 'Data Sheet #3';
+
+/** Define a Read Filter class implementing \PhpOffice\PhpSpreadsheet\Reader\IReadFilter */
+class MyReadFilter implements \PhpOffice\PhpSpreadsheet\Reader\IReadFilter
+{
+ public function readCell($column, $row, $worksheetName = '') {
+ // Read rows 1 to 7 and columns A to E only
+ if ($row >= 1 && $row <= 7) {
+ if (in_array($column,range('A','E'))) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
+
+/** Create an Instance of our Read Filter **/
+$filterSubset = new MyReadFilter();
+
+/** Create a new Reader of the type defined in $inputFileType **/
+$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
+/** Tell the Reader that we want to use the Read Filter **/
+$reader->setReadFilter($filterSubset);
+/** Load only the rows and columns that match our filter to Spreadsheet **/
+$spreadsheet = $reader->load($inputFileName);
+```
+
+See `samples/Reader/09_Simple_file_reader_using_a_read_filter.php` for a
+working example of this code.
+
+This example is not particularly useful, because it can only be used in
+a very specific circumstance (when you only want cells in the range
+A1:E7 from your worksheet. A generic Read Filter would probably be more
+useful:
+
+``` php
+/** Define a Read Filter class implementing \PhpOffice\PhpSpreadsheet\Reader\IReadFilter */
+class MyReadFilter implements \PhpOffice\PhpSpreadsheet\Reader\IReadFilter
+{
+ private $startRow = 0;
+ private $endRow = 0;
+ private $columns = [];
+
+ /** Get the list of rows and columns to read */
+ public function __construct($startRow, $endRow, $columns) {
+ $this->startRow = $startRow;
+ $this->endRow = $endRow;
+ $this->columns = $columns;
+ }
+
+ public function readCell($column, $row, $worksheetName = '') {
+ // Only read the rows and columns that were configured
+ if ($row >= $this->startRow && $row <= $this->endRow) {
+ if (in_array($column,$this->columns)) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
+
+/** Create an Instance of our Read Filter, passing in the cell range **/
+$filterSubset = new MyReadFilter(9,15,range('G','K'));
+```
+
+See `samples/Reader/10_Simple_file_reader_using_a_configurable_read_filter.php`
+for a working example of this code.
+
+This can be particularly useful for conserving memory, by allowing you
+to read and process a large workbook in "chunks": an example of this
+usage might be when transferring data from an Excel worksheet to a
+database.
+
+``` php
+$inputFileType = 'Xls';
+$inputFileName = './sampleData/example2.xls';
+
+/** Define a Read Filter class implementing \PhpOffice\PhpSpreadsheet\Reader\IReadFilter */
+class ChunkReadFilter implements \PhpOffice\PhpSpreadsheet\Reader\IReadFilter
+{
+ private $startRow = 0;
+ private $endRow = 0;
+
+ /** Set the list of rows that we want to read */
+ public function setRows($startRow, $chunkSize) {
+ $this->startRow = $startRow;
+ $this->endRow = $startRow + $chunkSize;
+ }
+
+ public function readCell($column, $row, $worksheetName = '') {
+ // Only read the heading row, and the configured rows
+ if (($row == 1) || ($row >= $this->startRow && $row < $this->endRow)) {
+ return true;
+ }
+ return false;
+ }
+}
+
+/** Create a new Reader of the type defined in $inputFileType **/
+$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
+
+/** Define how many rows we want to read for each "chunk" **/
+$chunkSize = 2048;
+/** Create a new Instance of our Read Filter **/
+$chunkFilter = new ChunkReadFilter();
+
+/** Tell the Reader that we want to use the Read Filter **/
+$reader->setReadFilter($chunkFilter);
+
+/** Loop to read our worksheet in "chunk size" blocks **/
+for ($startRow = 2; $startRow <= 65536; $startRow += $chunkSize) {
+ /** Tell the Read Filter which rows we want this iteration **/
+ $chunkFilter->setRows($startRow,$chunkSize);
+ /** Load only the rows that match our filter **/
+ $spreadsheet = $reader->load($inputFileName);
+ // Do some processing here
+}
+```
+
+See `samples/Reader/12_Reading_a_workbook_in_chunks_using_a_configurable_read_filter_`
+for a working example of this code.
+
+Using Read Filters applies to:
+
+Reader | Y/N |Reader | Y/N |Reader | Y/N |
+----------|:---:|--------|:---:|--------------|:---:|
+Xlsx | YES | Xls | YES | Xml | YES |
+Ods | YES | SYLK | NO | Gnumeric | YES |
+CSV | YES | HTML | NO | | |
+
+### Combining Multiple Files into a Single Spreadsheet Object
+
+While you can limit the number of worksheets that are read from a
+workbook file using the `setLoadSheetsOnly()` method, certain readers also
+allow you to combine several individual "sheets" from different files
+into a single `Spreadsheet` object, where each individual file is a
+single worksheet within that workbook. For each file that you read, you
+need to indicate which worksheet index it should be loaded into using
+the `setSheetIndex()` method of the `$reader`, then use the
+`loadIntoExisting()` method rather than the `load()` method to actually read
+the file into that worksheet.
+
+``` php
+$inputFileType = 'Csv';
+$inputFileNames = [
+ './sampleData/example1.csv',
+ './sampleData/example2.csv'
+ './sampleData/example3.csv'
+];
+
+/** Create a new Reader of the type defined in $inputFileType **/
+$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
+
+/** Extract the first named file from the array list **/
+$inputFileName = array_shift($inputFileNames);
+/** Load the initial file to the first worksheet in a `Spreadsheet` Object **/
+$spreadsheet = $reader->load($inputFileName);
+/** Set the worksheet title (to the filename that we've loaded) **/
+$spreadsheet->getActiveSheet()
+ ->setTitle(pathinfo($inputFileName,PATHINFO_BASENAME));
+
+/** Loop through all the remaining files in the list **/
+foreach($inputFileNames as $sheet => $inputFileName) {
+ /** Increment the worksheet index pointer for the Reader **/
+ $reader->setSheetIndex($sheet+1);
+ /** Load the current file into a new worksheet in Spreadsheet **/
+ $reader->loadIntoExisting($inputFileName,$spreadsheet);
+ /** Set the worksheet title (to the filename that we've loaded) **/
+ $spreadsheet->getActiveSheet()
+ ->setTitle(pathinfo($inputFileName,PATHINFO_BASENAME));
+}
+```
+
+See `samples/Reader/13_Simple_file_reader_for_multiple_CSV_files.php` for a
+working example of this code.
+
+Note that using the same sheet index for multiple sheets won't append
+files into the same sheet, but overwrite the results of the previous
+load. You cannot load multiple CSV files into the same worksheet.
+
+Combining Multiple Files into a Single Spreadsheet Object applies to:
+
+Reader | Y/N |Reader | Y/N |Reader | Y/N |
+----------|:---:|--------|:---:|--------------|:---:|
+Xlsx | NO | Xls | NO | Xml | NO |
+Ods | NO | SYLK | YES | Gnumeric | NO |
+CSV | YES | HTML | NO
+
+### Combining Read Filters with the `setSheetIndex()` method to split a large CSV file across multiple Worksheets
+
+An Xls BIFF .xls file is limited to 65536 rows in a worksheet, while the
+Xlsx Microsoft Office Open XML SpreadsheetML .xlsx file is limited to
+1,048,576 rows in a worksheet; but a CSV file is not limited other than
+by available disk space. This means that we wouldn’t ordinarily be able
+to read all the rows from a very large CSV file that exceeded those
+limits, and save it as an Xls or Xlsx file. However, by using Read
+Filters to read the CSV file in "chunks" (using the ChunkReadFilter
+Class that we defined in [the above section](#reading-only-specific-columns-and-rows-from-a-file-read-filters),
+and the `setSheetIndex()` method of the `$reader`, we can split the CSV
+file across several individual worksheets.
+
+``` php
+$inputFileType = 'Csv';
+$inputFileName = './sampleData/example2.csv';
+
+echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'+ +This block contains an italicized word; +while this block uses an underline. + +
+
+I want to eat healthy food pizza.
+
+';
+
+$html2 = '
+
+ 100°C is a hot temperature
+
+
+
+ 10°F is cold
+
+