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 Illuminate\Foundation\Testing\Traits; trait CanConfigureMigrationCommand..
Decoded Output download
<?php
namespace Illuminate\Foundation\Testing\Traits;
trait CanConfigureMigrationCommands
{
/**
* The parameters that should be used when running "migrate:fresh".
*
* @return array
*/
protected function migrateFreshUsing()
{
$seeder = $this->seeder();
return array_merge(
[
'--drop-views' => $this->shouldDropViews(),
'--drop-types' => $this->shouldDropTypes(),
],
$seeder ? ['--seeder' => $seeder] : ['--seed' => $this->shouldSeed()]
);
}
/**
* Determine if views should be dropped when refreshing the database.
*
* @return bool
*/
protected function shouldDropViews()
{
return property_exists($this, 'dropViews') ? $this->dropViews : false;
}
/**
* Determine if types should be dropped when refreshing the database.
*
* @return bool
*/
protected function shouldDropTypes()
{
return property_exists($this, 'dropTypes') ? $this->dropTypes : false;
}
/**
* Determine if the seed task should be run when refreshing the database.
*
* @return bool
*/
protected function shouldSeed()
{
return property_exists($this, 'seed') ? $this->seed : false;
}
/**
* Determine the specific seeder class that should be used when refreshing the database.
*
* @return mixed
*/
protected function seeder()
{
return property_exists($this, 'seeder') ? $this->seeder : false;
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Illuminate\Foundation\Testing\Traits;
trait CanConfigureMigrationCommands
{
/**
* The parameters that should be used when running "migrate:fresh".
*
* @return array
*/
protected function migrateFreshUsing()
{
$seeder = $this->seeder();
return array_merge(
[
'--drop-views' => $this->shouldDropViews(),
'--drop-types' => $this->shouldDropTypes(),
],
$seeder ? ['--seeder' => $seeder] : ['--seed' => $this->shouldSeed()]
);
}
/**
* Determine if views should be dropped when refreshing the database.
*
* @return bool
*/
protected function shouldDropViews()
{
return property_exists($this, 'dropViews') ? $this->dropViews : false;
}
/**
* Determine if types should be dropped when refreshing the database.
*
* @return bool
*/
protected function shouldDropTypes()
{
return property_exists($this, 'dropTypes') ? $this->dropTypes : false;
}
/**
* Determine if the seed task should be run when refreshing the database.
*
* @return bool
*/
protected function shouldSeed()
{
return property_exists($this, 'seed') ? $this->seed : false;
}
/**
* Determine the specific seeder class that should be used when refreshing the database.
*
* @return mixed
*/
protected function seeder()
{
return property_exists($this, 'seeder') ? $this->seeder : false;
}
}
Function Calls
None |
Stats
MD5 | 2d1b98634dc5b9179c604136d5557f92 |
Eval Count | 0 |
Decode Time | 107 ms |