Skip to content

Commit

Permalink
Remove type annotations that should be inherited from generics
Browse files Browse the repository at this point in the history
These collections always contain these types, we should be able to get the data from the generics as they're hardcoded
  • Loading branch information
caendesilva committed Jul 17, 2024
1 parent 4853363 commit 2e9ab04
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
<section id="hyde-kernel-foundation-methods">

<!-- Start generated docs for Hyde\Foundation\Concerns\HandlesFoundationCollections -->
<!-- Generated by HydePHP DocGen script at 2023-03-11 11:14:55 in 0.06ms -->
<!-- Generated by HydePHP DocGen script at 2024-07-17 15:27:42 in 0.04ms -->

#### `files()`

No description provided.

```php
Hyde::files(): \Hyde\Foundation\Kernel\FileCollection<string, \Hyde\Support\Filesystem\ProjectFile>
Hyde::files(): Hyde\Foundation\Kernel\FileCollection
```

#### `pages()`

No description provided.

```php
Hyde::pages(): \Hyde\Foundation\Kernel\PageCollection<string, \Hyde\Pages\Concerns\HydePage>
Hyde::pages(): Hyde\Foundation\Kernel\PageCollection
```

#### `routes()`

No description provided.

```php
Hyde::routes(): \Hyde\Foundation\Kernel\RouteCollection<string, \Hyde\Support\Models\Route>
Hyde::routes(): Hyde\Foundation\Kernel\RouteCollection
```

<!-- End generated docs for Hyde\Foundation\Concerns\HandlesFoundationCollections -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,20 @@
*/
trait HandlesFoundationCollections
{
/** @return \Hyde\Foundation\Kernel\FileCollection<string, \Hyde\Support\Filesystem\ProjectFile> */
public function files(): FileCollection
{
$this->needsToBeBooted();

return $this->files;
}

/** @return \Hyde\Foundation\Kernel\PageCollection<string, \Hyde\Pages\Concerns\HydePage> */
public function pages(): PageCollection
{
$this->needsToBeBooted();

return $this->pages;
}

/** @return \Hyde\Foundation\Kernel\RouteCollection<string, \Hyde\Support\Models\Route> */
public function routes(): RouteCollection
{
$this->needsToBeBooted();
Expand Down
7 changes: 3 additions & 4 deletions packages/framework/src/Hyde.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use Hyde\Foundation\Kernel\RouteCollection;
use Hyde\Pages\Concerns\HydePage;
use Hyde\Support\Models\Route;
use Hyde\Support\Filesystem\SourceFile;
use Illuminate\Support\Facades\Facade;
use Illuminate\Support\HtmlString;
use JetBrains\PhpStorm\Pure;
Expand Down Expand Up @@ -53,9 +52,9 @@
* @method static string getMediaDirectory()
* @method static string getMediaOutputDirectory()
* @method static Features features()
* @method static FileCollection<string, SourceFile> files()
* @method static PageCollection<string, HydePage> pages()
* @method static RouteCollection<string, Route> routes()
* @method static FileCollection files()
* @method static PageCollection pages()
* @method static RouteCollection routes()
* @method static Route|null currentRoute()
* @method static HydeKernel getInstance()
* @method static Filesystem filesystem()
Expand Down

0 comments on commit 2e9ab04

Please sign in to comment.