diff --git a/README.md b/README.md index 9372545..0c3d84d 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Instead, you may of course manually update your `require-dev` block and run `com ```json { "require-dev": { - "andrey-helldar/pretty-array": "^1.0" + "andrey-helldar/pretty-array": "^2.0" } } ``` diff --git a/composer.json b/composer.json index 613bb8c..d7f8c89 100644 --- a/composer.json +++ b/composer.json @@ -15,10 +15,10 @@ } ], "require": { - "php": "^7.1.3|^8.0", + "php": "^7.2.5|^8.0", "ext-dom": "*", "ext-mbstring": "*", - "andrey-helldar/support": "^1.16.0" + "andrey-helldar/support": "^2.0" }, "require-dev": { "phpstan/phpstan": "^0.12.7", @@ -29,12 +29,12 @@ }, "autoload": { "psr-4": { - "Helldar\\PrettyArray\\": "src/" + "Helldar\\PrettyArray\\": "src" } }, "autoload-dev": { "psr-4": { - "Tests\\": "tests/" + "Tests\\": "tests" } }, "config": { diff --git a/src/Concerns/HasCases.php b/src/Concerns/HasCases.php index 39e9684..a8484be 100644 --- a/src/Concerns/HasCases.php +++ b/src/Concerns/HasCases.php @@ -3,7 +3,7 @@ namespace Helldar\PrettyArray\Concerns; use Helldar\PrettyArray\Exceptions\UnknownCaseTypeException; -use Helldar\Support\Facades\Str; +use Helldar\Support\Facades\Helpers\Str; trait HasCases { diff --git a/src/Services/File.php b/src/Services/File.php index 4ae1f66..8abc12e 100644 --- a/src/Services/File.php +++ b/src/Services/File.php @@ -3,8 +3,9 @@ namespace Helldar\PrettyArray\Services; use Helldar\PrettyArray\Exceptions\FileDoesntExistsException; -use Helldar\Support\Facades\File as FileSupport; -use Helldar\Support\Tools\Stub; +use Helldar\Support\Facades\Helpers\Filesystem\File as FileSupport; +use Helldar\Support\Facades\Tools\Stub; +use Helldar\Support\Tools\Stub as StubTool; class File { @@ -43,7 +44,7 @@ public function loadRaw(string $filename) public function store(string $path): void { - $content = Stub::replace(Stub::CONFIG_FILE, [ + $content = Stub::replace(StubTool::PHP_ARRAY, [ '{{slot}}' => $this->content, ]); diff --git a/src/Services/Formatter.php b/src/Services/Formatter.php index 76fe867..1641095 100644 --- a/src/Services/Formatter.php +++ b/src/Services/Formatter.php @@ -5,7 +5,7 @@ use Helldar\PrettyArray\Concerns\HasCases; use Helldar\PrettyArray\Concerns\HasCastable; use Helldar\PrettyArray\Contracts\Caseable; -use Helldar\Support\Facades\Arr; +use Helldar\Support\Facades\Helpers\Arr; final class Formatter implements Caseable { @@ -86,7 +86,7 @@ protected function key($key, int $size = 0) protected function sizeKeys(array $array): int { - $sizes = Arr::sizeOfMaxValue( + $sizes = Arr::longestStringLength( array_keys($array) );