Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

00f100/fcphp-datasource

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

00f100/fcphp-datasource - npm Package Compare versions

Comparing version
dev-add-criteria
to
dev-master
+16
00F100-fcphp-datasource-cbf92fa/.editorconfig
root = true
[*]
end_of_line = lf
[*.php]
insert_final_newline = true
[*.{php,xml,json,md}]
charset = utf-8
indent_style = space
indent_size = 4
[*.yml]
indent_style = space
indent_size = 2
language: php
php:
- 7.2
before_script:
- travis_retry composer self-update
- travis_retry composer install --no-interaction --prefer-source --dev
script:
- vendor/bin/phpunit --coverage-clover=coverage.xml
after_success:
- bash <(curl -s https://codecov.io/bash)
{
"name": "00f100/fcphp-datasource",
"type": "package",
"version": "0.2.0",
"description": "Package to manipulate datasource",
"keywords": ["package", "manipulate", "datasource", "fcphp", "php7"],
"homepage": "https://github.com/00f100/fcphp-datasource",
"authors": [
{
"name": "João Moraes",
"email": "joaomoraesbr@gmail.com",
"homepage": "https://github.com/00f100"
}
],
"require": {
"php": ">=7.2",
"00f100/fcphp-di": "*"
},
"require-dev": {
"00f100/phpdbug": "*",
"phpunit/phpunit": "6.*"
},
"autoload": {
"psr-4": {
"FcPhp\\Datasource\\": "src/",
"FcPhp\\Datasource\\Test\\": "tests/"
}
}
}
{
"_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": "a93669cc8f3f395fba13cce7484cfa26",
"packages": [
{
"name": "00f100/fcphp-di",
"version": "0.3.1",
"source": {
"type": "git",
"url": "https://github.com/00F100/fcphp-di.git",
"reference": "de5389b99df10158234006dd3340521dbb6aeffc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/00F100/fcphp-di/zipball/de5389b99df10158234006dd3340521dbb6aeffc",
"reference": "de5389b99df10158234006dd3340521dbb6aeffc",
"shasum": ""
},
"require": {
"php": ">=7.2"
},
"require-dev": {
"00f100/phpdbug": "*",
"phpunit/phpunit": "6.*"
},
"type": "package",
"autoload": {
"psr-4": {
"FcPhp\\Di\\": "src/",
"FcPhp\\Di\\Test\\": "tests/"
}
},
"notification-url": "https://packagist.org/downloads/",
"authors": [
{
"name": "João Moraes",
"email": "joaomoraesbr@gmail.com",
"homepage": "https://github.com/00f100"
}
],
"description": "Dependency Injection for FcPHP",
"homepage": "https://github.com/00f100/fcphp-di",
"keywords": [
"dependency",
"di",
"fcphp",
"injection",
"php"
],
"time": "2018-08-04T19:16:58+00:00"
}
],
"packages-dev": [
{
"name": "00f100/phpdbug",
"version": "0.4.0",
"source": {
"type": "git",
"url": "https://github.com/00F100/phpdbug.git",
"reference": "9b71fa48f5e90847bda20138be0c3ad77f86862f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/00F100/phpdbug/zipball/9b71fa48f5e90847bda20138be0c3ad77f86862f",
"reference": "9b71fa48f5e90847bda20138be0c3ad77f86862f",
"shasum": ""
},
"type": "package",
"autoload": {
"files": [
"src/functions.php"
],
"psr-4": {
"PHPdbug\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"authors": [
{
"name": "João Moraes",
"email": "joaomoraesbr@gmail.com",
"homepage": "https://github.com/00f100"
}
],
"description": "Package to debug everything in PHP",
"homepage": "https://github.com/00f100/phpdbug",
"keywords": [
"denbug",
"php"
],
"time": "2018-06-22T15:19:31+00:00"
},
{
"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.1",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
"reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
"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-06-11T23:09:50+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.8.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
"reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
"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 || ^7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.8.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-08-05T17:53:17+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "5.3.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "c89677919c5dd6d3b3852f230a663118762218ac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac",
"reference": "c89677919c5dd6d3b3852f230a663118762218ac",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xmlwriter": "*",
"php": "^7.0",
"phpunit/php-file-iterator": "^1.4.2",
"phpunit/php-text-template": "^1.2.1",
"phpunit/php-token-stream": "^2.0.1",
"sebastian/code-unit-reverse-lookup": "^1.0.1",
"sebastian/environment": "^3.0",
"sebastian/version": "^2.0.1",
"theseer/tokenizer": "^1.1"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
},
"suggest": {
"ext-xdebug": "^2.5.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.3.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 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-04-06T15:36:58+00:00"
},
{
"name": "phpunit/php-file-iterator",
"version": "1.4.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
"reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.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": "2017-11-27T13:52:08+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": "1.0.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
"reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
"reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Utility class for timing",
"homepage": "https://github.com/sebastianbergmann/php-timer/",
"keywords": [
"timer"
],
"time": "2017-02-26T11:10:40+00:00"
},
{
"name": "phpunit/php-token-stream",
"version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
"reference": "791198a2c6254db10131eecfe8c06670700904db"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db",
"reference": "791198a2c6254db10131eecfe8c06670700904db",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.2.4"
},
"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": "Wrapper around PHP's tokenizer extension.",
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
"keywords": [
"tokenizer"
],
"time": "2017-11-27T05:48:46+00:00"
},
{
"name": "phpunit/phpunit",
"version": "6.5.12",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "24da433d7384824d65ea93fbb462e2f31bbb494e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/24da433d7384824d65ea93fbb462e2f31bbb494e",
"reference": "24da433d7384824d65ea93fbb462e2f31bbb494e",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
"myclabs/deep-copy": "^1.6.1",
"phar-io/manifest": "^1.0.1",
"phar-io/version": "^1.0",
"php": "^7.0",
"phpspec/prophecy": "^1.7",
"phpunit/php-code-coverage": "^5.3",
"phpunit/php-file-iterator": "^1.4.3",
"phpunit/php-text-template": "^1.2.1",
"phpunit/php-timer": "^1.0.9",
"phpunit/phpunit-mock-objects": "^5.0.9",
"sebastian/comparator": "^2.1",
"sebastian/diff": "^2.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": {
"phpdocumentor/reflection-docblock": "3.0.2",
"phpunit/dbunit": "<3.0"
},
"require-dev": {
"ext-pdo": "*"
},
"suggest": {
"ext-xdebug": "*",
"phpunit/php-invoker": "^1.1"
},
"bin": [
"phpunit"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.5.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": "The PHP Unit Testing framework.",
"homepage": "https://phpunit.de/",
"keywords": [
"phpunit",
"testing",
"xunit"
],
"time": "2018-08-22T06:32:48+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
"version": "5.0.10",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/cd1cf05c553ecfec36b170070573e540b67d3f1f",
"reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.5",
"php": "^7.0",
"phpunit/php-text-template": "^1.2.1",
"sebastian/exporter": "^3.1"
},
"conflict": {
"phpunit/phpunit": "<6.0"
},
"require-dev": {
"phpunit/phpunit": "^6.5.11"
},
"suggest": {
"ext-soap": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.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": "Mock Object library for PHPUnit",
"homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
"keywords": [
"mock",
"xunit"
],
"time": "2018-08-09T05:50:03+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": "2.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "34369daee48eafb2651bea869b4b15d75ccc35f9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9",
"reference": "34369daee48eafb2651bea869b4b15d75ccc35f9",
"shasum": ""
},
"require": {
"php": "^7.0",
"sebastian/diff": "^2.0 || ^3.0",
"sebastian/exporter": "^3.1"
},
"require-dev": {
"phpunit/phpunit": "^6.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.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"
}
],
"description": "Provides the functionality to compare PHP values for equality",
"homepage": "https://github.com/sebastianbergmann/comparator",
"keywords": [
"comparator",
"compare",
"equality"
],
"time": "2018-02-01T13:46:46+00:00"
},
{
"name": "sebastian/diff",
"version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
"reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
"reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
"shasum": ""
},
"require": {
"php": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.2"
},
"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": "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"
],
"time": "2017-08-03T08:09:46+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": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=7.2"
},
"platform-dev": []
}
MIT License
Copyright (c) 2018 João Moraes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="testSuite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
<blacklist>
<directory suffix=".php">./vendor/</directory>
<exclude>
<directory suffix=".php">./vendor/</directory>
</exclude>
</blacklist>
</filter>
<logging>
<log type="coverage-html" target="tests/coverage" charset="UTF-8" yui="true" highlight="true" lowUpperBound="35" highLowerBound="70" />
</logging>
</phpunit>
# FcPhp Datasource
Abstract class to Datasource FcPhp
[![Build Status](https://travis-ci.org/00F100/fcphp-datasource.svg?branch=master)](https://travis-ci.org/00F100/fcphp-datasource) [![codecov](https://codecov.io/gh/00F100/fcphp-datasource/branch/master/graph/badge.svg)](https://codecov.io/gh/00F100/fcphp-datasource)
[![PHP Version](https://img.shields.io/packagist/php-v/00f100/fcphp-datasource.svg)](https://packagist.org/packages/00F100/fcphp-datasource) [![Packagist Version](https://img.shields.io/packagist/v/00f100/fcphp-datasource.svg)](https://packagist.org/packages/00F100/fcphp-datasource) [![Total Downloads](https://poser.pugx.org/00F100/fcphp-datasource/downloads)](https://packagist.org/packages/00F100/fcphp-datasource)
## How to install
Composer:
```sh
$ composer require 00f100/fcphp-datasource
```
or add in composer.json
```json
{
"require": {
"00f100/fcphp-datasource": "*"
}
}
```
## How to use
This class is abstract. Have methods default to connect, disconnect, execute Query and get Strategy to use in Query.
See:
- [Datasource Integration Test](tests/Integration/DatasourceIntegrationTest.php)
- [Datasource Interface](src/Interfaces/IDatasource.php)
- [Query Interface](src/Interfaces/IQuery.php)
- [Strategy Interface](src/Interfaces/IStrategy.php)
<?php
namespace FcPhp\Datasource
{
use FcPhp\Datasource\Interfaces\IAuth;
abstract class Auth implements IAuth
{
/**
* @var string
*/
private $username;
/**
* @var string
*/
private $password;
/**
* @var string
*/
private $host;
/**
* @var string
*/
private $port;
/**
* @var string
*/
private $schema;
/**
* Method to configure username
*
* @param string $username
* @return FcPhp\Datasource\Interfaces\IAuth
*/
public function setUsername(string $username) :IAuth
{
$this->username = $username;
return $this;
}
/**
* Method to return username
*
* @return string
*/
public function getUsername() :string
{
return $this->username;
}
/**
* Method to configure password
*
* @param string $password
* @return FcPhp\Datasource\Interfaces\IAuth
*/
public function setPassword(string $password) :IAuth
{
$this->password = $password;
return $this;
}
/**
* Method to return password
*
* @return string
*/
public function getPassword() :string
{
return $this->password;
}
/**
* Method to configure host
*
* @param string $host
* @return FcPhp\Datasource\Interfaces\IAuth
*/
public function setHost(string $host) :IAuth
{
$this->host = $host;
return $this;
}
/**
* Method to return host
*
* @return string
*/
public function getHost() :string
{
return $this->host;
}
/**
* Method to configure port
*
* @param string $port
* @return FcPhp\Datasource\Interfaces\IAuth
*/
public function setPort(string $port) :IAuth
{
$this->port = $port;
return $this;
}
/**
* Method to return port
*
* @return string
*/
public function getPort() :string
{
return $this->port;
}
/**
* Method to configure schema
*
* @param string $schema
* @return FcPhp\Datasource\Interfaces\IAuth
*/
public function setSchema(string $schema) :IAuth
{
$this->schema = $schema;
return $this;
}
/**
* Method to return schema
*
* @return string
*/
public function getSchema() :string
{
return $this->schema;
}
}
}
<?php
namespace FcPhp\Datasource
{
use FcPhp\Datasource\Interfaces\IAuth;
use FcPhp\Datasource\Interfaces\ISource;
use FcPhp\Datasource\Interfaces\IRequest;
use FcPhp\Datasource\Interfaces\IResponse;
use FcPhp\Datasource\Interfaces\IDatasource;
abstract class Datasource implements IDatasource
{
/**
* @var FcPhp\Datasource\Interfaces\IAuth
*/
private $auth;
/**
* @var FcPhp\Datasource\Interfaces\ISource
*/
private $source;
/**
* @var FcPhp\Datasource\Interfaces\IRequest
*/
private $request;
/**
* @var string|int
*/
private $connection_id;
/**
* Method to construct instace of Datasource
*
* @param FcPhp\Datasource\Interfaces\IAuth $auth
* @param FcPhp\Datasource\Interfaces\ISource $source
* @param FcPhp\Datasource\Interfaces\IRequest $request
* @return void
*/
public function __construct(IAuth $auth, ISource $source, IRequest $request)
{
$this->auth = $auth;
$this->source = $source;
$this->request = $request;
}
/**
* Method to connect from source
*authauth
* @return bool
*/
public function connect() :bool
{
return $this->source->connect($this->auth);
}
/**
* Method to disconnect from source
*
* @return bool
*/
public function disconnect() :bool
{
return $this->source->disconnect();
}
/**
* Method to request something from source
*
* @param array $params
* @return FcPhp\Datasource\Interfaces\IResponse
*/
public function request(array $params) :IResponse
{
$this->request->merge($params);
return $this->source->request($this->request);
}
}
}
<?php
namespace FcPhp\Datasource\Interfaces
{
interface IAuth
{
/**
* Method to configure username
*
* @param string $username
* @return FcPhp\Datasource\Interfaces\IAuth
*/
public function setUsername(string $username) :IAuth;
/**
* Method to return username
*
* @return string
*/
public function getUsername() :string;
/**
* Method to configure password
*
* @param string $password
* @return FcPhp\Datasource\Interfaces\IAuth
*/
public function setPassword(string $password) :IAuth;
/**
* Method to return password
*
* @return string
*/
public function getPassword() :string;
/**
* Method to configure host
*
* @param string $host
* @return FcPhp\Datasource\Interfaces\IAuth
*/
public function setHost(string $host) :IAuth;
/**
* Method to return host
*
* @return string
*/
public function getHost() :string;
/**
* Method to configure port
*
* @param string $port
* @return FcPhp\Datasource\Interfaces\IAuth
*/
public function setPort(string $port) :IAuth;
/**
* Method to return port
*
* @return string
*/
public function getPort() :string;
/**
* Method to configure schema
*
* @param string $schema
* @return FcPhp\Datasource\Interfaces\IAuth
*/
public function setSchema(string $schema) :IAuth;
/**
* Method to return schema
*
* @return string
*/
public function getSchema() :string;
}
}
<?php
namespace FcPhp\Datasource\Interfaces
{
interface IDatasource
{
/**
* Method to construct instace of Datasource
*
* @param FcPhp\Datasource\Interfaces\IAuth $auth
* @param FcPhp\Datasource\Interfaces\ISource $source
* @param FcPhp\Datasource\Interfaces\IRequest $request
* @param FcPhp\Datasource\Interfaces\IResponse $response
* @return void
*/
public function __construct(IAuth $auth, ISource $source, IRequest $request, IResponse $response);
/**
* Method to connect from source
*authauth
* @return bool
*/
public function connect() :bool;
/**
* Method to disconnect from source
*
* @return bool
*/
public function disconnect() :bool;
/**
* Method to request something from source
*
* @param array $params
* @return FcPhp\Datasource\Interfaces\IResponse
*/
public function request(array $params) :IResponse
}
}
<?php
namespace FcPhp\Datasource\Interfaces
{
interface IRequest
{
/**
* Method to merge params into request
*
* @param array $params
* @return FcPhp\Datasource\Interfaces\IRequest
*/
public function merge(array $params) :IRequest;
}
}
<?php
namespace FcPhp\Datasource\Interfaces
{
interface IResponse
{
/**
* Method to configure code
*
* @param int $code
* @return FcPhp\Datasource\Interfaces\IResponse
*/
public function setCode(int $code) :IResponse;
/**
* Method to get code
*
* @return int
*/
public function getCode() :int;
/**
* Method to configure error
*
* @param string $error
* @return FcPhp\Datasource\Interfaces\IResponse
*/
public function setError(string $error) :IResponse;
/**
* Method to get error
*
* @return array
*/
public function getError() :array;
/**
* Method to verify if have error
*
* @return bool
*/
public function hasError() :bool;
/**
* Method to configure count
*
* @param int $count
* @return FcPhp\Datasource\Interfaces\IResponse
*/
public function setCount(int $count) :IResponse;
/**
* Method to get count
*
* @return int
*/
public function getCount() :int;
/**
* Method to configure data
*
* @param array $data
* @return FcPhp\Datasource\Interfaces\IResponse
*/
public function setData(array $data) :IResponse;
/**
* Method to get data
*
* @return array
*/
public function getData() :array;
}
}
<?php
namespace FcPhp\Datasource\Interfaces
{
interface ISource
{
/**
* Method to construct instance
*
* @param FcPhp\Datasource\Interfaces\IResponse $response
* @return void
*/
public function __construct(IResponse $response);
/**
* Method to connect from source
*
* @param FcPhp\Datasource\Interfaces\IAuth $auth
* @return bool
*/
public function connect(IAuth $auth) :bool;
/**
* Method to disconnect from source
*
* @return bool
*/
public function disconnect() :bool;
/**
* Meethod to request from source
*
* @param FcPhp\Datasource\Interfaces\IRequest $request
* @return FcPhp\Datasource\Interfaces\IResponse
*/
public function request(IRequest $request) :IResponse;
}
}
<?php
namespace FcPhp\Datasource
{
use FcPhp\Datasource\Interfaces\IRequest;
abstract class Request implements IRequest
{
/**
* Method to merge params into request
*
* @param array $params
* @return FcPhp\Datasource\Interfaces\IRequest
*/
public function merge(array $params) :IRequest
{
foreach($params as $param => $value) {
$this->{$param} = $value;
}
return $this;
}
}
}
<?php
namespace FcPhp\Datasource
{
use FcPhp\Datasource\Interfaces\IResponse;
abstract class Response implements IResponse
{
/**
* @var int
*/
private $code;
/**
* @var array
*/
private $error = [];
/**
* @var int
*/
private $count;
/**
* @var array
*/
private $data = [];
/**
* Method to configure code
*
* @param int $code
* @return FcPhp\Datasource\Interfaces\IResponse
*/
public function setCode(int $code) :IResponse
{
$this->code = $code;
return $this;
}
/**
* Method to get code
*
* @return int
*/
public function getCode() :int
{
return $this->code;
}
/**
* Method to configure error
*
* @param string $error
* @return FcPhp\Datasource\Interfaces\IResponse
*/
public function setError(string $error) :IResponse
{
$this->error[] = $error;
return $this;
}
/**
* Method to get error
*
* @return array
*/
public function getError() :array
{
return $this->error;
}
/**
* Method to verify if have error
*
* @return bool
*/
public function hasError() :bool
{
return count($this->error) > 0;
}
/**
* Method to configure count
*
* @param int $count
* @return FcPhp\Datasource\Interfaces\IResponse
*/
public function setCount(int $count) :IResponse
{
$this->count = $count;
return $this;
}
/**
* Method to get count
*
* @return int
*/
public function getCount() :int
{
return $this->count;
}
/**
* Method to configure data
*
* @param array $data
* @return FcPhp\Datasource\Interfaces\IResponse
*/
public function setData(array $data) :IResponse
{
$this->data = $data;
return $this;
}
/**
* Method to get data
*
* @return array
*/
public function getData() :array
{
return $this->data;
}
}
}
<?php
namespace FcPhp\Datasource
{
use FcPhp\Datasource\Interfaces\IAuth;
use FcPhp\Datasource\Interfaces\ISource;
use FcPhp\Datasource\Interfaces\IRequest;
use FcPhp\Datasource\Interfaces\IResponse;
abstract class Source implements ISource
{
/**
* @var FcPhp\Datasource\Interfaces\IResponse
*/
private $response;
/**
* Method to construct instance
*
* @param FcPhp\Datasource\Interfaces\IResponse $response
* @return void
*/
public function __construct(IResponse $response)
{
$this->response = $response;
}
/**
* Method to connect from source
*
* @param FcPhp\Datasource\Interfaces\IAuth $auth
* @return bool
*/
public function connect(IAuth $auth) :bool
{
return true;
}
/**
* Method to disconnect from source
*
* @return bool
*/
public function disconnect() :bool
{
return true;
}
/**
* Meethod to request from source
*
* @param FcPhp\Datasource\Interfaces\IRequest $request
* @return FcPhp\Datasource\Interfaces\IResponse
*/
public function request(IRequest $request) :IResponse
{
return $this->response;
}
}
}
-16
root = true
[*]
end_of_line = lf
[*.php]
insert_final_newline = true
[*.{php,xml,json,md}]
charset = utf-8
indent_style = space
indent_size = 4
[*.yml]
indent_style = space
indent_size = 2
language: php
php:
- 7.2
before_script:
- travis_retry composer self-update
- travis_retry composer install --no-interaction --prefer-source --dev
script:
- vendor/bin/phpunit --coverage-clover=coverage.xml
after_success:
- bash <(curl -s https://codecov.io/bash)
{
"name": "00f100/fcphp-datasource",
"type": "package",
"version": "0.1.0",
"description": "Package to manipulate datasource",
"keywords": ["package", "manipulate", "datasource", "fcphp", "php7"],
"homepage": "https://github.com/00f100/fcphp-datasource",
"authors": [
{
"name": "João Moraes",
"email": "joaomoraesbr@gmail.com",
"homepage": "https://github.com/00f100"
}
],
"require": {
"php": ">=7.2",
"00f100/fcphp-di": "*"
},
"require-dev": {
"00f100/phpdbug": "*",
"phpunit/phpunit": "6.*"
},
"autoload": {
"psr-4": {
"FcPhp\\Datasource\\": "src/",
"FcPhp\\Datasource\\Test\\": "tests/"
}
}
}
{
"_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": "a93669cc8f3f395fba13cce7484cfa26",
"packages": [
{
"name": "00f100/fcphp-di",
"version": "0.3.1",
"source": {
"type": "git",
"url": "https://github.com/00F100/fcphp-di.git",
"reference": "de5389b99df10158234006dd3340521dbb6aeffc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/00F100/fcphp-di/zipball/de5389b99df10158234006dd3340521dbb6aeffc",
"reference": "de5389b99df10158234006dd3340521dbb6aeffc",
"shasum": ""
},
"require": {
"php": ">=7.2"
},
"require-dev": {
"00f100/phpdbug": "*",
"phpunit/phpunit": "6.*"
},
"type": "package",
"autoload": {
"psr-4": {
"FcPhp\\Di\\": "src/",
"FcPhp\\Di\\Test\\": "tests/"
}
},
"notification-url": "https://packagist.org/downloads/",
"authors": [
{
"name": "João Moraes",
"email": "joaomoraesbr@gmail.com",
"homepage": "https://github.com/00f100"
}
],
"description": "Dependency Injection for FcPHP",
"homepage": "https://github.com/00f100/fcphp-di",
"keywords": [
"dependency",
"di",
"fcphp",
"injection",
"php"
],
"time": "2018-08-04T19:16:58+00:00"
}
],
"packages-dev": [
{
"name": "00f100/phpdbug",
"version": "0.4.0",
"source": {
"type": "git",
"url": "https://github.com/00F100/phpdbug.git",
"reference": "9b71fa48f5e90847bda20138be0c3ad77f86862f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/00F100/phpdbug/zipball/9b71fa48f5e90847bda20138be0c3ad77f86862f",
"reference": "9b71fa48f5e90847bda20138be0c3ad77f86862f",
"shasum": ""
},
"type": "package",
"autoload": {
"files": [
"src/functions.php"
],
"psr-4": {
"PHPdbug\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"authors": [
{
"name": "João Moraes",
"email": "joaomoraesbr@gmail.com",
"homepage": "https://github.com/00f100"
}
],
"description": "Package to debug everything in PHP",
"homepage": "https://github.com/00f100/phpdbug",
"keywords": [
"denbug",
"php"
],
"time": "2018-06-22T15:19:31+00:00"
},
{
"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.1",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
"reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
"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-06-11T23:09:50+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.8.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
"reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
"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 || ^7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.8.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-08-05T17:53:17+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "5.3.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "c89677919c5dd6d3b3852f230a663118762218ac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac",
"reference": "c89677919c5dd6d3b3852f230a663118762218ac",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xmlwriter": "*",
"php": "^7.0",
"phpunit/php-file-iterator": "^1.4.2",
"phpunit/php-text-template": "^1.2.1",
"phpunit/php-token-stream": "^2.0.1",
"sebastian/code-unit-reverse-lookup": "^1.0.1",
"sebastian/environment": "^3.0",
"sebastian/version": "^2.0.1",
"theseer/tokenizer": "^1.1"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
},
"suggest": {
"ext-xdebug": "^2.5.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.3.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 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-04-06T15:36:58+00:00"
},
{
"name": "phpunit/php-file-iterator",
"version": "1.4.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
"reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.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": "2017-11-27T13:52:08+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": "1.0.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
"reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
"reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Utility class for timing",
"homepage": "https://github.com/sebastianbergmann/php-timer/",
"keywords": [
"timer"
],
"time": "2017-02-26T11:10:40+00:00"
},
{
"name": "phpunit/php-token-stream",
"version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
"reference": "791198a2c6254db10131eecfe8c06670700904db"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db",
"reference": "791198a2c6254db10131eecfe8c06670700904db",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.2.4"
},
"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": "Wrapper around PHP's tokenizer extension.",
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
"keywords": [
"tokenizer"
],
"time": "2017-11-27T05:48:46+00:00"
},
{
"name": "phpunit/phpunit",
"version": "6.5.12",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "24da433d7384824d65ea93fbb462e2f31bbb494e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/24da433d7384824d65ea93fbb462e2f31bbb494e",
"reference": "24da433d7384824d65ea93fbb462e2f31bbb494e",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
"myclabs/deep-copy": "^1.6.1",
"phar-io/manifest": "^1.0.1",
"phar-io/version": "^1.0",
"php": "^7.0",
"phpspec/prophecy": "^1.7",
"phpunit/php-code-coverage": "^5.3",
"phpunit/php-file-iterator": "^1.4.3",
"phpunit/php-text-template": "^1.2.1",
"phpunit/php-timer": "^1.0.9",
"phpunit/phpunit-mock-objects": "^5.0.9",
"sebastian/comparator": "^2.1",
"sebastian/diff": "^2.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": {
"phpdocumentor/reflection-docblock": "3.0.2",
"phpunit/dbunit": "<3.0"
},
"require-dev": {
"ext-pdo": "*"
},
"suggest": {
"ext-xdebug": "*",
"phpunit/php-invoker": "^1.1"
},
"bin": [
"phpunit"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.5.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": "The PHP Unit Testing framework.",
"homepage": "https://phpunit.de/",
"keywords": [
"phpunit",
"testing",
"xunit"
],
"time": "2018-08-22T06:32:48+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
"version": "5.0.10",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/cd1cf05c553ecfec36b170070573e540b67d3f1f",
"reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.5",
"php": "^7.0",
"phpunit/php-text-template": "^1.2.1",
"sebastian/exporter": "^3.1"
},
"conflict": {
"phpunit/phpunit": "<6.0"
},
"require-dev": {
"phpunit/phpunit": "^6.5.11"
},
"suggest": {
"ext-soap": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.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": "Mock Object library for PHPUnit",
"homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
"keywords": [
"mock",
"xunit"
],
"time": "2018-08-09T05:50:03+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": "2.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "34369daee48eafb2651bea869b4b15d75ccc35f9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9",
"reference": "34369daee48eafb2651bea869b4b15d75ccc35f9",
"shasum": ""
},
"require": {
"php": "^7.0",
"sebastian/diff": "^2.0 || ^3.0",
"sebastian/exporter": "^3.1"
},
"require-dev": {
"phpunit/phpunit": "^6.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.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"
}
],
"description": "Provides the functionality to compare PHP values for equality",
"homepage": "https://github.com/sebastianbergmann/comparator",
"keywords": [
"comparator",
"compare",
"equality"
],
"time": "2018-02-01T13:46:46+00:00"
},
{
"name": "sebastian/diff",
"version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
"reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
"reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
"shasum": ""
},
"require": {
"php": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.2"
},
"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": "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"
],
"time": "2017-08-03T08:09:46+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": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=7.2"
},
"platform-dev": []
}
MIT License
Copyright (c) 2018 João Moraes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="testSuite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
<blacklist>
<directory suffix=".php">./vendor/</directory>
<exclude>
<directory suffix=".php">./vendor/</directory>
</exclude>
</blacklist>
</filter>
<logging>
<log type="coverage-html" target="tests/coverage" charset="UTF-8" yui="true" highlight="true" lowUpperBound="35" highLowerBound="70" />
</logging>
</phpunit>
# FcPhp Datasource
Abstract class to Datasource FcPhp
[![Build Status](https://travis-ci.org/00F100/fcphp-datasource.svg?branch=master)](https://travis-ci.org/00F100/fcphp-datasource) [![codecov](https://codecov.io/gh/00F100/fcphp-datasource/branch/master/graph/badge.svg)](https://codecov.io/gh/00F100/fcphp-datasource)
[![PHP Version](https://img.shields.io/packagist/php-v/00f100/fcphp-datasource.svg)](https://packagist.org/packages/00F100/fcphp-datasource) [![Packagist Version](https://img.shields.io/packagist/v/00f100/fcphp-datasource.svg)](https://packagist.org/packages/00F100/fcphp-datasource) [![Total Downloads](https://poser.pugx.org/00F100/fcphp-datasource/downloads)](https://packagist.org/packages/00F100/fcphp-datasource)
## How to install
Composer:
```sh
$ composer require 00f100/fcphp-datasource
```
or add in composer.json
```json
{
"require": {
"00f100/fcphp-datasource": "*"
}
}
```
## How to use
This class is abstract. Have methods default to connect, disconnect, execute Query and get Strategy to use in Query.
See:
- [Datasource Integration Test](tests/Integration/DatasourceIntegrationTest.php)
- [Datasource Interface](src/Interfaces/IDatasource.php)
- [Query Interface](src/Interfaces/IQuery.php)
- [Strategy Interface](src/Interfaces/IStrategy.php)
<?php
namespace FcPhp\Datasource
{
use FcPhp\Datasource\Interfaces\IFactory;
use FcPhp\Datasource\Interfaces\ICriteria;
abstract class Criteria implements ICriteria
{
protected $criteria;
protected $factory;
protected $where = [];
protected $conditionString;
protected $conditionInt;
protected $conditionOr;
protected $conditionAnd;
protected $conditionSpace;
public function __construct(string $criteria, IFactory $factory)
{
$this->criteria = $criteria;
$this->factory = $factory;
}
public function getCriteria()
{
return $this->factory->getCriteria($this->criteria);
}
/**
* Method to add "or" condition
*
* @param object $callback Callback to add conditions "or"
* @return FcPhp\Datasource\Interfaces\ICriteria
*/
public function or(object $callback) :ICriteria
{
$criteria = $this->getCriteria();
$callback($criteria);
$this->where[] = $this->conditionOr;
$this->where[] = $criteria->getWhere();
unset($criteria);
unset($callback);
return $this;
}
/**
* Method to add "and" condition
*
* @param object $callback Callback to add conditions "and"
* @return FcPhp\Datasource\Interfaces\ICriteria
*/
public function and(object $callback) :ICriteria
{
$criteria = $this->getCriteria();
$callback($criteria);
$this->where[] = $this->conditionAnd;
$this->where[] = $criteria->getWhere();
unset($criteria);
unset($callback);
return $this;
}
/**
* Method to add condition
*
* @param string $field Field to add condition
* @param string $condition Condition to compare
* @param string|int|bool $value Value to compare
* @return FcPhp\Datasource\Interfaces\ICriteria
*/
public function condition(string $field, string $condition, $value, bool $isColumn = false) :ICriteria
{
if(is_string($value) && !$isColumn) {
$value = sprintf($this->conditionString, $value);
}
if(is_int($value) || $isColumn) {
$value = sprintf($this->conditionInt, $value);
}
$this->where[] = $field . $this->conditionSpace . $condition . $this->conditionSpace . $value;
return $this;
}
public function getWhere() :array
{
return $this->where;
}
}
}
<?php
namespace FcPhp\Datasource
{
use FcPhp\Datasource\Interfaces\IQuery;
use FcPhp\Datasource\Interfaces\IDatasource;
abstract class Datasource implements IDatasource
{
protected $isConnected;
protected $strategy;
/**
* Method to construct instance
*
* @param string $strategy Strategy to use
*/
public function __construct(string $strategy)
{
$this->strategy = $strategy;
}
/**
* Method to connect
*
* @return bool
*/
public function connect() :bool
{
return false;
}
/**
* Method to disconnect
*
* @return bool
*/
public function disconnect() :bool
{
return false;
}
/**
* Method to execute query
*
* @return array
*/
public function execute(IQuery $query) :array
{
return [];
}
/**
* Method to return strategy of query
*
* @return string
*/
public function getStrategy() :string
{
return return $this->strategy;
}
}
}
<?php
namespace FcPhp\Datasource\Exceptions
{
use Exception;
class StrategyMethodNotFoundException extends Exception
{
}
}
<?php
namespace FcPhp\Datasource\Exceptions
{
use Exception;
class StrategyNotFoundException extends Exception
{
}
}
<?php
namespace FcPhp\Datasource\Factories
{
use FcPhp\Di\Interfaces\IDi;
use FcPhp\Di\Facades\DiFacade;
use FcPhp\Datasource\Interfaces\IFactory;
use FcPhp\Datasource\Query;
use FcPhp\Datasource\Interfaces\IQuery;
use FcPhp\Datasource\Interfaces\IStrategy;
use FcPhp\Datasource\Interfaces\ICriteria;
use FcPhp\Datasource\Criteria;
use FcPhp\Datasource\Exceptions\StrategyNotFoundException;
class Factory implements IFactory
{
private $strategies = [];
// private $strategies = [
// 'mysql' => 'FcPhp/Datasource/MySQL/Strategies/MySQLStrategy',
// 'postgresql' => 'FcPhp/PostgreSQL/Strategies/PostgreSQL',
// 'sqlserver' => 'FcPhp/SQLServer/Strategies/SQLServer',
// 'sqlite' => 'FcPhp/SQLite/Strategies/SQLite',
// 'mongodb' => 'FcPhp/MongoDB/Strategies/MongoDB',
// 'soap' => 'FcPhp/SOAP/Strategies/SOAP',
// 'ldap' => 'FcPhp/Ldap/Strategies/Ldap',
// 'rest' => 'FcPhp/Rest/Strategies/Rest',
// 'file' => 'FcPhp/File/Strategies/File',
// 'amazon-bucket' => 'FcPhp/Amazon/Strategies/Bucket',
// 'amazon-log' => 'FcPhp/Amazon/Strategies/Log',
// 'amazon-sqs' => 'FcPhp/Amazon/Strategies/Sqs',
// 'amazon-redshift' => 'FcPhp/Amazon/Strategies/Redshift',
// ];
private $criteria;
private $criterias = [];
// private $criterias = [
// 'mysql' => 'FcPhp/Datasource/MySQL/Criterias/MySQL',
// 'postgresql' => 'FcPhp/PostgreSQL/Criterias/PostgreSQL',
// 'sqlserver' => 'FcPhp/SQLServer/Criterias/SQLServer',
// 'sqlite' => 'FcPhp/SQLite/Criterias/SQLite',
// 'mongodb' => 'FcPhp/MongoDB/Criterias/MongoDB',
// 'soap' => 'FcPhp/SOAP/Criterias/SOAP',
// 'ldap' => 'FcPhp/Ldap/Criterias/Ldap',
// 'rest' => 'FcPhp/Rest/Criterias/Rest',
// 'file' => 'FcPhp/File/Criterias/File',
// 'amazon-bucket' => 'FcPhp/Amazon/Criterias/Bucket',
// 'amazon-log' => 'FcPhp/Amazon/Criterias/Log',
// 'amazon-sqs' => 'FcPhp/Amazon/Criterias/Sqs',
// 'amazon-redshift' => 'FcPhp/Amazon/Criterias/Redshift',
// ];
public function __construct(array $strategies, array $criterias, IDi $di = null)
{
$this->strategies = $strategies;
// $this->criteria = $criteria;
$this->criterias = $criterias;
// $this->strategy = $strategy;
$this->di = $di;
}
public function getQuery(string $strategy) :IQuery
{
if(!isset($this->strategies[$strategy])) {
throw new StrategyNotFoundException();
}
$strategy = $this->strategies[$strategy];
if($this->di instanceof IDi) {
if(!$this->di->has('FcPhp/Datasource/Query')) {
$this->di->setNonSingleton('FcPhp/Datasource/Query', 'FcPhp\Datasource\Query');
}
return $this->di->make('FcPhp/Datasource/Query', ['strategy' => $this->getStrategy($strategy)]);
}
return new Query($this->getStrategy($strategy));
}
public function getCriteria(string $criteria) :ICriteria
{
$factory = $this;
if(isset($this->criterias[$criteria])) {
$alias = $this->criterias[$criteria];
$namespace = str_replace('/', '\\', $alias);
if($this->di instanceof IDi) {
if(!$this->di->has($alias)) {
$this->di->setNonSingleton($alias, $namespace);
}
return $this->di->make($alias, compact('criteria', 'factory'));
}
return new $namespace($factory);
}
}
private function getStrategy(string $alias) :IStrategy
{
$namespace = str_replace('/', '\\', $alias);
if($this->di instanceof IDi) {
if(!$this->di->has($alias)) {
$this->di->setNonSingleton($alias, $namespace);
}
$factory = $this;
return $this->di->make($alias, ['factory' => $factory]);
}
return new $namespace();
}
}
}
<?php
namespace FcPhp\Datasource\Interfaces
{
interface ICriteria
{
public function __construct(string $criteria, IFactory $factory);
public function getCriteria();
public function or(object $callback) :ICriteria;
public function and(object $callback) :ICriteria;
public function condition(string $field, string $condition, $value) :ICriteria;
public function getWhere() :array;
}
}
<?php
namespace FcPhp\Datasource\Interfaces
{
interface IDatasource
{
/**
* Method to connect
*
* @return bool
*/
public function connect() :bool;
/**
* Method to disconnect
*
* @return bool
*/
public function disconnect() :bool;
/**
* Method to execute query
*
* @return array
*/
public function execute(IQuery $query) :array;
/**
* Method to return strategy of query
*
* @return string|null
*/
public function getStrategy();
}
}
<?php
namespace FcPhp\Datasource\Interfaces
{
use FcPhp\Di\Interfaces\IDi;
interface IFactory
{
public function __construct(array $strategies, array $criterias, IDi $di = null);
public function getQuery(string $strategy) :IQuery;
public function getCriteria(string $criteria) :ICriteria;
}
}
<?php
namespace FcPhp\Datasource\Interfaces
{
interface IQuery
{
public function __construct(IStrategy $strategy);
public function __call(string $method, array $args = []);
}
}
<?php
namespace FcPhp\Datasource\Interfaces
{
use FcPhp\Query\Interfaces\IQuery;
interface IStrategy
{
}
}
<?php
namespace FcPhp\Datasource
{
use FcPhp\Datasource\Interfaces\IQuery;
use FcPhp\Datasource\Interfaces\IFactory;
use FcPhp\Datasource\Interfaces\IStrategy;
use FcPhp\Datasource\Exceptions\StrategyNotFoundException;
use FcPhp\Datasource\Exceptions\StrategyMethodNotFoundException;
class Query implements IQuery
{
private $instance;
private $strategy;
private $factory;
public function __construct(IStrategy $strategy)
{
$this->strategy = $strategy;
}
public function __call(string $method, array $args = [])
{
if(method_exists($this->strategy, $method)) {
return call_user_func_array([$this->strategy, $method], $args);
}
throw new StrategyMethodNotFoundException();
}
}
}
<?php
namespace FcPhp\Datasource
{
use FcPhp\Datasource\Interfaces\IStrategy;
use FcPhp\Datasource\Interfaces\IFactory;
abstract class Strategy implements IStrategy
{
protected $factory;
protected $criteria;
public function __construct(string $criteria, IFactory $factory)
{
$this->criteria = $criteria;
$this->factory = $factory;
}
protected function getCriteria()
{
return $this->factory->getCriteria($this->criteria);
}
}
}
<?php
use PHPUnit\Framework\TestCase;
use FcPhp\Di\Facades\DiFacade;
use FcPhp\Datasource\Query;
use FcPhp\Datasource\Datasource;
use FcPhp\Datasource\Strategy;
use FcPhp\Datasource\Interfaces\IDatasource;
use FcPhp\Datasource\Interfaces\IStrategy;
use FcPhp\Datasource\Interfaces\IQuery;
use FcPhp\Datasource\Factories\Factory;
class DatasourceIntegrationTest extends TestCase
{
public function setUp()
{
$this->di = DiFacade::getInstance();
$this->strategies = [
'datasource' => '\MockStrategyIntegration'
];
$this->factory = new Factory('datasource', $this->strategies, $this->di);
// $this->strategy = $this->factory->getStrategy();
$this->query = $this->factory->getQuery();
$this->instance = new MockIntergrationDatasource();
}
public function testInstance()
{
$this->assertInstanceOf(IDatasource::class, $this->instance);
$this->assertEquals(false, $this->instance->connect());
$this->assertEquals(false, $this->instance->disconnect());
$this->assertEquals(null, $this->instance->getStrategy());
$this->assertEquals([], $this->instance->execute($this->query));
}
public function testQuerySelect()
{
$this->assertInstanceOf(IStrategy::class, $this->query->select());
}
public function testQueryFrom()
{
$this->assertInstanceOf(IStrategy::class, $this->query->from());
}
public function testQueryWhere()
{
$this->assertInstanceOf(IStrategy::class, $this->query->where());
}
/**
* @expectedException FcPhp\Datasource\Exceptions\StrategyMethodNotFoundException
*/
public function testCallMethodNotFoundStrategy()
{
$this->query->notFound();
}
/**
* @expectedException FcPhp\Datasource\Exceptions\StrategyNotFoundException
*/
public function testExceptionStrategyNotFound()
{
$this->factory = new Factory('notfound', $this->strategies, $this->di);
$this->query = $this->factory->getQuery();
}
public function testNonUseDi()
{
$this->factory = new Factory('datasource', $this->strategies, null);
$this->query = $this->factory->getQuery();
$this->assertInstanceOf(IQuery::class, $this->query);
}
public function testGetCriteria()
{
$criteria = $this->factory->getCriteria();
$this->assertInstanceOf(ICriteria::class, $criteria);
}
}
class MockIntergrationDatasource extends Datasource
{
}
class MockStrategyIntegration extends Strategy
{
}
<?php
use PHPUnit\Framework\TestCase;
use FcPhp\Datasource\Datasource;
use FcPhp\Datasource\Interfaces\IDatasource;
use FcPhp\Datasource\Interfaces\IQuery;
class DatasourceUnitTest extends TestCase
{
public function setUp()
{
$this->query = $this->createMock('FcPhp\Datasource\Interfaces\IQuery');
$this->instance = new MockDatasource();
}
public function testInstance()
{
$this->assertInstanceOf(IDatasource::class, $this->instance);
$this->assertEquals(false, $this->instance->connect());
$this->assertEquals(false, $this->instance->disconnect());
$this->assertEquals(null, $this->instance->getStrategy());
$this->assertEquals([], $this->instance->execute($this->query));
}
}
class MockDatasource extends Datasource
{
}
<?php
use PHPUnit\Framework\TestCase;
use FcPhp\Datasource\Query;
use FcPhp\Datasource\Interfaces\IQuery;
class QueryUnitTest extends TestCase
{
public function setUp()
{
$this->strategy = $this->getMockBuilder('FcPhp\Datasource\Interfaces\IStrategy')
->setMethods(['getContent'])
->getMock();
$this->strategy
->expects($this->any())
->method('getContent')
->will($this->returnValue('content'));
$this->instance = new Query($this->strategy);
}
public function testInstance()
{
$this->assertInstanceOf(IQuery::class, $this->instance);
}
public function testCallMethodStrategy()
{
$this->assertEquals('content', $this->instance->getContent());
}
/**
* @expectedException FcPhp\Datasource\Exceptions\StrategyMethodNotFoundException
*/
public function testCallMethodNotFoundStrategy()
{
$this->instance->notFound();
}
}
<?php
use PHPUnit\Framework\TestCase;
use FcPhp\Datasource\Strategy;
use FcPhp\Datasource\Interfaces\IStrategy;
class StrategyUnitTest extends TestCase
{
public function setUp()
{
$this->instance = new MockStrategyUnit();
}
public function testInstance()
{
$this->assertInstanceOf(IStrategy::class, $this->instance);
}
public function testSelect()
{
$this->assertInstanceOf(IStrategy::class, $this->instance->select());
}
public function testFrom()
{
$this->assertInstanceOf(IStrategy::class, $this->instance->from());
}
public function testWhere()
{
$this->assertInstanceOf(IStrategy::class, $this->instance->where());
}
}
class MockStrategyUnit extends Strategy
{
}