Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Mar 13, 2023
2 parents 4b0c7eb + 4bea669 commit 51eaf9b
Show file tree
Hide file tree
Showing 121 changed files with 145 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
'torchlight-enabled' => $document->hasTorchlight()])>
@yield('content')

<header id="document-header" class="flex items-center flex-wrap prose-h1:mb-3">
<header id="document-header" class="flex items-center flex-wrap justify-between prose-h1:mb-3">
{{ $document->renderHeader() }}
</header>
<section id="document-main-content" itemprop="articleBody">
Expand Down
1 change: 1 addition & 0 deletions src/Console/Commands/BuildSiteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Hyde\Console\Concerns\Command;
use Hyde\Framework\Services\BuildService;
use Hyde\Framework\Services\BuildTaskService;

use function memory_get_peak_usage;
use function number_format;
use function array_search;
Expand Down
1 change: 1 addition & 0 deletions src/Console/Commands/ChangeSourceDirectoryCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Hyde\Pages\DocumentationPage;
use Hyde\Console\Concerns\Command;
use InvalidArgumentException;

use function array_unique;
use function str_replace;
use function basename;
Expand Down
1 change: 1 addition & 0 deletions src/Console/Commands/DebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Hyde\Facades\Config;
use Composer\InstalledVersions;
use LaravelZero\Framework\Commands\Command;

use function str_replace;
use function realpath;
use function app;
Expand Down
1 change: 1 addition & 0 deletions src/Console/Commands/MakePageCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Hyde\Pages\DocumentationPage;
use Hyde\Pages\MarkdownPage;
use LaravelZero\Framework\Commands\Command;

use function strtolower;
use function ucfirst;

Expand Down
1 change: 1 addition & 0 deletions src/Console/Commands/MakePostCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Exception;
use Hyde\Console\Concerns\Command;
use Hyde\Framework\Actions\CreatesNewMarkdownPostFile;

use function is_string;
use function sprintf;
use function ucwords;
Expand Down
1 change: 1 addition & 0 deletions src/Console/Commands/PublishConfigsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Hyde\Hyde;
use Hyde\Console\Concerns\Command;
use Illuminate\Support\Facades\Artisan;

use function array_search;
use function sprintf;

Expand Down
1 change: 1 addition & 0 deletions src/Console/Commands/PublishHomepageCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Hyde\Framework\Services\ViewDiffService;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Collection;

use function Hyde\unixsum_file;
use function array_key_exists;
use function file_exists;
Expand Down
1 change: 1 addition & 0 deletions src/Console/Commands/PublishViewsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Hyde\Console\Concerns\Command;
use Illuminate\Support\Facades\Artisan;

use function str_replace;
use function sprintf;
use function strstr;
Expand Down
1 change: 1 addition & 0 deletions src/Console/Commands/RebuildPageCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Hyde\Pages\MarkdownPage;
use Hyde\Pages\MarkdownPost;
use Illuminate\Console\OutputStyle;

use function dirname;
use function file_exists;
use function in_array;
Expand Down
1 change: 1 addition & 0 deletions src/Console/Commands/RouteListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Hyde\Support\Models\Route;
use Hyde\Support\Models\RouteList;
use Hyde\Support\Models\RouteListItem;

use function file_exists;
use function sprintf;

Expand Down
1 change: 1 addition & 0 deletions src/Console/Commands/ServeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Hyde\Facades\Config;
use Illuminate\Support\Facades\Process;
use LaravelZero\Framework\Commands\Command;

use function sprintf;

