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

Remove extensions integrated in Larastan #11

Merged
merged 2 commits into from
Nov 23, 2022
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
25 changes: 0 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,31 +91,6 @@ $dateTime = new Carbon\ImmutableCarbon($date); // ok

## Extensions

### DateExtension

Provides return type for various `Illuminate\Support\Facades\Date` methods

```php
use Carbon\FactoryImmutable;
use Illuminate\Support\Facades\Date;

Date::use(FactoryImmutable::class);
Date::create(2020, 1, 1); // CarbonImmutable
Date::createFromFormat('Y-m-d', '2020-01-01'); // CarbonImmutable|false
```

### NowAndTodayExtension

Provides return type for `now()` and `today()` helpers.

```php
use Carbon\FactoryImmutable;
use Illuminate\Support\Facades\Date;

Date::use(FactoryImmutable::class);
now(); // CarbonImmutable
```

### RequestDateExtension

Provides return type for `\Illuminate\Support\Request::date()` method.
Expand Down
8 changes: 0 additions & 8 deletions extension.neon
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
services:
- class: Soyhuce\PhpstanExtension\ReturnTypes\DateExtension
tags:
- phpstan.broker.dynamicStaticMethodReturnTypeExtension

- class: Soyhuce\PhpstanExtension\ReturnTypes\NowAndTodayExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension

- class: Soyhuce\PhpstanExtension\ReturnTypes\RequestDateExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
Expand Down
71 changes: 0 additions & 71 deletions src/ReturnTypes/DateExtension.php

This file was deleted.

27 changes: 0 additions & 27 deletions src/ReturnTypes/NowAndTodayExtension.php

This file was deleted.

16 changes: 0 additions & 16 deletions tests/Features/DateCarbonImmutable/DateExtension.php

This file was deleted.

15 changes: 0 additions & 15 deletions tests/Features/DateCarbonImmutable/NowAndTodayExtension.php

This file was deleted.

8 changes: 0 additions & 8 deletions tests/Features/DateCarbonImmutable/phpstan-tests.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ includes:
- ../../../vendor/phpstan/phpstan/conf/bleedingEdge.neon

services:
- class: Soyhuce\PhpstanExtension\ReturnTypes\DateExtension
tags:
- phpstan.broker.dynamicStaticMethodReturnTypeExtension

- class: Soyhuce\PhpstanExtension\ReturnTypes\NowAndTodayExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension

- class: Soyhuce\PhpstanExtension\ReturnTypes\RequestDateExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
Expand Down
16 changes: 0 additions & 16 deletions tests/Features/Default/DateExtension.php

This file was deleted.

15 changes: 0 additions & 15 deletions tests/Features/Default/NowAndTodayExtension.php

This file was deleted.

8 changes: 0 additions & 8 deletions tests/Features/phpstan-tests.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ includes:
- ../../vendor/phpstan/phpstan/conf/bleedingEdge.neon

services:
- class: Soyhuce\PhpstanExtension\ReturnTypes\DateExtension
tags:
- phpstan.broker.dynamicStaticMethodReturnTypeExtension

- class: Soyhuce\PhpstanExtension\ReturnTypes\NowAndTodayExtension
tags:
- phpstan.broker.dynamicFunctionReturnTypeExtension

- class: Soyhuce\PhpstanExtension\ReturnTypes\RequestDateExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension