diff --git a/inc/vendor/godsgood33/php-db/.gitattributes b/inc/vendor/godsgood33/php-db/.gitattributes deleted file mode 100644 index bdb0cab..0000000 --- a/inc/vendor/godsgood33/php-db/.gitattributes +++ /dev/null @@ -1,17 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Custom for Visual Studio -*.cs diff=csharp - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain diff --git a/inc/vendor/godsgood33/php-db/.gitignore b/inc/vendor/godsgood33/php-db/.gitignore deleted file mode 100644 index b0fbc01..0000000 --- a/inc/vendor/godsgood33/php-db/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.settings/ -.buildpath -code-coverage/ -/vendor/ diff --git a/inc/vendor/godsgood33/php-db/.scrutinizer.yml b/inc/vendor/godsgood33/php-db/.scrutinizer.yml deleted file mode 100644 index 5653d85..0000000 --- a/inc/vendor/godsgood33/php-db/.scrutinizer.yml +++ /dev/null @@ -1,26 +0,0 @@ -checks: - php: true - -filter: - paths: ["src/*"] - -tools: - external_code_coverage: - timeout: 600 - php_sim: true - php_pdepend: true - php_analyzer: true - php_cs_fixer: true - -build: - nodes: - analysis: - tests: - override: - - php-scrutinizer-run - -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 \ No newline at end of file diff --git a/inc/vendor/godsgood33/php-db/LICENSE b/inc/vendor/godsgood33/php-db/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/inc/vendor/godsgood33/php-db/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/inc/vendor/godsgood33/php-db/README.md b/inc/vendor/godsgood33/php-db/README.md deleted file mode 100644 index 80e7912..0000000 Binary files a/inc/vendor/godsgood33/php-db/README.md and /dev/null differ diff --git a/inc/vendor/godsgood33/php-db/composer.json b/inc/vendor/godsgood33/php-db/composer.json deleted file mode 100644 index 0af1d3a..0000000 --- a/inc/vendor/godsgood33/php-db/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "require" : { - "monolog/monolog" : "~1.23" - }, - "name" : "godsgood33/php-db", - "description" : "PHP Database Library", - "homepage" : "https://github.com/godsgood33/php-db", - "license" : "Apache-2.0", - "minimum-stability" : "beta", - "authors" : [{ - "name" : "Ryan Prather", - "email" : "godsgood33@gmail.com", - "role" : "Developer" - } - ], - "support" : { - "source" : "https://github.com/godsgood33/php-db" - }, - "autoload" : { - "psr-4" : { - "Godsgood33\\Php_Db\\" : "src" - } - }, - "type" : "library", - "keywords" : [ - "database", - "library", - "mysql", - "mysqli" - ], - "config" : { - "vendor-dir" : "vendor" - }, - "require-dev" : { - "phpunit/phpunit" : "~7.2" - } -} \ No newline at end of file diff --git a/inc/vendor/godsgood33/php-db/composer.lock b/inc/vendor/godsgood33/php-db/composer.lock deleted file mode 100644 index 8188001..0000000 --- a/inc/vendor/godsgood33/php-db/composer.lock +++ /dev/null @@ -1,1549 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "content-hash": "0c344a5863d864e2eda66940b82218ce", - "packages": [ - { - "name": "monolog/monolog", - "version": "1.23.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4", - "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "1.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "jakub-onderka/php-parallel-lint": "0.9", - "php-amqplib/php-amqplib": "~2.4", - "php-console/php-console": "^3.1.3", - "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "2.3.0", - "ruflin/elastica": ">=0.90 <3.0", - "sentry/sentry": "^0.13", - "swiftmailer/swiftmailer": "^5.3|^6.0" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "sentry/sentry": "Allow sending log messages to a Sentry server" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "time": "2017-06-19T01:22:40+00:00" - }, - { - "name": "psr/log", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2016-10-10T12:19:37+00:00" - } - ], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "^6.2.3", - "squizlabs/php_codesniffer": "^3.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2017-07-22T11:58:36+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.8.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "478465659fd987669df0bd8a9bf22a8710e5f1b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/478465659fd987669df0bd8a9bf22a8710e5f1b6", - "reference": "478465659fd987669df0bd8a9bf22a8710e5f1b6", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "replace": { - "myclabs/deep-copy": "self.version" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2018-05-29T17:25:09+00:00" - }, - { - "name": "phar-io/manifest", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "phar-io/version": "^1.0.1", - "php": "^5.6 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2017-03-05T18:14:27+00:00" - }, - { - "name": "phar-io/version", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "time": "2017-03-05T17:38:23+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2017-09-11T18:02:19+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "4.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08", - "shasum": "" - }, - "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "doctrine/instantiator": "~1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-30T07:14:17+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "time": "2017-07-14T14:27:02+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "1.7.6", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2018-04-18T13:57:24+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "6.0.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/865662550c384bc1db7e51d29aeda1c2c161d69a", - "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "suggest": { - "ext-xdebug": "^2.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2018-06-01T07:51:50+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "e20525b0c2945c7c317fff95660698cb3d2a53bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/e20525b0c2945c7c317fff95660698cb3d2a53bc", - "reference": "e20525b0c2945c7c317fff95660698cb3d2a53bc", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2018-05-28T12:13:49+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", - "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2018-02-01T13:07:23+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", - "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2018-02-01T13:16:43+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "7.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "00bc0b93f0ff4f557e9ea766557fde96da9a03dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/00bc0b93f0ff4f557e9ea766557fde96da9a03dd", - "reference": "00bc0b93f0ff4f557e9ea766557fde96da9a03dd", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", - "phpunit/php-file-iterator": "^2.0", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.0", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^3.1", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", - "sebastian/version": "^2.0.1" - }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" - }, - "require-dev": { - "ext-pdo": "*" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2018-06-05T03:40:05+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" - }, - { - "name": "sebastian/comparator", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ed5fd2281113729f1ebcc64d101ad66028aeb3d5", - "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5", - "shasum": "" - }, - "require": { - "php": "^7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2018-04-18T13:33:00+00:00" - }, - { - "name": "sebastian/diff", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e09160918c66281713f1c324c1f4c4c3037ba1e8", - "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0", - "symfony/process": "^2 || ^3.3 || ^4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "time": "2018-02-01T13:45:15+00:00" - }, - { - "name": "sebastian/environment", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2017-07-01T08:51:00+00:00" - }, - { - "name": "sebastian/exporter", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2017-04-03T13:19:02+00:00" - }, - { - "name": "sebastian/global-state", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2017-04-27T15:39:26+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" - }, - { - "name": "sebastian/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2017-04-07T12:08:54+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2018-01-29T19:49:41+00:00" - } - ], - "aliases": [], - "minimum-stability": "beta", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [] -} diff --git a/inc/vendor/godsgood33/php-db/examples/create_table_json.json b/inc/vendor/godsgood33/php-db/examples/create_table_json.json deleted file mode 100644 index 08cc67a..0000000 --- a/inc/vendor/godsgood33/php-db/examples/create_table_json.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "tables": [ - { - "schema": "db", - "name": "settings", - "primary_key": [ - "id" - ], - "unique": [ - "meta_key" - ], - "fields": [ - { - "name": "id", - "dataType": "int(11)", - "type": 3, - "length": 11, - "values": [], - "ai": true, - "nn": true, - "default": "" - }, - { - "name": "meta_key", - "dataType": "varchar(100)", - "type": 253, - "length": 100, - "values": [], - "ai": false, - "nn": true, - "default": "" - }, - { - "name": "meta_value", - "dataType": "mediumtext", - "type": 250, - "length": null, - "values": [], - "ai": false, - "nn": false, - "default": null - } - ] - }, - { - "schema": "db", - "name": "test", - "primary_key": [ - "id", - "fk" - ], - "fields": [ - { - "name": "id", - "dataType": "int(11)", - "type": 3, - "length": 11, - "values": [], - "ai": true, - "nn": true, - "default": "" - }, - { - "name": "fk", - "dataType": "int(11)", - "type": 3, - "length": 11, - "values": [], - "ai": false, - "nn": true, - "default": "" - }, - { - "name": "default", - "dataType": "tinyint(1)", - "type": 1, - "length": 1, - "values": [], - "ai": false, - "nn": false, - "default": "0" - }, - { - "name": "enum", - "dataType": "enum", - "type": 247, - "length": null, - "values": [ - "1", - "2" - ], - "ai": false, - "nn": false, - "default": "1" - } - ], - "constraints": [ - { - "id": "con_1", - "local": "fk", - "schema": "db", - "table": "test", - "field": "id", - "update": null, - "delete": null - } - ], - "index": [ - { - "id": "default_idx", - "type": "index", - "ref": "default" - } - ] - }, - { - "schema": "db", - "name": "test2", - "primary_key": [ - "id" - ], - "fields": [ - { - "name": "id", - "dataType": "int(11)", - "type": 3, - "length": 11, - "values": [], - "ai": true, - "nn": true, - "default": "" - } - ] - } - ] -} \ No newline at end of file diff --git a/inc/vendor/godsgood33/php-db/phpunit.xml b/inc/vendor/godsgood33/php-db/phpunit.xml deleted file mode 100644 index 4ff2356..0000000 --- a/inc/vendor/godsgood33/php-db/phpunit.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - tests/ - - - - - src/ - - - \ No newline at end of file diff --git a/inc/vendor/godsgood33/php-db/src/DBConfig.php b/inc/vendor/godsgood33/php-db/src/DBConfig.php deleted file mode 100644 index 002d7bc..0000000 --- a/inc/vendor/godsgood33/php-db/src/DBConfig.php +++ /dev/null @@ -1,50 +0,0 @@ -_c = $dbh; - } else { - if (PHP_DB_SERVER == '{IP|hostname}' || PHP_DB_USER == '{username}' || PHP_DB_PWD == '{password}' || PHP_DB_SCHEMA == '{schema}') { - throw new Error("Need to update DBConfig.php", E_ERROR); - } - $this->_c = new mysqli(PHP_DB_SERVER, PHP_DB_USER, PHP_DB_PWD, PHP_DB_SCHEMA); - } - - if ($this->_c->connect_errno) { - throw new Error("Could not create database class due to error {$this->_c->error}", E_ERROR); - } - - $this->_logPath = $strLogPath; - touch($this->_logPath . "/db.log"); - - $this->_logger = new Logger('db', [ - new StreamHandler(realpath($this->_logPath . "/db.log"), $this->_logLevel) - ]); - - if (PHP_SAPI == 'cli') { - $stream = new StreamHandler("php://output", $this->_logLevel); - $stream->setFormatter(new LineFormatter("%datetime% %level_name% %message%" . PHP_EOL, "H:i:s.u")); - $this->_logger->pushHandler($stream); - } - - $this->_logger->info("Database connected"); - $this->_logger->debug("Connection details:", [ - 'Server' => PHP_DB_SERVER, - 'User' => PHP_DB_USER, - 'Schema' => PHP_DB_SCHEMA - ]); - - $this->setVar("time_zone", "+00:00"); - $this->setVar("sql_mode", ""); - } - - /** - * Function to make sure that the database is connected - * - * @return boolean - */ - public function isConnected() - { - $this->_logger->debug("Pinging server"); - return $this->_c->ping(); - } - - /** - * Setter function for _logger - * - * @param Logger $log - */ - public function setLogger(Logger $log) - { - $this->_logger->debug("Setting logger"); - $this->_logger = $log; - } - - /** - * Getter function for _logger - * - * @return string - */ - public function getLogLevel() - { - $this->_logger->debug("Getting log level ({$this->_logLevel})"); - return $this->_logLevel; - } - - /** - * Function to set the log level just in case there needs to be a change to the default log level - * - * @param string $strLevel - */ - public function setLogLevel($strLevel) - { - $this->_logger->debug("Setting log level to {$strLevel}"); - $this->_logLevel = $strLevel; - - $handles = []; - - foreach ($this->_logger->getHandlers() as $h) { - $h->/** @scrutinizer ignore-call */ - setLevel($strLevel); - $handles[] = $h; - } - - $this->_logger->setHandlers($handles); - } - - /** - * Getter function for _queryType - * - * @return int - */ - public function getQueryType() - { - return $this->_queryType; - } - - /** - * Setter function for _queryType - * - * @param int $qt - */ - public function setQueryType($qt) - { - $this->_queryType = $qt; - } - - /** - * Getter function for _sql - * - * @return string - */ - public function getSql() - { - return $this->_sql; - } - - /** - * Function to return the currently selected database schema - * - * @return string - */ - public function getSchema() - { - if ($res = $this->_c->query("SELECT DATABASE()")) { - $row = $res->fetch_row(); - - $this->_logger->debug("Getting schema {$row[0]}"); - return $row[0]; - } - return null; - } - - /** - * Function to set schema - * - * @param string $strSchema - */ - public function setSchema($strSchema) - { - $this->_logger->debug("Setting schema to {$strSchema}"); - if (! $this->_c->select_db($strSchema)) { - $this->_logger->emergency("Unknown schema {$strSchema}"); - return false; - } - return true; - } - - /** - * Method to set a MYSQL variable - * - * @param string $strName - * @param string $strVal - * - * @return boolean - */ - public function setVar($strName, $strVal) - { - if (! $strName || ! $strVal) { - $this->_logger->debug("name or value are blank", [ - 'name' => $strName, - 'value' => $strVal - ]); - return false; - } - - $this->_logger->debug("Setting {$strName} = '{$strVal}'"); - - if ($this->_c->real_query("SET $strName = {$this->_escape($strVal)}")) { - return true; - } else { - $this->_logger->error("Failed to set variable {$this->_c->error}"); - return false; - } - } - - /** - * Function to execute the statement - * - * @param mixed $return - * [optional] - * MYSQLI constant to control what is returned from the mysqli_result object - * @param string $class - * [optional] - * Class to use when returning object - * @param string $strSql - * [optional] - * Optional SQL query - * - * @throws \Exception - * @throws \InvalidArgumentException - * - * @return mixed - */ - public function execute($return = MYSQLI_ASSOC, $class = null, $strSql = null) - { - if (! is_null($strSql)) { - $this->_sql = $strSql; - } - - $query = 'SELECT'; - switch ($this->_queryType) { - case self::SELECT_COUNT: - $query = 'SELECT COUNT'; - break; - case self::INSERT: - case self::EXTENDED_INSERT: - $query = 'INSERT'; - break; - case self::UPDATE: - case self::EXTENDED_UPDATE: - $query = 'UPDATE'; - break; - case self::REPLACE: - case self::EXTENDED_REPLACE: - $query = 'REPLACE'; - break; - case self::DROP: - $query = 'DROP'; - break; - case self::DELETE: - $query = 'DELETE'; - break; - case self::CREATE_TABLE: - $query = 'CREATE TABLE'; - break; - case self::TRUNCATE: - $query = 'TRUNCATE'; - break; - } - - if (is_a($this->_c, 'mysqli')) { - if (! $this->_c->ping()) { - require_once 'DBConfig.php'; - $this->_c = null; - $this->_c = new mysqli(PHP_DB_SERVER, PHP_DB_USER, PHP_DB_PWD, PHP_DB_SCHEMA); - } - } else { - throw new \Error('Database was not connected', E_ERROR); - } - - $this->_logger->info("Executing {$query} query"); - $this->_logger->debug($this->_sql); - - try { - if (in_array($this->_queryType, [ - self::SELECT, - self::SELECT_COUNT - ])) { - $this->_result = $this->_c->query($this->_sql); - if ($this->_c->error) { - $this->_logger->error("There is an error {$this->_c->error}"); - $this->_logger->debug("Errored on query", [$this->_sql]); - throw new Exception("There was an error {$this->_c->error}", E_ERROR); - } - } else { - $this->_result = $this->_c->real_query($this->_sql); - if ($this->_c->errno) { - $this->_logger->error("There was an error {$this->_c->error}"); - $this->_logger->debug("Errored on query", [$this->_sql]); - throw new Exception("There was an error {$this->_c->error}", E_ERROR); - } - } - - if ($return == MYSQLI_OBJECT && ! is_null($class) && class_exists(/** @scrutinizer ignore-type */$class)) { - $this->_logger->debug("Checking results for query", [ - 'class' => get_class($class) - ]); - $this->_result = $this->checkResults($return, $class); - } elseif ($return == MYSQLI_OBJECT && is_null($class)) { - $this->_logger->debug("Checking results for query", [ - 'class' => 'stdClass' - ]); - $this->_result = $this->checkResults($return, 'stdClass'); - } else { - $this->_logger->debug("Checking results for query and returning associative array"); - $this->_result = $this->checkResults(MYSQLI_ASSOC); - } - } catch (Exception $e) {} - - return $this->_result; - } - - /** - * Function to check the results and return what is expected - * - * @param mixed $returnType - * [optional] - * Optional return mysqli_result return type - * @param mixed $class - * - * @return mixed - */ - public function checkResults($returnType = MYSQLI_ASSOC, $class = null) - { - $res = null; - - switch ($this->_queryType) { - case self::SELECT_COUNT: - if (! is_a($this->_result, 'mysqli_result')) { - $this->_logger->error("Error with return on query"); - return; - } - - if ($this->_result->num_rows == 1) { - $row = $this->_result->fetch_assoc(); - if (isset($row['count'])) { - $this->_logger->debug("Returning SELECT_COUNT query", [ - 'count' => $row['count'] - ]); - $res = $row['count']; - } - } elseif ($this->_result->num_rows > 1) { - $this->_logger->debug("Returning SELECT_COUNT query", [ - 'count' => $this->_result->num_rows - ]); - $res = $this->_result->num_rows; - } - - mysqli_free_result($this->_result); - - return $res; - case self::SELECT: - if (! is_a($this->_result, 'mysqli_result')) { - $this->_logger->error("Error with return on query"); - return; - } - - if ($returnType == MYSQLI_OBJECT && ! is_null($class) && class_exists($class)) { - if ($this->_result->num_rows == 1) { - $this->_logger->debug("Returning object from SELECT query", [ - 'type' => get_class($class) - ]); - $res = $this->_result->fetch_object($class); - } elseif ($this->_result->num_rows > 1) { - $this->_logger->debug("Returning object array from SELECT query", [ - 'type' => get_class($class) - ]); - while ($row = $this->_result->fetch_object($class)) { - $res[] = $row; - } - } - } else { - if ($this->_result->num_rows == 1) { - $this->_logger->debug("Fetching results"); - $res = $this->_result->fetch_array($returnType); - } elseif ($this->_result->num_rows > 1) { - $this->_logger->debug("Fetching results array"); - $res = $this->fetchAll($returnType); - } - } - - mysqli_free_result($this->_result); - - return $res; - case self::INSERT: - if ($this->_c->error) { - $this->_logger->error("Database Error {$this->_c->error}"); - return 0; - } - - if ($this->_c->insert_id) { - $this->_logger->debug("Insert successful returning insert_id", [ - 'id' => $this->_c->insert_id - ]); - return $this->_c->insert_id; - } elseif ($this->_c->affected_rows) { - $this->_logger->debug("Insert successful return affected row count", [ - 'count' => $this->_c->affected_rows - ]); - return $this->_c->affected_rows; - } - - $this->_logger->debug("Insert successful, but no ID so returning 1 for success"); - - return 1; - // intentional fall through - case self::EXTENDED_INSERT: - // intentional fall through - case self::EXTENDED_REPLACE: - // intentional fall through - case self::EXTENDED_UPDATE: - // intentional fall through - case self::REPLACE: - // intentional fall through - case self::UPDATE: - // intentional fall through - case self::DELETE: - // intentional fall through - case self::ALTER_TABLE: - if ($this->_c->error) { - $this->_logger->error("Database Error {$this->_c->error}"); - return false; - } elseif ($this->_c->affected_rows) { - $this->_logger->debug("Returning affected row count for {$this->_queryType}", [ - 'count' => $this->_c->affected_rows - ]); - return $this->_c->affected_rows; - } else { - return true; - } - break; - case self::CREATE_TABLE: - // intentional fall through - case self::DROP: - // intentional fall through - case self::TRUNCATE: - $this->_logger->debug("Returning from {$this->_queryType}"); - return true; - } - } - - /** - * Function to pass through calling the query function (used for backwards compatibility and for more complex queries that aren't currently supported) - * Nothing is escaped - * - * @param string $strSql - * [optional] - * Optional query to pass in and execute - * - * @return \mysqli_result|boolean - */ - public function query($strSql = null) - { - if (is_null($strSql)) { - return $this->_c->query($this->_sql); - } else { - return $this->_c->query($strSql); - } - } - - /** - * A function to build a select query - * - * @param string $strTableName - * The table to query - * @param array|string $fields - * [optional] - * Optional array of fields to return (defaults to '*') - * @param array $arrWhere - * [optional] - * Optional 2-dimensional array to build where clause from - * @param array $arrFlags - * [optional] - * Optional 2-dimensional array to allow other flags - * - * @see Database::where() - * @see Database::flags() - * - * @throws \InvalidArgumentException - * - * @return mixed - */ - public function select($strTableName, $fields = null, $arrWhere = [], $arrFlags = []) - { - $this->_sql = null; - $this->_queryType = self::SELECT; - - if (! is_null($strTableName)) { - $this->_logger->debug("Starting SELECT query of {$strTableName}", [ - 'fields' => $this->fields($fields) - ]); - $this->_sql = "SELECT " . $this->fields($fields) . " FROM $strTableName"; - } else { - $this->_logger->emergency("Table name is invalid or wrong type"); - throw new Error("Table name is invalid"); - } - - if (isset($arrFlags['joins']) && is_array($arrFlags['joins']) && count($arrFlags['joins'])) { - $this->_logger->debug("Adding joins", [ - 'joins' => implode(' ', $arrFlags['joins']) - ]); - $this->_sql .= " " . implode(" ", $arrFlags['joins']); - } else { - $this->_logger->debug("No joins"); - } - - if (! is_null($arrWhere) && is_array($arrWhere) && count($arrWhere)) { - $where_str = " WHERE"; - $this->_logger->debug("Parsing where clause and adding to query"); - foreach ($arrWhere as $x => $w) { - $where_str .= $this->parseClause($w, $x); - } - if (strlen($where_str) > strlen(" WHERE")) { - $this->_sql .= $where_str; - } - } - - if (is_array($arrFlags) && count($arrFlags)) { - $this->_logger->debug("Parsing flags and adding to query", $arrFlags); - $this->_sql .= $this->flags($arrFlags); - } - - if (self::$autorun) { - return $this->execute(MYSQLI_BOTH); - } - - return $this->_sql; - } - - /** - * Function to build a query to check the number of rows in a table - * - * @param string $strTableName - * The table to query - * @param array $arrWhere - * [optional] - * Optional 2-dimensional array to build where clause - * @param array $arrFlags - * [optional] - * Optional 2-dimensional array to add flags - * - * @see Database::where() - * @see Database::flags() - * - * @return string|NULL - */ - public function selectCount($strTableName, $arrWhere = [], $arrFlags = []) - { - $this->_sql = null; - $this->_queryType = self::SELECT_COUNT; - - if (! is_null($strTableName)) { - $this->_sql = "SELECT COUNT(1) AS 'count' FROM $strTableName"; - } else { - $this->_logger->emergency("Table name is invalid or wrong type"); - throw new Error("Table name is invalid"); - } - - if (isset($arrFlags['joins']) && is_array($arrFlags['joins'])) { - $this->_sql .= " " . implode(" ", $arrFlags['joins']); - } - - if (! is_null($arrWhere) && is_array($arrWhere) && count($arrWhere)) { - $where_str = " WHERE"; - foreach ($arrWhere as $x => $w) { - $where_str .= $this->parseClause($w, $x); - } - if (strlen($where_str) > strlen(" WHERE")) { - $this->_sql .= $where_str; - } - } - - if (is_array($arrFlags) && count($arrFlags)) { - $this->_sql .= $this->flags($arrFlags); - } - - if (self::$autorun) { - return $this->execute(MYSQLI_BOTH); - } - - return $this->_sql; - } - - /** - * Function to build an insert query statement - * - * @param string $strTableName - * @param array|string $arrParams - * @param boolean $blnToIgnore - * - * @return string|NULL - */ - public function insert($strTableName, $arrParams = null, $blnToIgnore = false) - { - $this->_sql = null; - $this->_queryType = self::INSERT; - - if (! is_null($strTableName)) { - $this->_sql = "INSERT" . ($blnToIgnore ? " IGNORE" : "") . " INTO $strTableName" . (is_array($arrParams) && count($arrParams) ? " (`" . implode("`,`", array_keys($arrParams)) . "`)" : null); - } else { - throw new Error("Table name is invalid"); - } - - if (is_array($arrParams) && count($arrParams)) { - $this->_sql .= " VALUES (" . implode(",", array_map([ - $this, - '_escape' - ], array_values($arrParams))) . ")"; - } elseif (is_string($arrParams) && stripos($arrParams, 'SELECT') !== false) { - $this->_sql .= " {$arrParams}"; - } else { - throw new Error("Invalid type passed to insert " . gettype($arrParams)); - } - - if (self::$autorun) { - return $this->execute(MYSQLI_BOTH); - } - - return $this->_sql; - } - - /** - * Function to create an extended insert query statement - * - * @param string $strTableName - * The table name that the data is going to be inserted on - * @param array $arrFields - * An array of field names that each value represents - * @param array|string $params - * An array of array of values or a string with a SELECT statement to populate the insert with - * @param boolean $blnToIgnore - * [optional] - * Boolean to decide if we need to use the INSERT IGNORE INTO syntax - * - * @return NULL|string Returns the SQL if self::$autorun is set to false, else it returns the output from running. - */ - public function extendedInsert($strTableName, $arrFields, $params, $blnToIgnore = false) - { - $this->_sql = null; - $this->_queryType = self::EXTENDED_INSERT; - - if (! is_null($strTableName) && is_string($strTableName)) { - $this->_sql = "INSERT " . ($blnToIgnore ? "IGNORE " : "") . "INTO $strTableName " . "(`" . implode("`,`", $arrFields) . "`)"; - } else { - throw new Error("Table name is invalid"); - } - - if (is_array($params) && count($params)) { - $this->_sql .= " VALUES "; - if (isset($params[0]) && is_array($params[0])) { - foreach ($params as $p) { - if (count($p) != count($arrFields)) { - $this->_logger->emergency("Inconsistent number of fields to values in extended_insert", [ - $p - ]); - throw new Error("Inconsistent number of fields in fields and values in extended_insert " . print_r($p, true)); - } - $this->sql .= "(" . implode(",", array_map([$this, '_escape'], array_values($p))) . ")"; - - if ($p != end($params)) { - $this->_sql .= ","; - } - } - } else { - $this->sql .= "(" . implode("),(", array_map([$this, '_escape'], array_values($params))) . ")"; - } - } - - if (self::$autorun) { - return $this->execute(MYSQLI_BOTH); - } - - return $this->_sql; - } - - /** - * Build a statement to update a table - * - * @param string $strTableName - * The table name to update - * @param array $arrParams - * Name/value pairs of the field name and value - * @param array $arrWhere - * [optional] - * Two-dimensional array to create where clause - * @param array $arrFlags - * [optional] - * Two-dimensional array to create other flag options (joins, order, and group) - * - * @see Database::where() - * @see Database::flags() - * - * @return NULL|string - */ - public function update($strTableName, $arrParams, $arrWhere = [], $arrFlags = []) - { - $this->_sql = "UPDATE "; - $this->_queryType = self::UPDATE; - - if (! is_null($strTableName) && is_string($strTableName)) { - $this->_sql .= $strTableName; - - if (isset($arrFlags['joins']) && is_array($arrFlags['joins'])) { - $this->_sql .= " " . implode(" ", $arrFlags['joins']); - unset($arrFlags['joins']); - } - - $this->_sql .= " SET "; - } else { - throw new Error("Table name is invalid"); - } - - if (is_array($arrParams) && count($arrParams)) { - foreach ($arrParams as $f => $p) { - if ((strpos($f, "`") === false) && (strpos($f, ".") === false) && (strpos($f, "*") === false) && (stripos($f, " as ") === false)) { - $f = "`{$f}`"; - } - - if (! is_null($p)) { - $this->_sql .= "$f={$this->_escape($p)},"; - } else { - $this->_sql .= "$f=NULL,"; - } - } - } else { - throw new Error("No fields to update"); - } - - $this->_sql = substr($this->_sql, 0, - 1); - - if (! is_null($arrWhere) && is_array($arrWhere) && count($arrWhere)) { - $where_str = " WHERE"; - foreach ($arrWhere as $x => $w) { - $where_str .= $this->parseClause($w, $x); - } - if (strlen($where_str) > strlen(" WHERE")) { - $this->_sql .= $where_str; - } - } - - if (! is_null($arrFlags) && is_array($arrFlags) && count($arrFlags)) { - $this->_sql .= $this->flags($arrFlags); - } - - if (self::$autorun) { - return $this->execute(MYSQLI_BOTH); - } - - return $this->_sql; - } - - /** - * Function to offer an extended updated functionality by using two different tables. - * - * @param string $strTableToUpdate - * The table that you want to update (alias 'tbu' is automatically added) - * @param string $strOriginalTable - * The table with the data you want to overwrite to_be_updated table (alias 'o' is automatically added) - * @param string $strLinkField - * The common index value between them that will join the fields - * @param array|string $arrParams - * If string only a single field is updated (tbu.$params = o.$params) - * If array each element in the array is a field to be updated (tbu.$param = o.$param) - * - * @return mixed - */ - public function extendedUpdate($strTableToUpdate, $strOriginalTable, $strLinkField, $arrParams) - { - $this->_sql = "UPDATE "; - $this->_queryType = self::EXTENDED_UPDATE; - - if (! is_null($strTableToUpdate) && ! is_null($strOriginalTable) && ! is_null($strLinkField)) { - $this->_sql .= "$strTableToUpdate tbu INNER JOIN $strOriginalTable o USING ($strLinkField) SET "; - } else { - throw new Error("Missing necessary fields"); - } - - if (is_array($arrParams) && count($arrParams)) { - foreach ($arrParams as $param) { - if ($param != $strLinkField) { - $this->_sql .= "tbu.`$param` = o.`$param`,"; - } - } - $this->_sql = substr($this->_sql, 0, - 1); - } elseif (is_string($arrParams)) { - $this->_sql .= "tbu.`$arrParams` = o.`$arrParams`"; - } else { - throw new Exception("Do not understand datatype " . gettype($arrParams), E_ERROR); - } - - if (self::$autorun) { - return $this->execute(MYSQLI_BOTH); - } - - return $this->_sql; - } - - /** - * Function to build a replace query - * - * @param string $strTableName - * The table to update - * @param array $arrParams - * Name/value pair to insert - * - * @return NULL|string - */ - public function replace($strTableName, $arrParams) - { - $this->_sql = null; - $this->_queryType = self::REPLACE; - - if (! is_null($strTableName) && is_string($strTableName)) { - $this->_sql = "REPLACE INTO $strTableName " . "(`" . implode("`,`", array_keys($arrParams)) . "`)"; - } else { - throw new Error("Table name is invalid"); - } - - $this->_sql .= " VALUES (" . implode(",", array_map([ - $this, - '_escape' - ], array_values($arrParams))) . ")"; - - if (self::$autorun) { - return $this->execute(MYSQLI_BOTH); - } - - return $this->_sql; - } - - /** - * Function to build an extended replace statement - * - * @param string $strTableName - * Table name to update - * @param array $arrFields - * Array of fields - * @param array $arrParams - * Two-dimensional array of values - * - * @return NULL|string - */ - public function extendedReplace($strTableName, $arrFields, $arrParams) - { - $this->_sql = null; - $this->_queryType = self::EXTENDED_REPLACE; - - if (! is_array($arrFields) || ! count($arrFields)) { - throw new Exception("Error with the field type"); - } - - if (! is_null($strTableName) && is_string($strTableName)) { - $this->_sql = "REPLACE INTO $strTableName " . "(`" . implode("`,`", $arrFields) . "`)"; - } else { - throw new Error("Table name is invalid"); - } - - if (is_array($arrParams) && count($arrParams)) { - $this->_sql .= " VALUES "; - foreach ($arrParams as $p) { - $this->_sql .= "(" . implode(",", array_map([ - $this, - '_escape' - ], array_values($p))) . ")"; - - if ($p != end($arrParams)) { - $this->_sql .= ","; - } - } - } - - if (self::$autorun) { - return $this->execute(MYSQLI_BOTH); - } - - return $this->_sql; - } - - /** - * Function to build a delete statement - * - * @param string $strTableName - * Table name to act on - * @param array $arrFields - * [optional] - * Optional list of fields to delete (used when including multiple tables) - * @param array $arrWhere - * [optional] - * Optional 2-dimensional array to build where clause from - * @param array $arrJoins - * [optional] - * Optional 2-dimensional array to add other flags - * - * @see Database::where() - * @see Database::flags() - * - * @return string|NULL - */ - public function delete($strTableName, $arrFields = [], $arrWhere = [], $arrJoins = []) - { - $this->_sql = "DELETE"; - $this->_queryType = self::DELETE; - - $this->_logger->debug("Deleting table data"); - - if (! is_null($arrFields) && is_array($arrFields) && count($arrFields)) { - $this->_sql .= " " . implode(",", $arrFields); - } - - if (! is_null($strTableName) && is_string($strTableName)) { - $this->_sql .= " FROM $strTableName"; - } else { - throw new Error("Table name is invalid"); - } - - if (! is_null($arrJoins) && is_array($arrJoins) && count($arrJoins)) { - $this->_sql .= " " . implode(" ", $arrJoins); - } - - if (! is_null($arrWhere) && is_array($arrWhere) && count($arrWhere)) { - $where_str = " WHERE"; - foreach ($arrWhere as $x => $w) { - $where_str .= $this->parseClause($w, $x); - } - if (strlen($where_str) > strlen(" WHERE")) { - $this->_sql .= $where_str; - } - } - - if (self::$autorun) { - return $this->execute(MYSQLI_BOTH); - } - - return $this->_sql; - } - - /** - * Function to build a drop table statement (automatically executes) - * - * @param string $strTableName - * Table to drop - * @param string $strType - * [optional] - * Type of item to drop ('table', 'view') (defaulted to 'table') - * @param boolean $blnIsTemp - * [optional] - * Optional boolean if this is a temporary table - * - * @return string|NULL - */ - public function drop($strTableName, $strType = 'table', $blnIsTemp = false) - { - $this->_sql = null; - $this->_queryType = self::DROP; - - switch ($strType) { - case 'table': - $strType = 'TABLE'; - break; - case 'view': - $strType = 'VIEW'; - break; - default: - throw new Error("Invalid type " . gettype($strType), E_ERROR); - } - - if (! is_null($strTableName) && is_string($strTableName)) { - $this->_sql = "DROP" . ($blnIsTemp ? " TEMPORARY" : "") . " $strType IF EXISTS `{$strTableName}`"; - } else { - throw new Error("Table name is invalid"); - } - - if (self::$autorun) { - return $this->execute(MYSQLI_BOTH); - } - - return $this->_sql; - } - - /** - * Function to build a truncate table statement (automatically executes) - * - * @param string $strTableName - * Table to truncate - * - * @throws \Error - * - * @return string|NULL - */ - public function truncate($strTableName) - { - $this->_sql = null; - $this->_queryType = self::TRUNCATE; - - if (! is_null($strTableName) && is_string($strTableName)) { - $this->_sql = "TRUNCATE TABLE $strTableName"; - } else { - throw new Error("Table name is invalid"); - } - - if (self::$autorun) { - return $this->execute(MYSQLI_BOTH); - } - - return $this->_sql; - } - - /** - * Function to build a create temporary table statement - * - * @param string $strTableName - * Name to give the table when creating - * @param boolean $blnIsTemp - * [optional] - * Optional boolean to make the table a temporary table - * @param mixed $strSelect - * [optional] - * Optional parameter if null uses last built statement - * If string, will be made the SQL statement executed to create the table - * If array, 2-dimensional array with "field", "datatype" values to build table fields - * - * @return NULL|string - */ - public function createTable($strTableName, $blnIsTemp = false, $strSelect = null) - { - $this->_queryType = self::CREATE_TABLE; - - if (is_null($strSelect) && ! is_null($this->_sql) && substr($this->_sql, 0, 6) == 'SELECT') { - $this->_sql = "CREATE" . ($blnIsTemp ? " TEMPORARY" : "") . " TABLE IF NOT EXISTS $strTableName AS ($this->_sql)"; - } elseif (! is_null($strTableName) && is_string($strTableName) && is_string($strSelect)) { - $this->_sql = "CREATE" . ($blnIsTemp ? " TEMPORARY" : "") . " TABLE IF NOT EXISTS $strTableName AS ($strSelect)"; - } elseif (! is_null($strTableName) && is_string($strTableName) && is_array($strSelect)) { - $this->_sql = "CREATE" . ($blnIsTemp ? " TEMPORARY" : "") . " TABLE IF NOT EXISTS $strTableName ("; - - foreach ($strSelect as $field) { - $default = null; - if (isset($field['default'])) { - $default = (is_null($field['default']) ? "" : " DEFAULT '{$field['default']}'"); - } - $this->_sql .= "`{$field['field']}` {$field['datatype']}" . $default . (isset($field['option']) ? " {$field['option']}" : '') . ","; - } - $this->_sql = substr($this->_sql, 0, - 1) . ")"; - } - - if (self::$autorun) { - return $this->execute(); - } - - return $this->_sql; - } - - /** - * Function to create a table using a stdClass object derived from JSON - * - * @param \stdClass $json - * - * @example /examples/create_table_json.json - * - */ - public function createTableJson($json) - { - $this->_queryType = self::CREATE_TABLE; - $this->_c->select_db($json->schema); - - $this->_sql = "CREATE TABLE IF NOT EXISTS `{$json->name}` ("; - foreach ($json->fields as $field) { - $this->_sql .= "`{$field->name}` {$field->dataType}"; - - if ($field->dataType == 'enum') { - $this->_sql .= "('" . implode("','", $field->values) . "')"; - } - - if ($field->ai) { - $this->_sql .= " AUTO_INCREMENT"; - } - - if ($field->nn) { - $this->_sql .= " NOT NULL"; - } else { - if ($field->default === null) { - $this->_sql .= " DEFAULT NULL"; - } elseif (strlen($field->default)) { - $this->_sql .= " DEFAULT '{$field->default}'"; - } - } - - if ($field != end($json->fields)) { - $this->_sql .= ","; - } - } - - if (isset($json->index) && count($json->index)) { - foreach ($json->index as $ind) { - $this->_sql .= ", " . strtoupper($ind->type) . " `{$ind->id}` (`{$ind->ref}`)"; - } - } - - if (isset($json->constraints) && count($json->constraints)) { - foreach ($json->constraints as $con) { - $this->_sql .= ", CONSTRAINT `{$con->id}` " . "FOREIGN KEY (`{$con->local}`) " . "REFERENCES `{$con->schema}`.`{$con->table}` (`{$con->field}`) " . "ON DELETE " . (is_null($con->delete) ? "NO ACTION" : strtoupper($con->delete)) . " " . "ON UPDATE " . (is_null($con->update) ? "NO ACTION" : strtoupper($con->update)); - } - } - - if (isset($json->unique) && count($json->unique)) { - $this->_sql .= ", UNIQUE(`" . implode("`,`", $json->unique) . "`)"; - } - - if (isset($json->primary_key) && count($json->primary_key)) { - $this->_sql .= ", PRIMARY KEY(`" . implode("`,`", $json->primary_key) . "`))"; - } else { - if (substr($this->_sql, - 1) == ',') { - $this->_sql = substr($this->_sql, 0, - 1); - } - - $this->_sql .= ")"; - } - - $this->execute(MYSQLI_BOTH); - } - - /** - * Function to alter a existing table - * - * @param string $strTableName - * Table to alter - * @param int $intAction - * What action should be taken ('add-column', 'drop-column', 'modify-column') - * @param mixed $arrParams - * For add column this is a stdClass object that has the same elements as the example json - * - * @return mixed - */ - public function alterTable($strTableName, $intAction, $arrParams) - { - $this->_queryType = self::ALTER_TABLE; - $this->_sql = "ALTER TABLE $strTableName"; - if ($intAction == self::ADD_COLUMN) { - $nn = ($arrParams->nn ? " NOT NULL" : ""); - $default = null; - if ($arrParams->default === null) { - $default = " DEFAULT NULL"; - } elseif (strlen($arrParams->default)) { - $default = " DEFAULT {$this->_escape($arrParams->default)}"; - } - $this->_sql .= " ADD COLUMN `{$arrParams->name}` {$arrParams->dataType}" . $nn . $default; - } elseif ($intAction == self::DROP_COLUMN) { - $this->_sql .= " DROP COLUMN "; - foreach ($arrParams as $col) { - $this->_sql .= "`{$col->name}`"; - - if ($col != end($arrParams)) { - $this->_sql .= ","; - } - } - } elseif ($intAction == self::MODIFY_COLUMN) { - $this->_sql .= " MODIFY COLUMN"; - $nn = ($arrParams->nn ? " NOT NULL" : ""); - $default = null; - if ($arrParams->default === null) { - $default = " DEFAULT NULL"; - } elseif (strlen($arrParams->default)) { - $default = " DEFAULT {$this->_escape($arrParams->default)}"; - } - $this->_sql .= " `{$arrParams->name}` `{$arrParams->new_name}` {$arrParams->dataType}" . $nn . $default; - } - - if (self::$autorun) { - return $this->execute(); - } - - return $this->_sql; - } - - /** - * Check to see if a field in a table exists - * - * @param string $strTableName - * Table to check - * @param string $strFieldName - * Field name to find - * - * @return boolean Returns TRUE if field is found in that schema and table, otherwise FALSE - */ - public function fieldExists($strTableName, $strFieldName) - { - $fdata = $this->fieldData($strTableName); - - if (is_array($fdata) && count($fdata)) { - foreach ($fdata as $field) { - if ($field->name == $strFieldName) { - return true; - } - } - } - - return false; - } - - /** - * Function to get the column data (datatype, flags, defaults, etc) - * - * @param string $strTableName - * Table to query - * @param mixed $field - * [optional] - * Optional field to retrieve data (if null, returns data from all fields) - * - * @return array - */ - public function fieldData($strTableName, $field = null) - { - if (is_null($field)) { - $res = $this->_c->query("SELECT * FROM $strTableName LIMIT 1"); - } elseif (is_array($field)) { - $res = $this->_c->query("SELECT `" . implode("`,`", $field) . "` FROM $strTableName LIMIT 1"); - } elseif (is_string($field)) { - $res = $this->_c->query("SELECT $field FROM $strTableName LIMIT 1"); - } else { - return null; - } - - $fields = null; - if (is_a($res, 'mysqli_result')) { - $fields = $res->fetch_fields(); - foreach ($fields as $i => $f) { - $fields["{$f->name}"] = $f; - unset($fields[$i]); - } - } - - return $fields; - } - - /** - * Function to check that all field parameters are set correctly - * - * @param object $field_data - * @param object $check - * @param array $pks - * @param object $index - * - * @return array|string - */ - public function fieldCheck($field_data, $check, $pks, $index) - { - $default = null; - $ret = null; - - $nn = ($check->nn ? " NOT NULL" : null); - if ($check->default === null) { - $default = " DEFAULT NULL"; - } elseif (strlen($check->default)) { - $default = " DEFAULT '{$check->default}'"; - } - - if ($field_data->type != $check->type && $check->type != MYSQLI_TYPE_ENUM) { - $this->_logger->notice("Wrong datatype", [ - 'name' => $field_data->name, - 'datatype' => $check->dataType - ]); - $ret = " CHANGE COLUMN `{$field_data->name}` `{$check->name}` {$check->dataType}" . "{$nn}{$default}"; - } elseif (! is_null($check->length) && $field_data->length != $check->length) { - $this->_logger->notice("Incorrect size", [ - 'name' => $field_data->name, - 'current' => $field_data->length, - 'new_size' => $check->length - ]); - $ret = " CHANGE COLUMN `{$field_data->name}` `{$check->name}` {$check->dataType}" . "{$nn}{$default}"; - } elseif ($check->type == MYSQLI_TYPE_ENUM && ! ($field_data->flags & MYSQLI_ENUM_FLAG)) { - $this->_logger->notice("Setting ENUM type", [ - 'name' => $field_data->name, - 'values' => implode(",", $check->values) - ]); - $ret = " CHANGE COLUMN `{$field_data->name}` `{$check->name}` {$check->dataType}('" . implode("','", $check->values) . "')" . "{$nn}{$default}"; - } - - if (! is_null($index) && count($index)) { - foreach ($index as $ind) { - if ($check->name == $ind->ref && ! ($field_data->flags & MYSQLI_MULTIPLE_KEY_FLAG)) { - $this->_logger->debug("Missing index", [ - 'name' => $field_data->name - ]); - $ret .= ($ret ? "," : "") . " ADD INDEX `{$ind->id}` (`{$ind->ref}` ASC)"; - } - } - } - - if (in_array($check->name, $pks) && ! ($field_data->flags & MYSQLI_PRI_KEY_FLAG)) { - $this->_logger->debug("Setting PKs", [ - 'keys' => implode(',', $pks) - ]); - $ret .= ($ret ? "," : "") . " DROP PRIMARY KEY, ADD PRIMARY KEY(`" . implode("`,`", $pks) . "`)"; - } - - return $ret; - } - - /** - * Function to check for the existence of a table within a schema - * - * @param string $strSchema - * The schema to search in - * @param string $strTableName - * Table to search for - * - * @return integer|boolean Returns number of tables that match if table is found in that schema, otherwise FALSE - */ - public function tableExists($strSchema, $strTableName) - { - if (! $this->_c->select_db($strSchema)) { - fwrite("php://stdout", $this->_c->error . PHP_EOL); - } - $sql = "SHOW TABLES LIKE '{$strTableName}'"; - - if ($res = $this->_c->query($sql)) { - if (gettype($res) == 'object' && is_a($res, 'mysqli_result') && $res->num_rows) { - return $res->num_rows; - } - } else { - if ($this->_c->errno) { - fwrite("php://stdout", $this->_c->error . PHP_EOL); - } - } - - return false; - } - - /** - * Function to detect if string is a JSON object or not - * - * @param string $strVal - * - * @return boolean - */ - public function isJson($strVal) - { - json_decode($strVal); - return (json_last_error() == JSON_ERROR_NONE); - } - - /** - * Function to escape SQL characters to prevent SQL injection - * - * @param mixed $val - * Value to escape - * @param boolean $blnEscape - * Decide if we should escape or not - * - * @return string Escaped value - */ - public function _escape($val, $blnEscape = true) - { - if (is_null($val) || (is_string($val) && strtolower($val) == 'null')) { - return 'NULL'; - } elseif (is_numeric($val) || is_string($val)) { - if (stripos($val, "IF(") !== false) { - return $val; - } - elseif ($blnEscape) { - return "'{$this->_c->real_escape_string($val)}'"; - } - return $val; - } elseif (is_a($val, 'DateTime')) { - return "'{$val->format(MYSQL_DATETIME)}'"; - } elseif (is_bool($val)) { - return $val ? "'1'" : "'0'"; - } elseif (gettype($val) == 'object' && method_exists($val, '_escape')) { - $ret = call_user_func([ - $val, - '_escape' - ]); - if ($ret !== false) { - return $ret; - } else { - throw new Exception("Error in return from _escape method in " . get_class($val), E_ERROR); - } - } elseif (gettype($val) == 'object') { - $this->_logger->error("Unknown object to escape " . get_class($val) . " in SQL string {$this->_sql}"); - return; - } - - throw new Exception("Unknown datatype to escape in SQL string {$this->_sql} " . gettype($val), E_ERROR); - } - - /** - * Function to retrieve all results - * - * @param int $intResultType - * - * @return mixed - */ - public function fetchAll($intResultType = MYSQLI_ASSOC) - { - $res = []; - if (method_exists('mysqli_result', 'fetch_all')) { // Compatibility layer with PHP < 5.3 - $res = $this->_result->fetch_all($intResultType); - } else { - while ($tmp = $this->_result->fetch_array($intResultType)) { - $res[] = $tmp; - } - } - - return $res; - } - - /** - * Function to populate the fields for the SQL - * - * @param array|string $fields - * [optional] - * Optional array of fields to string together to create a field list - * - * @return string - */ - public function fields($fields = null) - { - $ret = null; - - if (is_array($fields) && count($fields) && isset($fields[0]) && is_string($fields[0])) { - foreach ($fields as $field) { - if ((strpos($field, '`') === false) && (strpos($field, '.') === false) && (strpos($field, '*') === false) && (strpos($field, 'JSON_') === false) && (stripos($field, ' as ') === false)) { - $ret .= "`$field`,"; - } else { - $ret .= "$field,"; - } - } - $ret = substr($ret, - 1) == ',' ? substr($ret, 0, - 1) : $ret; - } elseif (is_string($fields)) { - $ret = $fields; - } elseif (is_null($fields)) { - $ret = "*"; - } else { - throw new \InvalidArgumentException("Invalid field type"); - } - - return $ret; - } - - /** - * Function to parse the flags - * - * @param array $flags - * Two-dimensional array to added flags - * - * - * [ - *   'joins' => [ - *     "JOIN table2 t2 ON t2.id=t1.id" - *   ], - *   'group' => 'field', - *   'having' => 'field', - *   'order' => 'field', - *   'start' => 0, - *   'limit' => 0 - * ] - * - * - * @see Database::groups() - * @see Database::having() - * @see Database::order() - * - * @return string - */ - public function flags($arrFlags) - { - $ret = ''; - - if (isset($arrFlags['group'])) { - $ret .= $this->groups($arrFlags['group']); - } - - if (isset($arrFlags['having']) && is_array($arrFlags['having'])) { - $having = " HAVING"; - foreach ($arrFlags['having'] as $x => $h) { - $having .= $this->parseClause($h, $x); - } - if (strlen($having) > strlen(" HAVING")) { - $ret .= $having; - } - } - - if (isset($arrFlags['order'])) { - $ret .= $this->order($arrFlags['order']); - } - - if (isset($arrFlags['limit']) && (is_string($arrFlags['limit']) || is_numeric($arrFlags['limit']))) { - $ret .= " LIMIT "; - if (isset($arrFlags['start']) && (is_string($arrFlags['start']) || is_numeric($arrFlags['start']))) { - $ret .= "{$arrFlags['start']},"; - } - $ret .= "{$arrFlags['limit']}"; - } - - return $ret; - } - - /** - * Function to parse SQL GROUP BY statements - * - * @param mixed $groups - * - * @return string - */ - public function groups($groups) - { - $ret = ''; - if (is_array($groups) && count($groups)) { - $ret .= " GROUP BY"; - - foreach ($groups as $grp) { - $ret .= " $grp"; - - if ($grp != end($groups)) { - $ret .= ","; - } - } - } elseif (is_string($groups)) { - $ret .= " GROUP BY {$groups}"; - } else { - throw (new Exception("Error in datatype for groups " . gettype($groups), E_ERROR)); - } - - return $ret; - } - - /** - * Function to parse SQL ORDER BY statements - * - * @param mixed $order - * - * @return string - */ - public function order($order) - { - $ret = ''; - if (is_array($order)) { - $ret .= " ORDER BY"; - - foreach ($order as $ord) { - $ret .= " {$ord['field']} {$ord['sort']}"; - - if ($ord != end($order)) { - $ret .= ","; - } - } - } elseif (is_string($order)) { - $ret .= " ORDER BY {$order}"; - } - - return $ret; - } - - /** - * Function to see if a constraint exists - * - * @param string $strConstraintId - * - * @return boolean - */ - public function isConstraint($strConstraintId) - { - $res = $this->_c->query("SELECT * FROM information_schema.TABLE_CONSTRAINTS WHERE CONSTRAINT_NAME = '{$strConstraintId}'"); - - if ($res->num_rows) { - return true; - } - - return false; - } - - /** - * Function to parse where and having clauses - * - * @param array $arrClause - * @param int $intIndex - */ - public function parseClause($arrClause, $intIndex) - { - $ret = null; - - $this->_logger->debug("Parsing clause", $arrClause); - - if (! isset($arrClause['field']) && isset($arrClause['close-paren']) && $arrClause['close-paren']) { - $ret .= ")"; - return $ret; - } elseif ($intIndex > 0 && ! isset($arrClause['sql_op'])) { - $this->_logger->warning("Missing sql_op field to identify how current and previous WHERE clause statements should be linked ('AND', 'OR', 'XOR', etc), skipped", [ - 'clause' => implode(",", $arrClause) - ]); - return; - } - - $op = '='; - if (isset($arrClause['op'])) { - $op = $arrClause['op']; - } - - switch ($op) { - case self::BETWEEN: - if (! isset($arrClause['field']) || ! isset($arrClause['low']) || ! isset($arrClause['high'])) { - $this->_logger->warning("Missing field, low, or high for BETWEEN where clause, skipping"); - return; - } - break; - default: - if (! isset($arrClause['field']) || ! isset($arrClause['value'])) { - $this->_logger->warning("Missing field or value for WHERE clause, skipping", $arrClause); - return; - } - } - - if ($intIndex > 0) { - $ret .= " {$arrClause['sql_op']}"; - } - - if (isset($arrClause['open-paren']) && $arrClause['open-paren']) { - $ret .= " ("; - } - - if (isset($arrClause['backticks']) && ! $arrClause['backticks']) { - $field = $arrClause['field']; - } else { - $field = "`{$arrClause['field']}`"; - } - - if ($op == self::IN || $op == self::NOT_IN) { - if (is_string($arrClause['value'])) { - $ret .= " {$field} {$op} " . (strpos($arrClause['value'], '(') !== false ? $arrClause['value'] : "({$arrClause['value']})"); - } elseif (is_array($arrClause['value'])) { - $ret .= " {$field} {$op} (" . implode(",", array_map([ - $this, - '_escape' - ], $arrClause['value'])) . ")"; - } else { - $this->_logger->error("Invalid datatype for IN WHERE clause, only string and array allowed " . gettype($arrClause['value']), $arrClause); - throw new Exception("Invalid datatype for IN WHERE clause", E_ERROR); - } - } elseif ($op == self::BETWEEN) { - $ret .= " {$field} BETWEEN {$this->_escape($arrClause['low'])} AND {$this->_escape($arrClause['high'])}"; - } else { - if (isset($arrClause['escape']) && ! $arrClause['escape']) { - $value = $arrClause['value']; - } else { - $value = $this->_escape($arrClause['value']); - } - - if (isset($arrClause['case_insensitive']) && $arrClause['case_insensitive']) { - $ret .= " LOWER({$field}) {$op} LOWER({$this->_escape($arrClause['value'])})"; - } elseif (preg_match("/\(SELECT/", $arrClause['value'])) { - $ret .= " {$field} {$op} {$arrClause['value']}"; - } else { - $ret .= " {$field} {$op} {$value}"; - } - } - - if (isset($arrClause['close-paren']) && $arrClause['close-paren']) { - $ret .= ")"; - } - - return $ret; - } -} diff --git a/inc/vendor/godsgood33/php-db/tests/DatabaseTest.php b/inc/vendor/godsgood33/php-db/tests/DatabaseTest.php deleted file mode 100644 index 366efad..0000000 --- a/inc/vendor/godsgood33/php-db/tests/DatabaseTest.php +++ /dev/null @@ -1,794 +0,0 @@ -db = new Database(realpath(__DIR__)); - // Database::$autorun = true; - } - - public function testCanCreateDatabaseInstance() - { - $this->assertInstanceOf("Godsgood33\Php_Db\Database", $this->db); - } - - public function testGetSchema() - { - $schema = $this->db->getSchema(); - $this->assertEquals("db", $schema); - } - - public function testSetSchemaWithNonExistentSchema() - { - $ret = $this->db->setSchema("george"); - $this->assertFalse($ret); - } - - public function testDatabaseConnection() - { - $this->assertTrue($this->db->isConnected()); - } - - public function testPassInMysqliConnection() - { - $conn = new mysqli(PHP_DB_SERVER, PHP_DB_USER, PHP_DB_PWD, PHP_DB_SCHEMA); - if ($conn->connect_errno) { - fwrite(STDOUT, $conn->connect_error); - } - - $this->db = new Database(realpath(__DIR__), $conn); - - $this->assertInstanceOf("Godsgood33\Php_Db\Database", $this->db); - } - - public function testSetLogLevel() - { - $this->db->setLogLevel(Logger::DEBUG); - $this->assertEquals(Logger::DEBUG, $this->db->getLogLevel()); - } - - /** - * @expectedException TypeError - */ - public function testSelectWithInvalidTableName() - { - $this->db->select(new stdClass()); - } - - public function testSelectWithNoParameters() - { - // query table with NO parameters - $this->db->select("test"); - $this->assertEquals("SELECT * FROM test", $this->db->getSql()); - } - - public function testSelectWithNullFieldParameter() - { - // query table with null fields parameter - $this->db->select("test", null); - $this->assertEquals("SELECT * FROM test", $this->db->getSql()); - } - - public function testSelectWithOneArrayParameter() - { - // query table with one parameter - $this->db->select("test", [ - 'id' - ]); - $this->assertEquals("SELECT `id` FROM test", $this->db->getSql()); - } - - public function testSelectWithTwoArrayParameters() - { - // query table with 2 parameters - $this->db->select("test", [ - 'id', - 'name' - ]); - $this->assertEquals("SELECT `id`,`name` FROM test", $this->db->getSql()); - } - - public function testSelectWithOneStringParameter() - { - // query table with string parameter - $this->db->select("test", 'id'); - $this->assertEquals("SELECT id FROM test", $this->db->getSql()); - } - - /** - * @expectedException InvalidArgumentException - */ - public function testSelectWithStdClassParameter() - { - // query table with object parameter - $this->db->select("test", new stdClass()); - $this->assertEquals("SELECT FROM test", $this->db->getSql()); - } - - /** - * @expectedException TypeError - */ - public function testSelectWithNullWhereParameter() - { - // query table with null where parameter - $this->db->select("test", 'id', null); - $this->assertEquals("SELECT id FROM test", $this->db->getSql()); - } - - public function testSelectWithEmptyArrayWhereParameter() - { - // query table with empty array where paramter - $this->db->select("test", 'id', []); - $this->assertEquals("SELECT id FROM test", $this->db->getSql()); - } - - public function testSelectWithImcompleteWhereArrayParameter() - { - // query with incomplete WHERE clause - $this->db->select("test", 'id', [ - [ - 'field' => 'id' - ] - ]); - $this->assertEquals("SELECT id FROM test", $this->db->getSql()); - } - - public function testGroupWithString() - { - // $this->markTestIncomplete(); - - // query with single group by string - $sql = $this->db->groups('name'); - $this->assertEquals(" GROUP BY name", $sql); - } - - public function testGroupWithArray() - { - // query with array group by string - $sql = $this->db->groups([ - 'name', - 'id' - ]); - $this->assertEquals(" GROUP BY name, id", $sql); - } - - /** - * @expectedException Exception - */ - public function testGroupWrongUnknownDataType() - { - // $this->markTestIncomplete(); - - // query group with invalid datatype (stdClass) should throw Exception - $this->db->groups(new stdClass()); - } - - public function testOrderWithString() - { - // $this->markTestIncomplete(); - - // query with single name order parameter - $sql = $this->db->order("name"); - $this->assertEquals(" ORDER BY name", $sql); - } - - public function testOrderWithArray() - { - // query with order array - $sql = $this->db->order([ - [ - 'field' => 'id', - 'sort' => 'ASC' - ], - [ - 'field' => 'name', - 'sort' => 'DESC' - ] - ]); - $this->assertEquals(" ORDER BY id ASC, name DESC", $sql); - } - - public function testOrderWithObject() - { - // query with invalid datatype (stdClass) will return empty string - $sql = $this->db->order(new stdClass()); - $this->assertEquals("", $sql); - } - - public function testFlags() - { - // $this->markTestIncomplete(); - - // query flags with all parameters - $sql = $this->db->flags([ - 'group' => 'name', - 'order' => 'name', - 'having' => [ - [ - 'field' => 'id', - 'op' => '=', - 'value' => 1 - ] - ], - 'limit' => '10', - 'start' => '5' - ]); - $this->assertEquals(" GROUP BY name HAVING `id` = '1' ORDER BY name LIMIT 5,10", $sql); - } - - public function testCreateTemporaryTable() - { - $this->db->select("test"); - $this->db->createTable('test2', true); - $this->assertEquals("CREATE TEMPORARY TABLE IF NOT EXISTS test2 AS (SELECT * FROM test)", $this->db->getSql()); - } - - public function testCreateTable() - { - // Database::$autorun = false; - $this->db->createTable('test', false, $this->db->select("test")); - $this->assertEquals("CREATE TABLE IF NOT EXISTS test AS (SELECT * FROM test)", $this->db->getSql()); - // Database::$autorun = true; - } - - public function testCreateTableWithArrayParameter() - { - $this->db->createTable("test", true, [ - [ - 'field' => 'id', - 'datatype' => 'int(11)', - 'option' => 'PRIMARY KEY' - ], - [ - 'field' => 'name', - 'datatype' => 'varchar(100)', - 'default' => null - ], - [ - 'field' => 'email', - 'datatype' => 'varchar(100)', - 'default' => '' - ] - ]); - $this->assertEquals("CREATE TEMPORARY TABLE IF NOT EXISTS test (`id` int(11) PRIMARY KEY,`name` varchar(100),`email` varchar(100) DEFAULT '')", $this->db->getSql()); - } - - public function testCreateTableJson() - { - $json = json_decode(file_get_contents(dirname(dirname(__FILE__)) . "/examples/create_table_json.json")); - - $this->db->createTableJson($json->tables[0]); - $this->assertEquals("CREATE TABLE IF NOT EXISTS `settings` (`id` int(11) AUTO_INCREMENT NOT NULL,`meta_key` varchar(100) NOT NULL,`meta_value` mediumtext DEFAULT NULL, UNIQUE(`meta_key`), PRIMARY KEY(`id`))", $this->db->getSql()); - } - - public function testCreateTableJson2() - { - $json = json_decode(file_get_contents(dirname(dirname(__FILE__)) . "/examples/create_table_json.json")); - - $this->db->createTableJson($json->tables[1]); - $this->assertEquals("CREATE TABLE IF NOT EXISTS `test` (`id` int(11) AUTO_INCREMENT NOT NULL,`fk` int(11) NOT NULL,`default` tinyint(1) DEFAULT '0',`enum` enum('1','2') DEFAULT '1', INDEX `default_idx` (`default`), CONSTRAINT `con_1` FOREIGN KEY (`fk`) REFERENCES `db`.`test` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, PRIMARY KEY(`id`,`fk`))", $this->db->getSql()); - } - - public function testCreateTableJson3() - { - $json = json_decode(file_get_contents(dirname(dirname(__FILE__)) . "/examples/create_table_json.json")); - - $this->db->createTableJson($json->tables[2]); - $this->assertEquals("CREATE TABLE IF NOT EXISTS `test2` (`id` int(11) AUTO_INCREMENT NOT NULL, PRIMARY KEY(`id`))", $this->db->getSql()); - } - - public function testTableExists() - { - $tbl_count = $this->db->tableExists('db', 'settings'); - $this->assertEquals(1, $tbl_count); - } - - public function testMultipleTableExists() - { - $tbl_count = $this->db->tableExists('db', 'test%'); - $this->assertEquals(2, $tbl_count); - } - - public function testTableNotPresent() - { - $tbl_not_present = $this->db->tableExists('db', "users"); - $this->assertFalse($tbl_not_present); - } - - public function testAlterTableAddColumn() - { - $new = new stdClass(); - $new->name = 'newCol'; - $new->dataType = 'tinyint(1)'; - $new->nn = false; - $new->default = null; - - $this->db->alterTable('test', Database::ADD_COLUMN, $new); - $this->assertEquals("ALTER TABLE test ADD COLUMN `newCol` tinyint(1) DEFAULT NULL", $this->db->getSql()); - } - - public function testAlterTableModifyColumn() - { - $mod = new stdClass(); - $mod->name = 'default'; - $mod->new_name = 'default2'; - $mod->dataType = 'int(1)'; - $mod->nn = true; - $mod->default = 1; - - $this->db->alterTable("test", Database::MODIFY_COLUMN, $mod); - $this->assertEquals("ALTER TABLE test MODIFY COLUMN `default` `default2` int(1) NOT NULL DEFAULT '1'", $this->db->getSql()); - } - - public function testAlterTableDropColumn() - { - $drop = new stdClass(); - $drop->name = 'newCol'; - - $this->db->alterTable("test", Database::DROP_COLUMN, [ - $drop - ]); - $this->assertEquals("ALTER TABLE test DROP COLUMN `newCol`", $this->db->getSql()); - } - - public function testSelectCountWithNoParameters() - { - $this->db->selectCount("test"); - $this->assertEquals("SELECT COUNT(1) AS 'count' FROM test", $this->db->getSql()); - } - - /** - * @expectedException TypeError - */ - public function testSelectCountWithStdClassParameterForTable() - { - $this->db->selectCount(new stdClass()); - } - - public function testSelectCountWithArrayWhereParameter() - { - $this->db->selectCount("test", [ - [ - 'field' => 'name', - 'value' => 'Ed' - ] - ], [ - 'joins' => [ - "JOIN settings s ON s.id = test.id" - ] - ]); - $this->assertEquals("SELECT COUNT(1) AS 'count' FROM test JOIN settings s ON s.id = test.id WHERE `name` = 'Ed'", $this->db->getSql()); - } - - public function testInsertWithOneElementArrayParameter() - { - // query with one parameter - $this->db->insert("test", [ - 'id' => 1 - ]); - $this->assertEquals("INSERT INTO test (`id`) VALUES ('1')", $this->db->getSql()); - } - - public function testInsertWithTwoElementArrayParameter() - { - // query with 2 parameters - $this->db->insert("test", [ - 'id' => 1, - 'name' => 'Ed' - ], true); - $this->assertEquals("INSERT IGNORE INTO test (`id`,`name`) VALUES ('1','Ed')", $this->db->getSql()); - } - - public function testInsertWithSelectStatement() - { - // insert query using SELECT statement - $this->db->insert("test", "SELECT id FROM settings"); - $this->assertEquals("INSERT INTO test SELECT id FROM settings", $this->db->getSql()); - } - - /** - * @expectedException TypeError - */ - public function testInsertInvalidTableNameDataType() - { - $this->db->insert(new stdClass()); - } - - /** - * @expectedException Error - */ - public function testInsertInvalidParameterDataType() - { - $this->db->insert("test", new stdClass()); - } - - public function testEInsert() - { - // extended insert query with fields and 2 items - $this->db->extendedInsert("test", [ - 'id', - 'name' - ], [ - [ - 1, - 'Ed' - ], - [ - 2, - 'Frank' - ] - ]); - $this->assertEquals("INSERT INTO test (`id`,`name`) VALUES ('1','Ed'),('2','Frank')", $this->db->getSql()); - } - - /** - * @expectedException TypeError - */ - public function testEInsertInvalidTableNameDatatype() - { - $this->db->extendedInsert(new stdClass(), [], []); - } - - /** - * @expectedException Error - */ - public function testEInsertDifferentFieldValuePairs() - { - $this->db->extendedInsert('test', [ - 'id', - 'name' - ], [ - [ - 1 - ], - [ - 2 - ] - ]); - } - - /** - * @expectedException Error - */ - public function testEInsertDifferentFieldValuePairs2() - { - $this->db->extendedInsert('test', [ - 'id', - 'name' - ], [ - [ - 1, - 'Ed' - ], - [ - 2 - ] - ]); - } - - public function testUpdateWithOneElementArrayParameter() - { - $this->db->update('test', [ - 'name' => 'Frank' - ]); - $this->assertEquals("UPDATE test SET `name`='Frank'", $this->db->getSql()); - } - - public function testUpdateWithOneElementAndWhereArray() - { - $this->db->update('test', [ - 'name' => 'Frank' - ], [ - [ - 'field' => 'id', - 'value' => 1 - ] - ]); - $this->assertEquals("UPDATE test SET `name`='Frank' WHERE `id` = '1'", $this->db->getSql()); - } - - public function testUpdateWithOneElementAndJoinClause() - { - $this->db->update('test t', [ - 't.name' => 'Frank' - ], [], [ - 'joins' => [ - "JOIN settings s ON s.id=t.id" - ] - ]); - $this->assertEquals("UPDATE test t JOIN settings s ON s.id=t.id SET t.name='Frank'", $this->db->getSql()); - } - - public function testUpdateWithOneElementAndLimitClause() - { - $this->db->update('test', [ - 'name' => 'Frank' - ], [], [ - 'limit' => 1 - ]); - $this->assertEquals("UPDATE test SET `name`='Frank' LIMIT 1", $this->db->getSql()); - } - - /** - * @expectedException TypeError - */ - public function testUpdateInvalidTableNameDatatype() - { - $this->db->update(new stdClass(), []); - } - - public function testEUpdateWithArrayList() - { - $this->db->extendedUpdate("test", "settings", "id", [ - 'name' - ]); - $this->assertEquals("UPDATE test tbu INNER JOIN settings o USING (id) SET tbu.`name` = o.`name`", $this->db->getSql()); - } - - public function testEUpdateWithStringList() - { - $this->db->extendedUpdate("test", "settings", "id", "name"); - $this->assertEquals("UPDATE test tbu INNER JOIN settings o USING (id) SET tbu.`name` = o.`name`", $this->db->getSql()); - } - - /** - * @expectedException Exception - */ - public function testEUpdateInvalidParamDatatype() - { - $this->db->extendedUpdate('test', 'settings', 'id', new stdClass()); - } - - public function testReplace() - { - $this->db->replace("test", [ - 'id' => 1 - ]); - $this->assertEquals("REPLACE INTO test (`id`) VALUES ('1')", $this->db->getSql()); - } - - /** - * @expectedException TypeError - */ - public function testReplaceInvalidTableNameDatatype() - { - $this->db->replace(new stdClass(), []); - } - - public function testEReplace() - { - $this->db->extendedReplace("test", [ - 'id', - 'name' - ], [ - [ - 1, - 'Ed' - ], - [ - 2, - 'Frank' - ] - ]); - $this->assertEquals("REPLACE INTO test (`id`,`name`) VALUES ('1','Ed'),('2','Frank')", $this->db->getSql()); - } - - /** - * @expectedException TypeError - */ - public function testEReplaceInvalidTableNameDatatype() - { - $this->db->extendedReplace(new stdClass(), [], []); - } - - public function testFieldExists() - { - $id_exists = $this->db->fieldExists('test', 'id'); - $this->assertTrue($id_exists); - } - - public function testFieldDoesNotExist() - { - $phone_not_exists = $this->db->fieldExists('test', 'phone'); - $this->assertFalse($phone_not_exists); - } - - public function testFieldData() - { - $id = new stdClass(); - $id->name = 'id'; - $id->orgname = 'id'; - $id->table = 'test2'; - $id->orgtable = 'test2'; - $id->def = null; - $id->db = 'db'; - $id->catalog = 'def'; - $id->max_length = 0; - $id->length = 11; - $id->charsetnr = 63; - $id->flags = 49667; - $id->type = 3; - $id->decimals = 0; - - // query all fields in table - $fd = $this->db->fieldData("test2"); - $this->assertEquals([ - 'id' => $id - ], $fd); - - // query single field in table - $fd = $this->db->fieldData('test2', 'id'); - $this->assertEquals([ - 'id' => $id - ], $fd); - - // query array of fields in table - $fd = $this->db->fieldData('test2', [ - 'id' - ]); - $this->assertEquals([ - 'id' => $id - ], $fd); - - // invalid datatype for field name - $fd = $this->db->fieldData('test2', new stdClass()); - $this->assertEquals(null, $fd); - } - - public function testEscapeDontEscapeNow() - { - // $this->markTestIncomplete(); - $ret = $this->db->_escape('NOW()', false); - $this->assertEquals("NOW()", $ret); - } - - public function testEscapeDontEscapeBackticks() - { - $ret = $this->db->_escape("t.`id`", false); - $this->assertEquals("t.`id`", $ret); - } - - public function testEscapeEscapeDateTime() - { - $dt = new DateTime("2017-01-01 00:00:00"); - $ret = $this->db->_escape($dt); - $this->assertEquals("'2017-01-01 00:00:00'", $ret); - } - - public function testEscapeBoolean() - { - $ret = $this->db->_escape(true); - $this->assertEquals("'1'", $ret); - } - - public function testEscapeClassWithEscapeMethod() - { - $tc = new TestClass(); - $tc->var = "test's"; - $ret = $this->db->_escape($tc); - $this->assertEquals("test\'s", $ret); - } - - public function testEscapeUnknownClassToEscape() - { - // $this->markTestIncomplete(); - $tc2 = new TestClass2(); - $tc2->var = "test"; - $ret = $this->db->_escape($tc2); - - $this->assertEquals("", $ret); - } - - public function testDeleteBasic() - { - $this->db->delete("test"); - $this->assertEquals("DELETE FROM test", $this->db->getSql()); - } - - public function testDeleteWithWhereClause() - { - $this->db->delete('test', [ - 'id' - ], [ - [ - 'field' => 'id', - 'op' => '=', - 'value' => 1 - ] - ]); - $this->assertEquals("DELETE id FROM test WHERE `id` = '1'", $this->db->getSql()); - } - - public function testDeleteWithJoin() - { - $this->db->delete('test t', [], [], [ - 'joins' => "JOIN settings s ON s.id=t.id" - ]); - $this->assertEquals("DELETE FROM test t JOIN settings s ON s.id=t.id", $this->db->getSql()); - } - - /** - * @expectedException TypeError - */ - public function testDeleteInvalidTableNameDatatype() - { - $this->db->delete(new stdClass()); - } - - public function testTruncate() - { - $this->db->truncate('test'); - $this->assertEquals("TRUNCATE TABLE test", $this->db->getSql()); - } - - /** - * @expectedException TypeError - */ - public function testTruncateInvalidTableNameDatatype() - { - $this->db->truncate(new stdClass()); - } - - public function testDropSettingsTable() - { - // Database::$autorun = false; - $sql = $this->db->drop("settings"); - $this->assertEquals("DROP TABLE IF EXISTS `settings`", $sql); - // Database::$autorun = true; - } - - public function testDropTestTable() - { - // Database::$autorun = false; - $sql = $this->db->drop("test"); - $this->assertEquals("DROP TABLE IF EXISTS `test`", $sql); - // Database::$autorun = true; - } - - public function testDropView() - { - // Database::$autorun = false; - $sql = $this->db->drop("test", "view"); - $this->assertEquals("DROP VIEW IF EXISTS `test`", $sql); - // Database::$autorun = true; - } - - /** - * @expectedException TypeError - */ - public function testDropInvalidTableNameDatatype() - { - $this->db->drop(new stdClass()); - } - - /** - * @expectedException TypeError - */ - public function testDropInvalidTypeDatatype() - { - $this->db->drop('test', new stdClass()); - } - - public function testSetSchema() - { - // set the schema and validate that it is what we set it to - $this->db->setSchema("test"); - $row = $this->db->query("SELECT DATABASE()"); - $this->assertEquals("test", $row->fetch_array()[0]); - } -} \ No newline at end of file diff --git a/inc/vendor/godsgood33/php-db/tests/TestClass.php b/inc/vendor/godsgood33/php-db/tests/TestClass.php deleted file mode 100644 index 836a54c..0000000 --- a/inc/vendor/godsgood33/php-db/tests/TestClass.php +++ /dev/null @@ -1,24 +0,0 @@ -var); - } -} \ No newline at end of file diff --git a/inc/vendor/godsgood33/php-db/tests/TestClass2.php b/inc/vendor/godsgood33/php-db/tests/TestClass2.php deleted file mode 100644 index 4d01a9e..0000000 --- a/inc/vendor/godsgood33/php-db/tests/TestClass2.php +++ /dev/null @@ -1,5 +0,0 @@ -