made types consistent with those defined in Hack
This commit is contained in:
parent
f50b2c59d5
commit
0555b7f2ab
@ -112,6 +112,6 @@ class GlobalVariables
|
|||||||
*/
|
*/
|
||||||
public function getDebug()
|
public function getDebug()
|
||||||
{
|
{
|
||||||
return (Boolean) $this->container->getParameter('kernel.debug');
|
return (bool) $this->container->getParameter('kernel.debug');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,8 +41,8 @@ class WebDebugToolbarListener implements EventSubscriberInterface
|
|||||||
public function __construct(\Twig_Environment $twig, $interceptRedirects = false, $mode = self::ENABLED, $position = 'bottom')
|
public function __construct(\Twig_Environment $twig, $interceptRedirects = false, $mode = self::ENABLED, $position = 'bottom')
|
||||||
{
|
{
|
||||||
$this->twig = $twig;
|
$this->twig = $twig;
|
||||||
$this->interceptRedirects = (Boolean) $interceptRedirects;
|
$this->interceptRedirects = (bool) $interceptRedirects;
|
||||||
$this->mode = (integer) $mode;
|
$this->mode = (int) $mode;
|
||||||
$this->position = $position;
|
$this->position = $position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ abstract class Client
|
|||||||
*/
|
*/
|
||||||
public function followRedirects($followRedirect = true)
|
public function followRedirects($followRedirect = true)
|
||||||
{
|
{
|
||||||
$this->followRedirects = (Boolean) $followRedirect;
|
$this->followRedirects = (bool) $followRedirect;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -107,7 +107,7 @@ abstract class Client
|
|||||||
// @codeCoverageIgnoreEnd
|
// @codeCoverageIgnoreEnd
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->insulated = (Boolean) $insulated;
|
$this->insulated = (bool) $insulated;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,11 +69,11 @@ class Cookie
|
|||||||
$this->rawValue = urlencode($value);
|
$this->rawValue = urlencode($value);
|
||||||
}
|
}
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
$this->expires = null === $expires ? null : (integer) $expires;
|
$this->expires = null === $expires ? null : (int) $expires;
|
||||||
$this->path = empty($path) ? '/' : $path;
|
$this->path = empty($path) ? '/' : $path;
|
||||||
$this->domain = $domain;
|
$this->domain = $domain;
|
||||||
$this->secure = (Boolean) $secure;
|
$this->secure = (bool) $secure;
|
||||||
$this->httponly = (Boolean) $httponly;
|
$this->httponly = (bool) $httponly;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -200,7 +200,7 @@ class ClassCollectionLoader
|
|||||||
*/
|
*/
|
||||||
public static function enableTokenizer($bool)
|
public static function enableTokenizer($bool)
|
||||||
{
|
{
|
||||||
self::$useTokenizer = (Boolean) $bool;
|
self::$useTokenizer = (bool) $bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,7 +37,7 @@ class ConfigCache
|
|||||||
public function __construct($file, $debug)
|
public function __construct($file, $debug)
|
||||||
{
|
{
|
||||||
$this->file = $file;
|
$this->file = $file;
|
||||||
$this->debug = (Boolean) $debug;
|
$this->debug = (bool) $debug;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,7 +53,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
|||||||
|
|
||||||
public function setNormalizeKeys($normalizeKeys)
|
public function setNormalizeKeys($normalizeKeys)
|
||||||
{
|
{
|
||||||
$this->normalizeKeys = (Boolean) $normalizeKeys;
|
$this->normalizeKeys = (bool) $normalizeKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -113,7 +113,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
|||||||
*/
|
*/
|
||||||
public function setAddIfNotSet($boolean)
|
public function setAddIfNotSet($boolean)
|
||||||
{
|
{
|
||||||
$this->addIfNotSet = (Boolean) $boolean;
|
$this->addIfNotSet = (bool) $boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -123,7 +123,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
|||||||
*/
|
*/
|
||||||
public function setAllowFalse($allow)
|
public function setAllowFalse($allow)
|
||||||
{
|
{
|
||||||
$this->allowFalse = (Boolean) $allow;
|
$this->allowFalse = (bool) $allow;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -133,7 +133,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
|||||||
*/
|
*/
|
||||||
public function setAllowNewKeys($allow)
|
public function setAllowNewKeys($allow)
|
||||||
{
|
{
|
||||||
$this->allowNewKeys = (Boolean) $allow;
|
$this->allowNewKeys = (bool) $allow;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -143,7 +143,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
|||||||
*/
|
*/
|
||||||
public function setPerformDeepMerging($boolean)
|
public function setPerformDeepMerging($boolean)
|
||||||
{
|
{
|
||||||
$this->performDeepMerging = (Boolean) $boolean;
|
$this->performDeepMerging = (bool) $boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -153,7 +153,7 @@ class ArrayNode extends BaseNode implements PrototypeNodeInterface
|
|||||||
*/
|
*/
|
||||||
public function setIgnoreExtraKeys($boolean)
|
public function setIgnoreExtraKeys($boolean)
|
||||||
{
|
{
|
||||||
$this->ignoreExtraKeys = (Boolean) $boolean;
|
$this->ignoreExtraKeys = (bool) $boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -142,7 +142,7 @@ abstract class BaseNode implements NodeInterface
|
|||||||
*/
|
*/
|
||||||
public function setRequired($boolean)
|
public function setRequired($boolean)
|
||||||
{
|
{
|
||||||
$this->required = (Boolean) $boolean;
|
$this->required = (bool) $boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -152,7 +152,7 @@ abstract class BaseNode implements NodeInterface
|
|||||||
*/
|
*/
|
||||||
public function setAllowOverwrite($allow)
|
public function setAllowOverwrite($allow)
|
||||||
{
|
{
|
||||||
$this->allowOverwrite = (Boolean) $allow;
|
$this->allowOverwrite = (bool) $allow;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -309,7 +309,7 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition
|
|||||||
*/
|
*/
|
||||||
public function normalizeKeys($bool)
|
public function normalizeKeys($bool)
|
||||||
{
|
{
|
||||||
$this->normalizeKeys = (Boolean) $bool;
|
$this->normalizeKeys = (bool) $bool;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ class VariableNode extends BaseNode implements PrototypeNodeInterface
|
|||||||
*/
|
*/
|
||||||
public function setAllowEmptyValue($boolean)
|
public function setAllowEmptyValue($boolean)
|
||||||
{
|
{
|
||||||
$this->allowEmptyValue = (Boolean) $boolean;
|
$this->allowEmptyValue = (bool) $boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -276,7 +276,7 @@ class Application
|
|||||||
*/
|
*/
|
||||||
public function setCatchExceptions($boolean)
|
public function setCatchExceptions($boolean)
|
||||||
{
|
{
|
||||||
$this->catchExceptions = (Boolean) $boolean;
|
$this->catchExceptions = (bool) $boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -288,7 +288,7 @@ class Application
|
|||||||
*/
|
*/
|
||||||
public function setAutoExit($boolean)
|
public function setAutoExit($boolean)
|
||||||
{
|
{
|
||||||
$this->autoExit = (Boolean) $boolean;
|
$this->autoExit = (bool) $boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,7 +46,7 @@ class OutputFormatter implements OutputFormatterInterface
|
|||||||
*/
|
*/
|
||||||
public function __construct($decorated = false, array $styles = array())
|
public function __construct($decorated = false, array $styles = array())
|
||||||
{
|
{
|
||||||
$this->decorated = (Boolean) $decorated;
|
$this->decorated = (bool) $decorated;
|
||||||
|
|
||||||
$this->setStyle('error', new OutputFormatterStyle('white', 'red'));
|
$this->setStyle('error', new OutputFormatterStyle('white', 'red'));
|
||||||
$this->setStyle('info', new OutputFormatterStyle('green'));
|
$this->setStyle('info', new OutputFormatterStyle('green'));
|
||||||
@ -69,7 +69,7 @@ class OutputFormatter implements OutputFormatterInterface
|
|||||||
*/
|
*/
|
||||||
public function setDecorated($decorated)
|
public function setDecorated($decorated)
|
||||||
{
|
{
|
||||||
$this->decorated = (Boolean) $decorated;
|
$this->decorated = (bool) $decorated;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -94,7 +94,7 @@ abstract class Input implements InputInterface
|
|||||||
*/
|
*/
|
||||||
public function setInteractive($interactive)
|
public function setInteractive($interactive)
|
||||||
{
|
{
|
||||||
$this->interactive = (Boolean) $interactive;
|
$this->interactive = (bool) $interactive;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -220,7 +220,7 @@ EOF;
|
|||||||
|
|
||||||
public function setProcessIsolation($processIsolation)
|
public function setProcessIsolation($processIsolation)
|
||||||
{
|
{
|
||||||
$this->processIsolation = (Boolean) $processIsolation;
|
$this->processIsolation = (bool) $processIsolation;
|
||||||
|
|
||||||
if ($this->processIsolation && !class_exists('Symfony\\Component\\Process\\Process')) {
|
if ($this->processIsolation && !class_exists('Symfony\\Component\\Process\\Process')) {
|
||||||
throw new \RuntimeException('Unable to isolate processes as the Symfony Process Component is not installed.');
|
throw new \RuntimeException('Unable to isolate processes as the Symfony Process Component is not installed.');
|
||||||
|
@ -54,7 +54,7 @@ class Alias
|
|||||||
*/
|
*/
|
||||||
public function setPublic($boolean)
|
public function setPublic($boolean)
|
||||||
{
|
{
|
||||||
$this->public = (Boolean) $boolean;
|
$this->public = (bool) $boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,7 +40,7 @@ class AnalyzeServiceReferencesPass implements RepeatablePassInterface
|
|||||||
*/
|
*/
|
||||||
public function __construct($onlyConstructorArguments = false)
|
public function __construct($onlyConstructorArguments = false)
|
||||||
{
|
{
|
||||||
$this->onlyConstructorArguments = (Boolean) $onlyConstructorArguments;
|
$this->onlyConstructorArguments = (bool) $onlyConstructorArguments;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -127,7 +127,7 @@ class ResolveDefinitionTemplatesPass implements CompilerPassInterface
|
|||||||
throw new RuntimeException(sprintf('Invalid argument key "%s" found.', $k));
|
throw new RuntimeException(sprintf('Invalid argument key "%s" found.', $k));
|
||||||
}
|
}
|
||||||
|
|
||||||
$index = (integer) substr($k, strlen('index_'));
|
$index = (int) substr($k, strlen('index_'));
|
||||||
$def->replaceArgument($index, $v);
|
$def->replaceArgument($index, $v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
*/
|
*/
|
||||||
public function setResourceTracking($track)
|
public function setResourceTracking($track)
|
||||||
{
|
{
|
||||||
$this->trackResources = (Boolean) $track;
|
$this->trackResources = (bool) $track;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -556,7 +556,7 @@ class Definition
|
|||||||
*/
|
*/
|
||||||
public function setPublic($boolean)
|
public function setPublic($boolean)
|
||||||
{
|
{
|
||||||
$this->public = (Boolean) $boolean;
|
$this->public = (bool) $boolean;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -584,7 +584,7 @@ class Definition
|
|||||||
*/
|
*/
|
||||||
public function setSynchronized($boolean)
|
public function setSynchronized($boolean)
|
||||||
{
|
{
|
||||||
$this->synchronized = (Boolean) $boolean;
|
$this->synchronized = (bool) $boolean;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -610,7 +610,7 @@ class Definition
|
|||||||
*/
|
*/
|
||||||
public function setLazy($lazy)
|
public function setLazy($lazy)
|
||||||
{
|
{
|
||||||
$this->lazy = (Boolean) $lazy;
|
$this->lazy = (bool) $lazy;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -637,7 +637,7 @@ class Definition
|
|||||||
*/
|
*/
|
||||||
public function setSynthetic($boolean)
|
public function setSynthetic($boolean)
|
||||||
{
|
{
|
||||||
$this->synthetic = (Boolean) $boolean;
|
$this->synthetic = (bool) $boolean;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -667,7 +667,7 @@ class Definition
|
|||||||
*/
|
*/
|
||||||
public function setAbstract($boolean)
|
public function setAbstract($boolean)
|
||||||
{
|
{
|
||||||
$this->abstract = (Boolean) $boolean;
|
$this->abstract = (bool) $boolean;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -121,6 +121,6 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn
|
|||||||
throw new InvalidArgumentException("The config array has no 'enabled' key.");
|
throw new InvalidArgumentException("The config array has no 'enabled' key.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Boolean) $container->getParameterBag()->resolveValue($config['enabled']);
|
return (bool) $container->getParameterBag()->resolveValue($config['enabled']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ class XmlFileLoader extends FileLoader
|
|||||||
|
|
||||||
foreach ($imports as $import) {
|
foreach ($imports as $import) {
|
||||||
$this->setCurrentDir(dirname($file));
|
$this->setCurrentDir(dirname($file));
|
||||||
$this->import((string) $import['resource'], null, (Boolean) $import->getAttributeAsPhp('ignore-errors'), $file);
|
$this->import((string) $import['resource'], null, (bool) $import->getAttributeAsPhp('ignore-errors'), $file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ class YamlFileLoader extends FileLoader
|
|||||||
|
|
||||||
foreach ($content['imports'] as $import) {
|
foreach ($content['imports'] as $import) {
|
||||||
$this->setCurrentDir(dirname($file));
|
$this->setCurrentDir(dirname($file));
|
||||||
$this->import($import['resource'], null, isset($import['ignore_errors']) ? (Boolean) $import['ignore_errors'] : false, $file);
|
$this->import($import['resource'], null, isset($import['ignore_errors']) ? (bool) $import['ignore_errors'] : false, $file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ class YamlFileLoader extends FileLoader
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
} elseif (isset($service['alias'])) {
|
} elseif (isset($service['alias'])) {
|
||||||
$public = !array_key_exists('public', $service) || (Boolean) $service['public'];
|
$public = !array_key_exists('public', $service) || (bool) $service['public'];
|
||||||
$this->container->setAlias($id, new Alias($service['alias'], $public));
|
$this->container->setAlias($id, new Alias($service['alias'], $public));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -105,7 +105,7 @@ class ContainerAwareEventDispatcher extends EventDispatcher
|
|||||||
public function hasListeners($eventName = null)
|
public function hasListeners($eventName = null)
|
||||||
{
|
{
|
||||||
if (null === $eventName) {
|
if (null === $eventName) {
|
||||||
return (Boolean) count($this->listenerIds) || (Boolean) count($this->listeners);
|
return (bool) count($this->listenerIds) || (bool) count($this->listeners);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->listenerIds[$eventName])) {
|
if (isset($this->listenerIds[$eventName])) {
|
||||||
|
@ -82,7 +82,7 @@ class EventDispatcher implements EventDispatcherInterface
|
|||||||
*/
|
*/
|
||||||
public function hasListeners($eventName = null)
|
public function hasListeners($eventName = null)
|
||||||
{
|
{
|
||||||
return (Boolean) count($this->getListeners($eventName));
|
return (bool) count($this->getListeners($eventName));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -216,7 +216,7 @@ abstract class AbstractAdapter implements AdapterInterface
|
|||||||
*/
|
*/
|
||||||
public function ignoreUnreadableDirs($ignore = true)
|
public function ignoreUnreadableDirs($ignore = true)
|
||||||
{
|
{
|
||||||
$this->ignoreUnreadableDirs = (Boolean) $ignore;
|
$this->ignoreUnreadableDirs = (bool) $ignore;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -638,7 +638,7 @@ class Finder implements \IteratorAggregate, \Countable
|
|||||||
*/
|
*/
|
||||||
public function ignoreUnreadableDirs($ignore = true)
|
public function ignoreUnreadableDirs($ignore = true)
|
||||||
{
|
{
|
||||||
$this->ignoreUnreadableDirs = (Boolean) $ignore;
|
$this->ignoreUnreadableDirs = (bool) $ignore;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->fields = $fields;
|
$this->fields = $fields;
|
||||||
$this->pad = (Boolean) $pad;
|
$this->pad = (bool) $pad;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -603,7 +603,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
|
|||||||
throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
|
throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->disabled = (Boolean) $disabled;
|
$this->disabled = (bool) $disabled;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -631,7 +631,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
|
|||||||
throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
|
throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->errorBubbling = null === $errorBubbling ? null : (Boolean) $errorBubbling;
|
$this->errorBubbling = null === $errorBubbling ? null : (bool) $errorBubbling;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -645,7 +645,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
|
|||||||
throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
|
throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->required = (Boolean) $required;
|
$this->required = (bool) $required;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -855,7 +855,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
|
|||||||
*/
|
*/
|
||||||
public function setAutoInitialize($initialize)
|
public function setAutoInitialize($initialize)
|
||||||
{
|
{
|
||||||
$this->autoInitialize = (Boolean) $initialize;
|
$this->autoInitialize = (bool) $initialize;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ class MoneyTypeTest extends TypeTestCase
|
|||||||
|
|
||||||
$form = $this->factory->create('money', null, array('currency' => 'JPY'));
|
$form = $this->factory->create('money', null, array('currency' => 'JPY'));
|
||||||
$view = $form->createView();
|
$view = $form->createView();
|
||||||
$this->assertTrue((Boolean) strstr($view->vars['money_pattern'], '¥'));
|
$this->assertTrue((bool) strstr($view->vars['money_pattern'], '¥'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/symfony/symfony/issues/5458
|
// https://github.com/symfony/symfony/issues/5458
|
||||||
|
@ -70,8 +70,8 @@ class Cookie
|
|||||||
$this->domain = $domain;
|
$this->domain = $domain;
|
||||||
$this->expire = $expire;
|
$this->expire = $expire;
|
||||||
$this->path = empty($path) ? '/' : $path;
|
$this->path = empty($path) ? '/' : $path;
|
||||||
$this->secure = (Boolean) $secure;
|
$this->secure = (bool) $secure;
|
||||||
$this->httpOnly = (Boolean) $httpOnly;
|
$this->httpOnly = (bool) $httpOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -95,7 +95,7 @@ class UploadedFile extends File
|
|||||||
$this->mimeType = $mimeType ?: 'application/octet-stream';
|
$this->mimeType = $mimeType ?: 'application/octet-stream';
|
||||||
$this->size = $size;
|
$this->size = $size;
|
||||||
$this->error = $error ?: UPLOAD_ERR_OK;
|
$this->error = $error ?: UPLOAD_ERR_OK;
|
||||||
$this->test = (Boolean) $test;
|
$this->test = (bool) $test;
|
||||||
|
|
||||||
parent::__construct($path, UPLOAD_ERR_OK === $this->error);
|
parent::__construct($path, UPLOAD_ERR_OK === $this->error);
|
||||||
}
|
}
|
||||||
|
@ -49,8 +49,8 @@ class ProfilerListener implements EventSubscriberInterface
|
|||||||
{
|
{
|
||||||
$this->profiler = $profiler;
|
$this->profiler = $profiler;
|
||||||
$this->matcher = $matcher;
|
$this->matcher = $matcher;
|
||||||
$this->onlyException = (Boolean) $onlyException;
|
$this->onlyException = (bool) $onlyException;
|
||||||
$this->onlyMasterRequests = (Boolean) $onlyMasterRequests;
|
$this->onlyMasterRequests = (bool) $onlyMasterRequests;
|
||||||
$this->children = new \SplObjectStorage();
|
$this->children = new \SplObjectStorage();
|
||||||
$this->profiles = array();
|
$this->profiles = array();
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ class Esi
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Boolean) preg_match('#content="[^"]*ESI/1.0[^"]*"#', $control);
|
return (bool) preg_match('#content="[^"]*ESI/1.0[^"]*"#', $control);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -77,7 +77,7 @@ abstract class Kernel implements KernelInterface, TerminableInterface
|
|||||||
public function __construct($environment, $debug)
|
public function __construct($environment, $debug)
|
||||||
{
|
{
|
||||||
$this->environment = $environment;
|
$this->environment = $environment;
|
||||||
$this->debug = (Boolean) $debug;
|
$this->debug = (bool) $debug;
|
||||||
$this->booted = false;
|
$this->booted = false;
|
||||||
$this->rootDir = $this->getRootDir();
|
$this->rootDir = $this->getRootDir();
|
||||||
$this->name = $this->getName();
|
$this->name = $this->getName();
|
||||||
|
@ -59,7 +59,7 @@ abstract class PdoProfilerStorage implements ProfilerStorageInterface
|
|||||||
$criteria = $criteria ? 'WHERE '.implode(' AND ', $criteria) : '';
|
$criteria = $criteria ? 'WHERE '.implode(' AND ', $criteria) : '';
|
||||||
|
|
||||||
$db = $this->initDb();
|
$db = $this->initDb();
|
||||||
$tokens = $this->fetch($db, 'SELECT token, ip, method, url, time, parent FROM sf_profiler_data '.$criteria.' ORDER BY time DESC LIMIT '.((integer) $limit), $args);
|
$tokens = $this->fetch($db, 'SELECT token, ip, method, url, time, parent FROM sf_profiler_data '.$criteria.' ORDER BY time DESC LIMIT '.((int) $limit), $args);
|
||||||
$this->close($db);
|
$this->close($db);
|
||||||
|
|
||||||
return $tokens;
|
return $tokens;
|
||||||
|
@ -49,6 +49,6 @@ class KernelForTest extends Kernel
|
|||||||
|
|
||||||
public function setIsBooted($value)
|
public function setIsBooted($value)
|
||||||
{
|
{
|
||||||
$this->booted = (Boolean) $value;
|
$this->booted = (bool) $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -870,7 +870,7 @@ class NumberFormatter
|
|||||||
*/
|
*/
|
||||||
private function normalizeGroupingUsedValue($value)
|
private function normalizeGroupingUsedValue($value)
|
||||||
{
|
{
|
||||||
return (int) (Boolean) (int) $value;
|
return (int) (bool) (int) $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -776,7 +776,7 @@ class Process
|
|||||||
*/
|
*/
|
||||||
public function setTty($tty)
|
public function setTty($tty)
|
||||||
{
|
{
|
||||||
$this->tty = (Boolean) $tty;
|
$this->tty = (bool) $tty;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -928,7 +928,7 @@ class Process
|
|||||||
*/
|
*/
|
||||||
public function setEnhanceWindowsCompatibility($enhance)
|
public function setEnhanceWindowsCompatibility($enhance)
|
||||||
{
|
{
|
||||||
$this->enhanceWindowsCompatibility = (Boolean) $enhance;
|
$this->enhanceWindowsCompatibility = (bool) $enhance;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -956,7 +956,7 @@ class Process
|
|||||||
*/
|
*/
|
||||||
public function setEnhanceSigchildCompatibility($enhance)
|
public function setEnhanceSigchildCompatibility($enhance)
|
||||||
{
|
{
|
||||||
$this->enhanceSigchildCompatibility = (Boolean) $enhance;
|
$this->enhanceSigchildCompatibility = (bool) $enhance;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,8 @@ class ProcessPipes
|
|||||||
|
|
||||||
public function __construct($useFiles, $ttyMode)
|
public function __construct($useFiles, $ttyMode)
|
||||||
{
|
{
|
||||||
$this->useFiles = (Boolean) $useFiles;
|
$this->useFiles = (bool) $useFiles;
|
||||||
$this->ttyMode = (Boolean) $ttyMode;
|
$this->ttyMode = (bool) $ttyMode;
|
||||||
|
|
||||||
// Fix for PHP bug #51800: reading from STDOUT pipe hangs forever on Windows if the output is too big.
|
// Fix for PHP bug #51800: reading from STDOUT pipe hangs forever on Windows if the output is too big.
|
||||||
// Workaround for this problem is to use temporary files instead of pipes on Windows platform.
|
// Workaround for this problem is to use temporary files instead of pipes on Windows platform.
|
||||||
@ -180,10 +180,10 @@ class ProcessPipes
|
|||||||
public function hasOpenHandles()
|
public function hasOpenHandles()
|
||||||
{
|
{
|
||||||
if (!$this->useFiles) {
|
if (!$this->useFiles) {
|
||||||
return (Boolean) $this->pipes;
|
return (bool) $this->pipes;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Boolean) $this->pipes && (Boolean) $this->fileHandles;
|
return (bool) $this->pipes && (bool) $this->fileHandles;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -114,7 +114,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt
|
|||||||
*/
|
*/
|
||||||
public function setStrictRequirements($enabled)
|
public function setStrictRequirements($enabled)
|
||||||
{
|
{
|
||||||
$this->strictRequirements = null === $enabled ? null : (Boolean) $enabled;
|
$this->strictRequirements = null === $enabled ? null : (bool) $enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -554,7 +554,7 @@ QUERY;
|
|||||||
$oidCache[$oidLookupKey] = new ObjectIdentity($objectIdentifier, $classType);
|
$oidCache[$oidLookupKey] = new ObjectIdentity($objectIdentifier, $classType);
|
||||||
}
|
}
|
||||||
|
|
||||||
$acl = new Acl((integer) $aclId, $oidCache[$oidLookupKey], $permissionGrantingStrategy, $emptyArray, !!$entriesInheriting);
|
$acl = new Acl((int) $aclId, $oidCache[$oidLookupKey], $permissionGrantingStrategy, $emptyArray, !!$entriesInheriting);
|
||||||
|
|
||||||
// keep a local, and global reference to this ACL
|
// keep a local, and global reference to this ACL
|
||||||
$loadedAcls[$classType][$objectIdentifier] = $acl;
|
$loadedAcls[$classType][$objectIdentifier] = $acl;
|
||||||
@ -596,9 +596,9 @@ QUERY;
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (null === $fieldName) {
|
if (null === $fieldName) {
|
||||||
$loadedAces[$aceId] = new Entry((integer) $aceId, $acl, $sids[$key], $grantingStrategy, (integer) $mask, !!$granting, !!$auditFailure, !!$auditSuccess);
|
$loadedAces[$aceId] = new Entry((int) $aceId, $acl, $sids[$key], $grantingStrategy, (int) $mask, !!$granting, !!$auditFailure, !!$auditSuccess);
|
||||||
} else {
|
} else {
|
||||||
$loadedAces[$aceId] = new FieldEntry((integer) $aceId, $acl, $fieldName, $sids[$key], $grantingStrategy, (integer) $mask, !!$granting, !!$auditFailure, !!$auditSuccess);
|
$loadedAces[$aceId] = new FieldEntry((int) $aceId, $acl, $fieldName, $sids[$key], $grantingStrategy, (int) $mask, !!$granting, !!$auditFailure, !!$auditSuccess);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$ace = $loadedAces[$aceId];
|
$ace = $loadedAces[$aceId];
|
||||||
|
@ -49,7 +49,7 @@ class AuthenticationProviderManager implements AuthenticationManagerInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->providers = $providers;
|
$this->providers = $providers;
|
||||||
$this->eraseCredentials = (Boolean) $eraseCredentials;
|
$this->eraseCredentials = (bool) $eraseCredentials;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setEventDispatcher(EventDispatcherInterface $dispatcher)
|
public function setEventDispatcher(EventDispatcherInterface $dispatcher)
|
||||||
|
@ -131,7 +131,7 @@ abstract class AbstractToken implements TokenInterface
|
|||||||
*/
|
*/
|
||||||
public function setAuthenticated($authenticated)
|
public function setAuthenticated($authenticated)
|
||||||
{
|
{
|
||||||
$this->authenticated = (Boolean) $authenticated;
|
$this->authenticated = (bool) $authenticated;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -251,7 +251,7 @@ abstract class AbstractToken implements TokenInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->user instanceof EquatableInterface) {
|
if ($this->user instanceof EquatableInterface) {
|
||||||
return ! (Boolean) $this->user->isEqualTo($user);
|
return ! (bool) $this->user->isEqualTo($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->user->getPassword() !== $user->getPassword()) {
|
if ($this->user->getPassword() !== $user->getPassword()) {
|
||||||
|
@ -45,8 +45,8 @@ class AccessDecisionManager implements AccessDecisionManagerInterface
|
|||||||
|
|
||||||
$this->voters = $voters;
|
$this->voters = $voters;
|
||||||
$this->strategy = 'decide'.ucfirst($strategy);
|
$this->strategy = 'decide'.ucfirst($strategy);
|
||||||
$this->allowIfAllAbstainDecisions = (Boolean) $allowIfAllAbstainDecisions;
|
$this->allowIfAllAbstainDecisions = (bool) $allowIfAllAbstainDecisions;
|
||||||
$this->allowIfEqualGrantedDeniedDecisions = (Boolean) $allowIfEqualGrantedDeniedDecisions;
|
$this->allowIfEqualGrantedDeniedDecisions = (bool) $allowIfEqualGrantedDeniedDecisions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,7 +41,7 @@ class FormAuthenticationEntryPoint implements AuthenticationEntryPointInterface
|
|||||||
$this->httpKernel = $kernel;
|
$this->httpKernel = $kernel;
|
||||||
$this->httpUtils = $httpUtils;
|
$this->httpUtils = $httpUtils;
|
||||||
$this->loginPath = $loginPath;
|
$this->loginPath = $loginPath;
|
||||||
$this->useForward = (Boolean) $useForward;
|
$this->useForward = (bool) $useForward;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -30,8 +30,8 @@ class StopwatchPeriod
|
|||||||
*/
|
*/
|
||||||
public function __construct($start, $end)
|
public function __construct($start, $end)
|
||||||
{
|
{
|
||||||
$this->start = (integer) $start;
|
$this->start = (int) $start;
|
||||||
$this->end = (integer) $end;
|
$this->end = (int) $end;
|
||||||
$this->memory = memory_get_usage(true);
|
$this->memory = memory_get_usage(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,6 +177,6 @@ class MoFileLoader extends ArrayLoader implements LoaderInterface
|
|||||||
$result = unpack($isBigEndian ? 'N1' : 'V1', fread($stream, 4));
|
$result = unpack($isBigEndian ? 'N1' : 'V1', fread($stream, 4));
|
||||||
$result = current($result);
|
$result = current($result);
|
||||||
|
|
||||||
return (integer) substr($result, -8);
|
return (int) substr($result, -8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ class PoFileLoader extends ArrayLoader implements LoaderInterface
|
|||||||
$item['ids']['plural'] = substr($line, 14, -1);
|
$item['ids']['plural'] = substr($line, 14, -1);
|
||||||
} elseif (substr($line, 0, 7) === 'msgstr[') {
|
} elseif (substr($line, 0, 7) === 'msgstr[') {
|
||||||
$size = strpos($line, ']');
|
$size = strpos($line, ']');
|
||||||
$item['translated'][(integer) substr($line, 7, 1)] = substr($line, $size + 3, -1);
|
$item['translated'][(int) substr($line, 7, 1)] = substr($line, $size + 3, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ class Inline
|
|||||||
// array
|
// array
|
||||||
$keys = array_keys($value);
|
$keys = array_keys($value);
|
||||||
if ((1 == count($keys) && '0' == $keys[0])
|
if ((1 == count($keys) && '0' == $keys[0])
|
||||||
|| (count($keys) > 1 && array_reduce($keys, function ($v, $w) { return (integer) $v + $w; }, 0) == count($keys) * (count($keys) - 1) / 2)
|
|| (count($keys) > 1 && array_reduce($keys, function ($v, $w) { return (int) $v + $w; }, 0) == count($keys) * (count($keys) - 1) / 2)
|
||||||
) {
|
) {
|
||||||
$output = array();
|
$output = array();
|
||||||
foreach ($value as $val) {
|
foreach ($value as $val) {
|
||||||
|
Reference in New Issue
Block a user