/**
Expand Down
1 change: 1 addition & 0 deletions src/Console/Commands/ValidateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Hyde\Framework\Concerns\TracksExecutionTime;
use Hyde\Framework\Services\ValidationService;
use LaravelZero\Framework\Commands\Command;

use function number_format;
use function microtime;
use function sprintf;
Expand Down
1 change: 1 addition & 0 deletions src/Console/Commands/VendorPublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Illuminate\Foundation\Console\VendorPublishCommand as BaseCommand;
use Illuminate\Support\ServiceProvider;
use NunoMaduro\LaravelConsoleSummary\LaravelConsoleSummaryServiceProvider;

use function ltrim;
use function realpath;
use function sprintf;
Expand Down
1 change: 1 addition & 0 deletions src/Console/Concerns/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Hyde\Hyde;
use Hyde\Facades\Config;
use LaravelZero\Framework\Commands\Command as BaseCommand;

use function array_keys;
use function array_values;
use function realpath;
Expand Down
3 changes: 2 additions & 1 deletion src/Facades/Features.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Hyde\Support\Contracts\SerializableContract;
use Hyde\Framework\Concerns\Internal\MockableFeatures;
use Illuminate\Support\Str;

use function get_class_methods;
use function extension_loaded;
use function str_starts_with;
Expand Down Expand Up @@ -178,7 +179,7 @@ public function toArray(): array
return collect(get_class_methods(static::class))
->filter(fn (string $method): bool => str_starts_with($method, 'has'))
->mapWithKeys(fn (string $method): array => [
Str::kebab(substr($method, 3)) => (static::{$method}()),
Str::kebab(substr($method, 3)) => static::{$method}(),
])->toArray();
}

Expand Down
1 change: 1 addition & 0 deletions src/Foundation/Concerns/ManagesExtensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use BadMethodCallException;
use InvalidArgumentException;

use function array_keys;
use function array_map;
use function array_merge;
Expand Down
1 change: 1 addition & 0 deletions src/Foundation/Concerns/ManagesHydeKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Hyde\Foundation\Concerns;

use Hyde\Foundation\HydeKernel;

use function ltrim;
use function rtrim;

Expand Down
1 change: 1 addition & 0 deletions src/Foundation/ConsoleKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use LaravelZero\Framework\Kernel;
use Hyde\Foundation\Internal\LoadYamlConfiguration;

use function array_combine;
use function array_splice;
use function array_values;
Expand Down
1 change: 1 addition & 0 deletions src/Foundation/HydeCoreExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Hyde\Pages\DocumentationPage;
use Hyde\Foundation\Concerns\HydeExtension;
use Hyde\Facades\Features;

use function array_filter;
use function array_keys;

Expand Down
2 changes: 2 additions & 0 deletions src/Foundation/Internal/LoadConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\Config\Repository as RepositoryContract;
use Illuminate\Foundation\Bootstrap\LoadConfiguration as BaseLoadConfiguration;

use function array_merge;
use function dirname;
use function is_dir;
Expand Down Expand Up @@ -60,6 +61,7 @@ private function mergeConfigurationFile(RepositoryContract $repository, string $
* Provide support for running Hyde in a Phar archive.
*
* @experimental
*
* @codeCoverageIgnore
*/
private static function providePharSupportIfNeeded(array &$files): void
Expand Down
1 change: 1 addition & 0 deletions src/Foundation/Internal/LoadYamlConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Hyde\Hyde;
use Hyde\Facades\Config;
use Symfony\Component\Yaml\Yaml;

use function file_get_contents;
use function array_merge;
use function file_exists;
Expand Down
2 changes: 2 additions & 0 deletions src/Foundation/Kernel/FileCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
use Hyde\Framework\Exceptions\FileNotFoundException;
use Hyde\Pages\Concerns\HydePage;
use Hyde\Support\Filesystem\SourceFile;

use function basename;
use function glob;

