Skip to content

Commit

Permalink
fix: adjust failed analyze
Browse files Browse the repository at this point in the history
  • Loading branch information
Caknoooo committed Dec 6, 2023
1 parent c08a3c8 commit b7013ba
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
4 changes: 1 addition & 3 deletions app/Core/Application/Image/ImageUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Exceptions\UserException;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\Storage;
use Exception;

class ImageUpload
{
Expand All @@ -18,9 +19,6 @@ class ImageUpload

/**
* @param UploadedFile $uploaded_file
* @param array $available_type
* @param array $available_mime_type
* @param int $max_size
* @param string $path
* @param string $seed
*/
Expand Down
1 change: 1 addition & 0 deletions app/Core/Domain/Infrastructure/dependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use App\Core\Domain\Infrastructure\Interfaces\UserRepositoryInterface;
use App\Core\Domain\Infrastructure\Repository\SqlUserRepository;
use Illuminate\Contracts\Foundation\Application;

/** @var Application $app */
$app->singleton(UserRepositoryInterface::class, SqlUserRepository::class);
3 changes: 2 additions & 1 deletion app/Core/Domain/Models/User/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Core\Domain\Models\Email;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Hash;
use Exception;

class User extends Model
{
Expand All @@ -17,7 +18,7 @@ class User extends Model
/**
* @param UserId $id
* @param string $name
* @param string $email
* @param Email $email
* @param string $image_url
* @param string $hash_pasword
*/
Expand Down
1 change: 0 additions & 1 deletion app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class UserController extends Controller
{
public function create(Request $request, RegisterUserService $service)
{
print_r($request->all());
$request->validate(
[
'name' => 'required',
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class RouteServiceProvider extends ServiceProvider
public function boot(): void
{
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
return Limit::perMinute(60)->by(optional($request->user())->id);
});

$this->routes(function () {
Expand Down
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ parameters:

checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
treatPhpDocTypesAsCertain: false
paths:
- app/
- tests/
Expand Down

0 comments on commit b7013ba

Please sign in to comment.