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 Webkul\Customer\Database\Factories; use Illuminate\Database\Eloquent\Fac..

Decoded Output download

<?php

namespace Webkul\Customer\Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;
use Webkul\Customer\Models\CustomerAddress;

class CustomerAddressFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = CustomerAddress::class;

    /**
     * Define the model's default state.
     *
     * @throws \Exception
     */
    public function definition(): array
    {
        $fakerIt = \Faker\Factory::create('it_IT');

        return [
            'company_name'    => $this->faker->company,
            'vat_id'          => $fakerIt->vatId(),
            'email'           => $this->faker->safeEmail(),
            'first_name'      => preg_replace('/[^a-zA-Z ]/', '', $this->faker->firstName()),
            'last_name'       => preg_replace('/[^a-zA-Z ]/', '', $this->faker->lastName()),
            'address'         => $this->faker->streetAddress,
            'country'         => $this->faker->countryCode,
            'state'           => $this->faker->state,
            'city'            => $this->faker->city,
            'postcode'        => rand(11111, 99999),
            'phone'           => $this->faker->e164PhoneNumber,
            'default_address' => $this->faker->boolean,
            'address_type'    => CustomerAddress::ADDRESS_TYPE,
        ];
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Webkul\Customer\Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;
use Webkul\Customer\Models\CustomerAddress;

class CustomerAddressFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = CustomerAddress::class;

    /**
     * Define the model's default state.
     *
     * @throws \Exception
     */
    public function definition(): array
    {
        $fakerIt = \Faker\Factory::create('it_IT');

        return [
            'company_name'    => $this->faker->company,
            'vat_id'          => $fakerIt->vatId(),
            'email'           => $this->faker->safeEmail(),
            'first_name'      => preg_replace('/[^a-zA-Z ]/', '', $this->faker->firstName()),
            'last_name'       => preg_replace('/[^a-zA-Z ]/', '', $this->faker->lastName()),
            'address'         => $this->faker->streetAddress,
            'country'         => $this->faker->countryCode,
            'state'           => $this->faker->state,
            'city'            => $this->faker->city,
            'postcode'        => rand(11111, 99999),
            'phone'           => $this->faker->e164PhoneNumber,
            'default_address' => $this->faker->boolean,
            'address_type'    => CustomerAddress::ADDRESS_TYPE,
        ];
    }
}

Function Calls

None

Variables

None

Stats

MD5 99a73327ff0a6f26c3558c458b5c7817
Eval Count 0
Decode Time 106 ms