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 Barryvdh\LaravelIdeHelper; use Exception; use Illuminate\Database\Eloque..

Decoded Output download

<?php

namespace Barryvdh\LaravelIdeHelper;

use Exception;
use Illuminate\Database\Eloquent\Factory;
use ReflectionClass;

class Factories
{
    public static function all()
    {
        $factories = [];

        if (static::isLaravelSevenOrLower()) {
            $factory = app(Factory::class);

            $definitions = (new ReflectionClass(Factory::class))->getProperty('definitions');
            $definitions->setAccessible(true);

            foreach ($definitions->getValue($factory) as $factory_target => $config) {
                try {
                    $factories[] = new ReflectionClass($factory_target);
                } catch (Exception $exception) {
                }
            }
        }

        return $factories;
    }

    protected static function isLaravelSevenOrLower()
    {
        return class_exists('Illuminate\Database\Eloquent\Factory');
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Barryvdh\LaravelIdeHelper;

use Exception;
use Illuminate\Database\Eloquent\Factory;
use ReflectionClass;

class Factories
{
    public static function all()
    {
        $factories = [];

        if (static::isLaravelSevenOrLower()) {
            $factory = app(Factory::class);

            $definitions = (new ReflectionClass(Factory::class))->getProperty('definitions');
            $definitions->setAccessible(true);

            foreach ($definitions->getValue($factory) as $factory_target => $config) {
                try {
                    $factories[] = new ReflectionClass($factory_target);
                } catch (Exception $exception) {
                }
            }
        }

        return $factories;
    }

    protected static function isLaravelSevenOrLower()
    {
        return class_exists('Illuminate\Database\Eloquent\Factory');
    }
}

Function Calls

None

Variables

None

Stats

MD5 c84a676f0eba3e558f979a4c66f92ccc
Eval Count 0
Decode Time 93 ms