/**
* The FileCollection contains all the discovered source files.
*
* @template T of \Hyde\Support\Filesystem\SourceFile
*
* @template-extends \Hyde\Foundation\Concerns\BaseFoundationCollection<string, T>
*
* @property array<string, SourceFile> $items The files in the collection.
Expand Down
1 change: 1 addition & 0 deletions src/Foundation/Kernel/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Hyde\Foundation\HydeKernel;
use Hyde\Foundation\PharSupport;
use Illuminate\Support\Collection;

use function Hyde\normalize_slashes;
use function Hyde\path_join;
use function file_exists;
Expand Down
1 change: 1 addition & 0 deletions src/Foundation/Kernel/Hyperlinks.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Hyde\Framework\Exceptions\BaseUrlNotSetException;
use Hyde\Framework\Exceptions\FileNotFoundException;
use Illuminate\Support\Str;

use function substr_count;
use function file_exists;
use function str_replace;
Expand Down
1 change: 1 addition & 0 deletions src/Foundation/Kernel/PageCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* The PageCollection contains all the instantiated pages.
*
* @template T of \Hyde\Pages\Concerns\HydePage
*
* @template-extends \Hyde\Foundation\Concerns\BaseFoundationCollection<string, T>
*
* @property array<string, HydePage> $items The pages in the collection.
Expand Down
1 change: 1 addition & 0 deletions src/Foundation/Kernel/RouteCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* The RouteCollection contains all the routes, making it the Pseudo-Router for Hyde.
*
* @template T of \Hyde\Support\Models\Route
*
* @template-extends \Hyde\Foundation\Concerns\BaseFoundationCollection<string, T>
*
* @property array<string, Route> $items The routes in the collection.
Expand Down
1 change: 1 addition & 0 deletions src/Foundation/PharSupport.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Hyde\Hyde;
use Phar;
use BadMethodCallException;

use function dirname;
use function is_dir;
use function rtrim;
Expand Down
1 change: 1 addition & 0 deletions src/Foundation/Providers/ConfigurationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Hyde\Foundation\Providers;

use Illuminate\Support\ServiceProvider;

use function config_path;

class ConfigurationServiceProvider extends ServiceProvider
Expand Down
1 change: 1 addition & 0 deletions src/Foundation/Providers/ViewServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Illuminate\Support\ServiceProvider;
use Hyde\Framework\Views\Components\LinkComponent;
use Hyde\Framework\Views\Components\BreadcrumbsComponent;

use function resource_path;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/Framework/Actions/BladeMatterParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Hyde\Hyde;
use RuntimeException;

use function file_get_contents;
use function substr_count;
use function json_decode;
Expand All @@ -21,6 +22,7 @@
* Accepts a string to make it easier to mock when testing.
*
* @see \Hyde\Framework\Testing\Feature\BladeMatterParserTest
*
* @phpstan-consistent-constructor
*
* === DOCUMENTATION (draft) ===
Expand Down
1 change: 1 addition & 0 deletions src/Framework/Actions/CreatesNewMarkdownPostFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Hyde\Facades\Filesystem;
use Hyde\Pages\MarkdownPost;
use Illuminate\Support\Str;

use function date;

/**
Expand Down
1 change: 1 addition & 0 deletions src/Framework/Actions/CreatesNewPageSourceFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Hyde\Framework\Exceptions\FileConflictException;
use Hyde\Framework\Concerns\InteractsWithDirectories;
use Hyde\Framework\Exceptions\UnsupportedPageTypeException;

use function file_put_contents;
use function file_exists;
use function basename;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Hyde\Framework\Concerns\InteractsWithDirectories;
use Hyde\Pages\DocumentationPage;
use Illuminate\Support\Collection;

use function basename;
use function in_array;
use function trim;
Expand Down
1 change: 1 addition & 0 deletions src/Framework/Actions/GeneratesTableOfContents.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use League\CommonMark\Extension\HeadingPermalink\HeadingPermalinkExtension;
use League\CommonMark\Extension\TableOfContents\TableOfContentsExtension;
use League\CommonMark\MarkdownConverter;

use function strpos;
use function substr;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Hyde\Framework\Features\BuildTasks\PostBuildTask;
use Illuminate\Console\OutputStyle;
use Illuminate\Support\Collection;

use function Hyde\unixsum_file;
use function file_put_contents;
use function file_exists;
Expand Down
1 change: 1 addition & 0 deletions src/Framework/Actions/PostBuildTasks/GenerateRssFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Hyde\Hyde;
use Hyde\Framework\Features\BuildTasks\PostBuildTask;
use Hyde\Framework\Features\XmlGenerators\RssFeedGenerator;

use function file_put_contents;

class GenerateRssFeed extends PostBuildTask
Expand Down
1 change: 1 addition & 0 deletions src/Framework/Actions/PostBuildTasks/GenerateSitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Hyde\Hyde;
use Hyde\Framework\Features\BuildTasks\PostBuildTask;
use Hyde\Framework\Features\XmlGenerators\SitemapGenerator;

use function file_put_contents;

class GenerateSitemap extends PostBuildTask
Expand Down
1 change: 1 addition & 0 deletions src/Framework/Actions/PreBuildTasks/CleanSiteDirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Hyde\Facades\Config;
use Hyde\Framework\Features\BuildTasks\PreBuildTask;
use Illuminate\Support\Facades\File;

use function basename;
use function in_array;
use function sprintf;
Expand Down
1 change: 1 addition & 0 deletions src/Framework/Actions/SourceFileParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Hyde\Pages\Concerns\HydePage;
use Hyde\Pages\Concerns\BaseMarkdownPage;
use Hyde\Framework\Concerns\ValidatesExistence;

use function is_subclass_of;

/**
Expand Down
1 change: 1 addition & 0 deletions src/Framework/Concerns/InteractsWithDirectories.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Hyde\Framework\Concerns;

use Hyde\Facades\Filesystem;

use function dirname;

/**
Expand Down
1 change: 1 addition & 0 deletions src/Framework/Concerns/InteractsWithFrontMatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Hyde\Framework\Concerns;

use Illuminate\Support\Arr;

use function array_filter;
use function array_merge;
use function blank;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use ReflectionMethod;
use ReflectionParameter;
use Symfony\Component\Finder\SplFileInfo;

use function array_map;
use function collect;
use function in_array;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Hyde\Markdown\Processing\ShortcodeProcessor;
use Hyde\Markdown\Processing\CodeblockFilepathProcessor;
use Torchlight\Commonmark\V2\TorchlightExtension;

use function array_merge;
use function in_array;

Expand Down
1 change: 1 addition & 0 deletions src/Framework/Concerns/RegistersFileLocations.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Hyde\Facades\Config;
use Hyde\Pages\Concerns\HydePage;
use Illuminate\Support\Str;

use function class_basename;
use function array_unique;
use function array_merge;
Expand Down
Loading

0 comments on commit 51eaf9b

Please sign in to comment.