diff --git a/.gitignore b/.gitignore index aad7e04..f068801 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ # test.php -tool.bat tool.sh composer.lock composer.bak.json diff --git a/composer.json b/composer.json index 3a58d4d..3d76e15 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "xeriab/konfig", "description": "Yet another simple configuration loader library.", "homepage": "http://xeriab.github.io/projects/konfig/", - "version": "0.1.9", + "version": "0.2.0", "license": "MIT", "type": "library", "keywords": [ @@ -33,9 +33,9 @@ "source": "https://github.com/xeriab/konfig" }, "suggest": { - "yosymfony/toml": "Required to use and support TOML", - "symfony/yaml": "Required to use and support YAML", - "nette/neon": "Required to use and support the NEON notation" + "yosymfony/toml": "~0.3.3", + "symfony/yaml": "~2.8.12", + "nette/neon": "~2.3.5" }, "require": { "php": ">=5.4.0" @@ -44,7 +44,7 @@ "yosymfony/toml": "~0.3.3", "symfony/yaml": "~2.8.12", "nette/neon": "~2.3.5", - "phpunit/phpunit": "~4.8.27", + "phpunit/phpunit": ">=4.8 < 6.0", "scrutinizer/ocular": "~1.3.1", "squizlabs/php_codesniffer": "~3.0.0RC1" }, diff --git a/src/Arr.php b/src/Arr.php index 557d4c2..0f07d27 100644 --- a/src/Arr.php +++ b/src/Arr.php @@ -27,7 +27,7 @@ final class Arr * @codeCoverageIgnore * @since 0.1.0 */ - public static function get(array $array, $key, string $default = null) + public static function get(array $array, $key, $default = null) { if (!is_array($array) && !$array instanceof \ArrayAccess) { throw new \InvalidArgumentException('First parameter must be an array or ArrayAccess object.'); @@ -70,7 +70,7 @@ public static function get(array $array, $key, string $default = null) * @codeCoverageIgnore * @since 0.1.0 */ - public static function set(array &$array, $key, string $value = null) + public static function set(array &$array, $key, $value = null) { if (is_null($key)) { $array = $value; @@ -187,7 +187,7 @@ public static function mergeAssoc() * @codeCoverageIgnore * @since 0.1.0 */ - public static function delete(array &$array, string $key) + public static function delete(array &$array, $key) { if (is_null($key)) { return false; @@ -232,7 +232,7 @@ public static function delete(array &$array, string $key) * @codeCoverageIgnore * @since 0.1.0 */ - public static function keys(array $array, int $maxDepth = INF, int $depth = 0, array $arraykeys = []) + public static function keys(array $array, $maxDepth = INF, $depth = 0, array $arraykeys = []) { if ($depth < $maxDepth) { $depth++; @@ -252,12 +252,12 @@ public static function keys(array $array, int $maxDepth = INF, int $depth = 0, a * Get array keys recursively * * @param array $array The search array - * @param type $search The search value + * @param string $search The search value * @return array * @codeCoverageIgnore * @since 0.1.2 */ - public static function recursiveKeys(array $array, string $search = null) + public static function recursiveKeys(array $array, $search = null) { $return = ( $search !== null ? diff --git a/src/Exception/ParseException.php b/src/Exception/ParseException.php index b23567e..397a7c1 100644 --- a/src/Exception/ParseException.php +++ b/src/Exception/ParseException.php @@ -33,7 +33,7 @@ public function __construct(array $error) $lineNo = isset($error['line']) ? $error['line'] : __LINE__; $exception = isset($error['exception']) ? $error['exception'] : null; $snippet = isset($error['snippet']) ? $error['snippet'] : null; - $previous = isset($error['previous']) ? $error['previous'] : null; + // $previous = isset($error['previous']) ? $error['previous'] : null; $this->parsedFile = $fileName; $this->parsedLine = $lineNo;