Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing function imports #1309

Merged
merged 3 commits into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use InvalidArgumentException;

use function array_unique;
use function str_contains;
use function str_replace;
use function basename;
use function realpath;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use function number_format;
use function microtime;
use function sprintf;
use function sizeof;

class ValidateCommand extends Command
{
Expand Down
2 changes: 2 additions & 0 deletions packages/framework/src/Console/ConsoleServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
use Illuminate\Console\Application as Artisan;
use Illuminate\Support\ServiceProvider;

use function in_array;

/**
* Register the HydeCLI console commands.
*/
Expand Down
2 changes: 2 additions & 0 deletions packages/framework/src/Facades/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

use TypeError;

use function sprintf;

/**
* An extension of the Laravel Config facade with extra
* accessors that ensure the types of the returned values.
Expand Down
2 changes: 2 additions & 0 deletions packages/framework/src/Facades/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\File;

use function app;

/**
* Proxies the Laravel File facade with extra features and helpers tailored for HydePHP.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
use Illuminate\Support\HtmlString;
use Illuminate\Support\Str;

use function str_ireplace;
use function str_replace;
use function trim;
use function ucfirst;

/**
* @internal Single-use trait for the HydeKernel class.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use function array_merge;
use function dirname;
use function in_array;
use function is_dir;
use function tap;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use function basename;
use function glob;
use function str_starts_with;

/**
* The FileCollection contains all the discovered source files.
Expand Down
1 change: 1 addition & 0 deletions packages/framework/src/Foundation/Kernel/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use function is_string;
use function is_array;
use function collect;
use function str_starts_with;
use function unslash;
use function unlink;
use function touch;
Expand Down
2 changes: 2 additions & 0 deletions packages/framework/src/Foundation/Kernel/Hyperlinks.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use Hyde\Framework\Exceptions\FileNotFoundException;
use Illuminate\Support\Str;

use function str_ends_with;
use function str_starts_with;
use function substr_count;
use function file_exists;
use function str_replace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
use RuntimeException;

use function file_get_contents;
use function str_ends_with;
use function str_starts_with;
use function substr_count;
use function json_decode;
use function explode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
namespace Hyde\Framework\Actions;

use function rtrim;
use function str_ends_with;
use function str_starts_with;
use function substr;
use function explode;
use function implode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use function file_exists;
use function basename;
use function in_array;
use function str_contains;
use function unslash;
use function rtrim;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
use Hyde\Markdown\Models\MarkdownDocument;
use Spatie\YamlFrontMatter\YamlFrontMatter;

use function str_starts_with;

/**
* Prepares a Markdown file for further usage by extracting the Front Matter
* and Markdown body, and creating MarkdownDocument object from them.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
use Hyde\Framework\Features\BuildTasks\PreBuildTask;
use Illuminate\Support\Facades\File;

use function array_map;
use function basename;
use function glob;
use function in_array;
use function sprintf;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

use function basename;
use function dirname;
use function str_contains;
use function str_ends_with;
use function str_starts_with;
use function substr;
use function trim;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use function filesize;
use function sprintf;
use function key;
use function str_starts_with;

/**
* Object representation of a blog post's featured image.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Hyde\Framework\Features\Metadata\MetadataElementContract;

use function sprintf;
use function str_starts_with;
use function substr;
use function e;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Hyde\Pages\Concerns\HydePage;
use Hyde\Pages\MarkdownPost;

use function str_starts_with;
use function substr_count;
use function str_repeat;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
use Hyde\Pages\DocumentationPage;
use Hyde\Support\Models\ValidationResult as Result;

use function count;
use function get_class_methods;
use function array_intersect;
use function file_exists;
use function implode;
use function sprintf;
use function str_starts_with;

class ValidationService
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;

use function count;
use function explode;
use function view;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Illuminate\Support\Facades\Blade;

use function html_entity_decode;
use function str_starts_with;
use function strtolower;
use function array_map;
use function explode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
use Illuminate\Support\HtmlString;

use function preg_replace;
use function str_contains;
use function str_ireplace;
use function str_starts_with;
use function strtolower;
use function str_replace;
use function explode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use function str_replace;
use function sprintf;
use function str_starts_with;
use function strlen;
use function substr;
use function trim;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use function array_map;
use function explode;
use function implode;
use function str_contains;
use function strpos;
use function substr;

Expand Down
5 changes: 5 additions & 0 deletions packages/framework/src/Pages/Concerns/BaseMarkdownPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
use Hyde\Markdown\Models\FrontMatter;
use Hyde\Markdown\Models\Markdown;

use function dirname;
use function ltrim;
use function trim;
use function view;

/**
* The base class for all Markdown-based page models.
*
Expand Down
2 changes: 2 additions & 0 deletions packages/framework/src/Pages/InMemoryPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
use Hyde\Pages\Concerns\HydePage;
use Illuminate\Support\Facades\View;

use function sprintf;

/**
* Extendable class for in-memory (or virtual) Hyde pages that are not based on any source files.
*
Expand Down
2 changes: 2 additions & 0 deletions packages/framework/src/Support/DataCollections.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
use Illuminate\Support\Collection;
use Illuminate\Support\Str;

use function implode;
use function json_decode;
use function sprintf;
use function unslash;

/**
Expand Down
2 changes: 2 additions & 0 deletions packages/framework/src/Support/Filesystem/SourceFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

use Hyde\Pages\Concerns\HydePage;

use function array_merge;

/**
* File abstraction for a project source file.
*
Expand Down
5 changes: 5 additions & 0 deletions packages/framework/src/Support/Includes.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
use Hyde\Markdown\Models\Markdown;
use Illuminate\Support\Facades\Blade;

use function basename;
use function file_exists;
use function file_get_contents;
use function mkdir;

/**
* The Includes facade provides a simple way to access partials in the includes directory.
*
Expand Down
1 change: 1 addition & 0 deletions packages/framework/src/Support/Models/Redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Hyde\Pages\InMemoryPage;
use Illuminate\Support\Facades\View;

use function str_ends_with;
use function substr;

/**
Expand Down
2 changes: 2 additions & 0 deletions packages/framework/src/Support/Models/RenderData.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
use Illuminate\Support\Facades\View;
use InvalidArgumentException;

use function property_exists;

/**
* Contains data for the current page being rendered/compiled.
*
Expand Down
6 changes: 6 additions & 0 deletions packages/framework/src/Support/Models/RouteList.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
use Hyde\Hyde;
use Illuminate\Contracts\Support\Arrayable;

use function array_keys;
use function array_map;
use function collect;
use function str_replace;
use function ucwords;

/**
* @internal This class is experimental and is subject to change.
*
Expand Down
3 changes: 3 additions & 0 deletions packages/framework/src/Support/Models/RouteListItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
use Hyde\Pages\InMemoryPage;
use Illuminate\Contracts\Support\Arrayable;

use function class_basename;
use function str_starts_with;

/**
* @internal This class is experimental and is subject to change.
*
Expand Down