Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace App\Providers; use Aws\AwsClientInterface; use Aws\S3\S3ClientInterface;..

Decoded Output download

<?php

namespace App\Providers;

use Aws\AwsClientInterface;
use Aws\S3\S3ClientInterface;
use Illuminate\Support\ServiceProvider;

class ObjectStorageServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->app->bind(S3ClientInterface::class, static function (): ?AwsClientInterface {
            // If these two values are not configured in .env, AWS will attempt initializing
            // the client with null values and throw an error.
            if (!config('aws.credentials.key') || !config('aws.credentials.secret')) {
                return null;
            }

            return app('aws')->createClient('s3');
        });
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace App\Providers;

use Aws\AwsClientInterface;
use Aws\S3\S3ClientInterface;
use Illuminate\Support\ServiceProvider;

class ObjectStorageServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->app->bind(S3ClientInterface::class, static function (): ?AwsClientInterface {
            // If these two values are not configured in .env, AWS will attempt initializing
            // the client with null values and throw an error.
            if (!config('aws.credentials.key') || !config('aws.credentials.secret')) {
                return null;
            }

            return app('aws')->createClient('s3');
        });
    }
}

Function Calls

None

Variables

None

Stats

MD5 889bbcc7859716256de3704acdc86270
Eval Count 0
Decode Time 141 ms