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 /** * Copyright Magento, Inc. All rights reserved. * See COPYING.txt for license ..
Decoded Output download
<?php
/**
* Copyright Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
namespace Magento\Backend\Model\Dashboard;
/**
* Dashboard period info retriever
*/
class Period
{
public const PERIOD_TODAY = 'today';
public const PERIOD_24_HOURS = '24h';
public const PERIOD_7_DAYS = '7d';
public const PERIOD_1_MONTH = '1m';
public const PERIOD_1_YEAR = '1y';
public const PERIOD_2_YEARS = '2y';
private const PERIOD_UNIT_HOUR = 'hour';
private const PERIOD_UNIT_DAY = 'day';
private const PERIOD_UNIT_MONTH = 'month';
/**
* Prepare array with periods for dashboard graphs
*
* @return array
*/
public function getDatePeriods(): array
{
return [
static::PERIOD_TODAY => __('Today'),
static::PERIOD_24_HOURS => __('Last 24 Hours'),
static::PERIOD_7_DAYS => __('Last 7 Days'),
static::PERIOD_1_MONTH => __('Current Month'),
static::PERIOD_1_YEAR => __('YTD'),
static::PERIOD_2_YEARS => __('2YTD')
];
}
/**
* Prepare array with periods mapping to chart units
*
* @return array
*/
public function getPeriodChartUnits(): array
{
return [
static::PERIOD_TODAY => self::PERIOD_UNIT_HOUR,
static::PERIOD_24_HOURS => self::PERIOD_UNIT_HOUR,
static::PERIOD_7_DAYS => self::PERIOD_UNIT_DAY,
static::PERIOD_1_MONTH => self::PERIOD_UNIT_DAY,
static::PERIOD_1_YEAR => self::PERIOD_UNIT_MONTH,
static::PERIOD_2_YEARS => self::PERIOD_UNIT_MONTH
];
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* Copyright Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
namespace Magento\Backend\Model\Dashboard;
/**
* Dashboard period info retriever
*/
class Period
{
public const PERIOD_TODAY = 'today';
public const PERIOD_24_HOURS = '24h';
public const PERIOD_7_DAYS = '7d';
public const PERIOD_1_MONTH = '1m';
public const PERIOD_1_YEAR = '1y';
public const PERIOD_2_YEARS = '2y';
private const PERIOD_UNIT_HOUR = 'hour';
private const PERIOD_UNIT_DAY = 'day';
private const PERIOD_UNIT_MONTH = 'month';
/**
* Prepare array with periods for dashboard graphs
*
* @return array
*/
public function getDatePeriods(): array
{
return [
static::PERIOD_TODAY => __('Today'),
static::PERIOD_24_HOURS => __('Last 24 Hours'),
static::PERIOD_7_DAYS => __('Last 7 Days'),
static::PERIOD_1_MONTH => __('Current Month'),
static::PERIOD_1_YEAR => __('YTD'),
static::PERIOD_2_YEARS => __('2YTD')
];
}
/**
* Prepare array with periods mapping to chart units
*
* @return array
*/
public function getPeriodChartUnits(): array
{
return [
static::PERIOD_TODAY => self::PERIOD_UNIT_HOUR,
static::PERIOD_24_HOURS => self::PERIOD_UNIT_HOUR,
static::PERIOD_7_DAYS => self::PERIOD_UNIT_DAY,
static::PERIOD_1_MONTH => self::PERIOD_UNIT_DAY,
static::PERIOD_1_YEAR => self::PERIOD_UNIT_MONTH,
static::PERIOD_2_YEARS => self::PERIOD_UNIT_MONTH
];
}
}
Function Calls
None |
Stats
MD5 | 772a4f149c607a330c20ed0f3a81d8df |
Eval Count | 0 |
Decode Time | 74 ms |