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 final class PhabricatorIntConfigType extends PhabricatorTextConfigType { const..
Decoded Output download
<?php
final class PhabricatorIntConfigType
extends PhabricatorTextConfigType {
const TYPEKEY = 'int';
protected function newCanonicalValue(
PhabricatorConfigOption $option,
$value) {
if (!preg_match('/^-?[0-9]+\z/', $value)) {
throw $this->newException(
pht(
'Value for option "%s" must be an integer.',
$option->getKey()));
}
return (int)$value;
}
public function validateStoredValue(
PhabricatorConfigOption $option,
$value) {
if (!is_int($value)) {
throw $this->newException(
pht(
'Option "%s" is of type "%s", but the configured value is not '.
'an integer.',
$option->getKey(),
$this->getTypeKey()));
}
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class PhabricatorIntConfigType
extends PhabricatorTextConfigType {
const TYPEKEY = 'int';
protected function newCanonicalValue(
PhabricatorConfigOption $option,
$value) {
if (!preg_match('/^-?[0-9]+\z/', $value)) {
throw $this->newException(
pht(
'Value for option "%s" must be an integer.',
$option->getKey()));
}
return (int)$value;
}
public function validateStoredValue(
PhabricatorConfigOption $option,
$value) {
if (!is_int($value)) {
throw $this->newException(
pht(
'Option "%s" is of type "%s", but the configured value is not '.
'an integer.',
$option->getKey(),
$this->getTypeKey()));
}
}
}
Function Calls
None |
Stats
MD5 | b76f590d69c897e4371673786a5438fb |
Eval Count | 0 |
Decode Time | 97 ms |