Fabien Potencier 14 năm trước cách đây
mục cha
commit
f57e1d3e10
24 tập tin đã thay đổi với 53 bổ sung53 xóa
  1. 3 3
      src/Symfony/Bridge/Doctrine/Mapping/Driver/XmlDriver.php
  2. 3 3
      src/Symfony/Bridge/Doctrine/Mapping/Driver/YamlDriver.php
  3. 1 1
      src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php
  4. 5 5
      src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/AbstractDoctrineExtensionTest.php
  5. 3 3
      src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/XMLSchemaTest.php
  6. 2 2
      src/Symfony/Bundle/DoctrineBundle/Tests/TestCase.php
  7. 2 2
      src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/datetime_widget.html.php
  8. 1 1
      src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
  9. 2 2
      src/Symfony/Bundle/MonologBundle/Tests/DependencyInjection/MonologExtensionTest.php
  10. 1 1
      src/Symfony/Component/Console/Formatter/OutputFormatter.php
  11. 1 1
      src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php
  12. 11 11
      src/Symfony/Component/Form/Extension/Validator/Validator/DelegatingValidator.php
  13. 1 1
      src/Symfony/Component/HttpFoundation/Request.php
  14. 1 1
      src/Symfony/Component/HttpKernel/Profiler/MysqlProfilerStorage.php
  15. 1 1
      src/Symfony/Component/Locale/Resources/data/update-data.php
  16. 2 2
      src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php
  17. 1 1
      src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php
  18. 1 1
      src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php
  19. 2 2
      src/Symfony/Component/Locale/Stub/StubNumberFormatter.php
  20. 1 1
      src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php
  21. 4 4
      src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
  22. 1 1
      src/Symfony/Component/Translation/Loader/XliffFileLoader.php
  23. 2 2
      src/Symfony/Component/Validator/Constraints/FileValidator.php
  24. 1 1
      src/Symfony/Component/Validator/Constraints/TypeValidator.php

+ 3 - 3
src/Symfony/Bridge/Doctrine/Mapping/Driver/XmlDriver.php

@@ -117,11 +117,11 @@ class XmlDriver extends BaseXmlDriver
 
     protected function _findMappingFile($className)
     {
-        $defaultFileName = str_replace('\\', '.', $className) . $this->_fileExtension;
+        $defaultFileName = str_replace('\\', '.', $className).$this->_fileExtension;
         foreach ($this->_paths as $path) {
             if (!isset($this->_prefixes[$path])) {
-                if (file_exists($path . DIRECTORY_SEPARATOR . $defaultFileName)) {
-                    return $path . DIRECTORY_SEPARATOR . $defaultFileName;
+                if (file_exists($path.DIRECTORY_SEPARATOR.$defaultFileName)) {
+                    return $path.DIRECTORY_SEPARATOR.$defaultFileName;
                 }
 
                 continue;

+ 3 - 3
src/Symfony/Bridge/Doctrine/Mapping/Driver/YamlDriver.php

@@ -117,11 +117,11 @@ class YamlDriver extends BaseYamlDriver
 
     protected function _findMappingFile($className)
     {
-        $defaultFileName = str_replace('\\', '.', $className) . $this->_fileExtension;
+        $defaultFileName = str_replace('\\', '.', $className).$this->_fileExtension;
         foreach ($this->_paths as $path) {
             if (!isset($this->_prefixes[$path])) {
-                if (file_exists($path . DIRECTORY_SEPARATOR . $defaultFileName)) {
-                    return $path . DIRECTORY_SEPARATOR . $defaultFileName;
+                if (file_exists($path.DIRECTORY_SEPARATOR.$defaultFileName)) {
+                    return $path.DIRECTORY_SEPARATOR.$defaultFileName;
                 }
 
                 continue;

+ 1 - 1
src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php

@@ -73,7 +73,7 @@ class UniqueEntityValidator extends ConstraintValidator
 
         if (count($result) > 0 && $result[0] !== $entity) {
             $oldPath = $this->context->getPropertyPath();
-            $this->context->setPropertyPath( empty($oldPath) ? $fields[0] : $oldPath . "." . $fields[0]);
+            $this->context->setPropertyPath( empty($oldPath) ? $fields[0] : $oldPath.".".$fields[0]);
             $this->context->addViolation($constraint->message, array(), $criteria[$fields[0]]);
             $this->context->setPropertyPath($oldPath);
         }

+ 5 - 5
src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/AbstractDoctrineExtensionTest.php

@@ -689,7 +689,7 @@ abstract class AbstractDoctrineExtensionTest extends TestCase
             'kernel.debug'       => false,
             'kernel.bundles'     => $map,
             'kernel.cache_dir'   => sys_get_temp_dir(),
-            'kernel.root_dir'    => __DIR__ . '/../../../../../' // src dir
+            'kernel.root_dir'    => __DIR__.'/../../../../../' // src dir
         )));
     }
 
@@ -706,7 +706,7 @@ abstract class AbstractDoctrineExtensionTest extends TestCase
 
     protected function assertDICConstructorArguments($definition, $args)
     {
-        $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '" . $definition->getClass()."' don't match.");
+        $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '".$definition->getClass()."' don't match.");
     }
 
     protected function assertDICDefinitionMethodCallAt($pos, $definition, $methodName, array $params = null)
@@ -716,7 +716,7 @@ abstract class AbstractDoctrineExtensionTest extends TestCase
             $this->assertEquals($methodName, $calls[$pos][0], "Method '".$methodName."' is expected to be called at position $pos.");
 
             if ($params !== null) {
-                $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '" . $methodName . "' do not match the actual parameters.");
+                $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '".$methodName."' do not match the actual parameters.");
             }
         }
     }
@@ -740,13 +740,13 @@ abstract class AbstractDoctrineExtensionTest extends TestCase
                 } else {
                     $called = true;
                     if ($params !== null) {
-                        $this->assertEquals($params, $call[1], "Expected parameters to methods '" . $methodName . "' do not match the actual parameters.");
+                        $this->assertEquals($params, $call[1], "Expected parameters to methods '".$methodName."' do not match the actual parameters.");
                     }
                 }
             }
         }
         if (!$called) {
-            $this->fail("Method '" . $methodName . "' is expected to be called once, definition does not contain a call though.");
+            $this->fail("Method '".$methodName."' is expected to be called once, definition does not contain a call though.");
         }
     }
 

+ 3 - 3
src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/XMLSchemaTest.php

@@ -16,7 +16,7 @@ class XMLSchemaTest extends \PHPUnit_Framework_TestCase
     static public function dataValidateSchemaFiles()
     {
         $schemaFiles = array();
-        $di = new \DirectoryIterator(__DIR__ . "/Fixtures/config/xml");
+        $di = new \DirectoryIterator(__DIR__."/Fixtures/config/xml");
         foreach ($di as $element) {
             if ($element->isFile() && strpos($element->getFilename(), ".xml") !== false) {
                 $schemaFiles[] = array($element->getPathname());
@@ -43,7 +43,7 @@ class XMLSchemaTest extends \PHPUnit_Framework_TestCase
             $dbalNode = $dbalDom->importNode($dbalElements->item(0));
             $dbalDom->appendChild($dbalNode);
 
-            $ret = $dbalDom->schemaValidate(__DIR__ . "/../../Resources/config/schema/doctrine-1.0.xsd");
+            $ret = $dbalDom->schemaValidate(__DIR__."/../../Resources/config/schema/doctrine-1.0.xsd");
             $this->assertTrue($ret, "DoctrineBundle Dependency Injection XMLSchema did not validate this XML instance.");
             $found = true;
         }
@@ -54,7 +54,7 @@ class XMLSchemaTest extends \PHPUnit_Framework_TestCase
             $ormNode = $ormDom->importNode($ormElements->item(0));
             $ormDom->appendChild($ormNode);
 
-            $ret = $ormDom->schemaValidate(__DIR__ . "/../../Resources/config/schema/doctrine-1.0.xsd");
+            $ret = $ormDom->schemaValidate(__DIR__."/../../Resources/config/schema/doctrine-1.0.xsd");
             $this->assertTrue($ret, "DoctrineBundle Dependency Injection XMLSchema did not validate this XML instance.");
             $found = true;
         }

+ 2 - 2
src/Symfony/Bundle/DoctrineBundle/Tests/TestCase.php

@@ -35,7 +35,7 @@ class TestCase extends \PHPUnit_Framework_TestCase
             'kernel.debug'       => false,
             'kernel.bundles'     => array('YamlBundle' => 'Fixtures\Bundles\YamlBundle\YamlBundle'),
             'kernel.cache_dir'   => sys_get_temp_dir(),
-            'kernel.root_dir'    => __DIR__ . '/../../../../' // src dir
+            'kernel.root_dir'    => __DIR__.'/../../../../' // src dir
         )));
         $container->set('annotation_reader', new AnnotationReader());
         $loader = new DoctrineExtension();
@@ -59,7 +59,7 @@ class TestCase extends \PHPUnit_Framework_TestCase
                     'default' => array(
                     'mappings' => array('YamlBundle' => array(
                         'type' => 'yml',
-                        'dir' => __DIR__ . '/DependencyInjection/Fixtures/Bundles/YamlBundle/Resources/config/doctrine',
+                        'dir' => __DIR__.'/DependencyInjection/Fixtures/Bundles/YamlBundle/Resources/config/doctrine',
                         'prefix' => 'Fixtures\Bundles\YamlBundle\Entity',
                     )
                 )

+ 2 - 2
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/datetime_widget.html.php

@@ -1,5 +1,5 @@
 <div <?php echo $view['form']->renderBlock('container_attributes') ?>>
     <?php echo $view['form']->widget($form['date'])
-        . ' '
-        . $view['form']->widget($form['time']) ?>
+       .' '
+       .$view['form']->widget($form['time']) ?>
 </div>

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

@@ -204,7 +204,7 @@ abstract class FrameworkExtensionTest extends TestCase
 
     public function testValidationPaths()
     {
-        require_once __DIR__ . "/Fixtures/TestBundle/TestBundle.php";
+        require_once __DIR__."/Fixtures/TestBundle/TestBundle.php";
 
         $container = $this->createContainerFromFile('validation_annotations', array(
             'kernel.bundles' => array('TestBundle' => 'Symfony\Bundle\FrameworkBundle\Tests\TestBundle'),

+ 2 - 2
src/Symfony/Bundle/MonologBundle/Tests/DependencyInjection/MonologExtensionTest.php

@@ -257,7 +257,7 @@ class MonologExtensionTest extends TestCase
 
     protected function assertDICConstructorArguments($definition, $args)
     {
-        $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '" . $definition->getClass()."' don't match.");
+        $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '".$definition->getClass()."' don't match.");
     }
 
     protected function assertDICDefinitionMethodCallAt($pos, $definition, $methodName, array $params = null)
@@ -267,7 +267,7 @@ class MonologExtensionTest extends TestCase
             $this->assertEquals($methodName, $calls[$pos][0], "Method '".$methodName."' is expected to be called at position $pos.");
 
             if ($params !== null) {
-                $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '" . $methodName . "' do not match the actual parameters.");
+                $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '".$methodName."' do not match the actual parameters.");
             }
         }
     }

+ 1 - 1
src/Symfony/Component/Console/Formatter/OutputFormatter.php

@@ -108,7 +108,7 @@ class OutputFormatter implements OutputFormatterInterface
     public function getStyle($name)
     {
         if (!$this->hasStyle($name)) {
-            throw new \InvalidArgumentException('Undefined style: ' . $name);
+            throw new \InvalidArgumentException('Undefined style: '.$name);
         }
 
         return $this->styles[strtolower($name)];

+ 1 - 1
src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php

@@ -34,7 +34,7 @@ class FixUrlProtocolListener implements EventSubscriberInterface
         $data = $event->getData();
 
         if ($this->defaultProtocol && $data && !preg_match('~^\w+://~', $data)) {
-            $event->setData($this->defaultProtocol . '://' . $data);
+            $event->setData($this->defaultProtocol.'://'.$data);
         }
     }
 

+ 11 - 11
src/Symfony/Component/Form/Extension/Validator/Validator/DelegatingValidator.php

@@ -136,7 +136,7 @@ class DelegatingValidator implements FormValidatorInterface
     {
         foreach ($form->getAttribute('error_mapping') as $nestedDataPath => $nestedNamePath)
         {
-            $mapping['/^'.preg_quote($formPath . '.data.' . $nestedDataPath).'(?!\w)/'] = $namePath . '.' . $nestedNamePath;
+            $mapping['/^'.preg_quote($formPath.'.data.'.$nestedDataPath).'(?!\w)/'] = $namePath.'.'.$nestedNamePath;
         }
 
         $iterator = new VirtualFormAwareIterator($form->getChildren());
@@ -146,17 +146,17 @@ class DelegatingValidator implements FormValidatorInterface
             $path = (string)$child->getAttribute('property_path');
             $parts = explode('.', $path, 2);
 
-            $nestedNamePath = $namePath . '.' . $child->getName();
+            $nestedNamePath = $namePath.'.'.$child->getName();
 
             if ($child->hasChildren() || isset($parts[1])) {
-                $nestedFormPath = $formPath . '[' . trim($parts[0], '[]') . ']';
+                $nestedFormPath = $formPath.'['.trim($parts[0], '[]').']';
             }
             else {
-                $nestedFormPath = $formPath . '.data.' . $parts[0];
+                $nestedFormPath = $formPath.'.data.'.$parts[0];
             }
 
             if (isset($parts[1])) {
-                $nestedFormPath .= '.data.' . $parts[1];
+                $nestedFormPath .= '.data.'.$parts[1];
             }
 
             if ($child->hasChildren()) {
@@ -171,7 +171,7 @@ class DelegatingValidator implements FormValidatorInterface
     {
         foreach ($form->getAttribute('error_mapping') as $nestedDataPath => $nestedNamePath)
         {
-            $mapping['/^'.preg_quote($dataPath . '.' . $nestedDataPath).'(?!\w)/'] = $namePath . '.' . $nestedNamePath;
+            $mapping['/^'.preg_quote($dataPath.'.'.$nestedDataPath).'(?!\w)/'] = $namePath.'.'.$nestedNamePath;
         }
 
         $iterator = new VirtualFormAwareIterator($form->getChildren());
@@ -180,14 +180,14 @@ class DelegatingValidator implements FormValidatorInterface
         foreach ($iterator as $child) {
             $path = (string)$child->getAttribute('property_path');
 
-            $nestedNamePath = $namePath . '.' . $child->getName();
+            $nestedNamePath = $namePath.'.'.$child->getName();
 
             if (strpos($path, '[') === 0) {
-                $nestedDataPaths = array($dataPath . $path);
+                $nestedDataPaths = array($dataPath.$path);
             } else {
-                $nestedDataPaths = array($dataPath . '.' . $path);
+                $nestedDataPaths = array($dataPath.'.'.$path);
                 if ($child->hasChildren()) {
-                    $nestedDataPaths[] = $dataPath . '[' . $path . ']';
+                    $nestedDataPaths[] = $dataPath.'['.$path.']';
                 }
             }
 
@@ -215,7 +215,7 @@ class DelegatingValidator implements FormValidatorInterface
         $iterator = new \RecursiveIteratorIterator($iterator);
 
         foreach ($iterator as $child) {
-            $nestedNamePath = $namePath . '.' . $child->getName();
+            $nestedNamePath = $namePath.'.'.$child->getName();
             $forms[$nestedNamePath] = $child;
 
             if ($child->hasChildren()) {

+ 1 - 1
src/Symfony/Component/HttpFoundation/Request.php

@@ -207,7 +207,7 @@ class Request
             $query = array_replace($qs, $query);
         }
 
-        $uri = $components['path'] . ($queryString ? '?'.$queryString : '');
+        $uri = $components['path'].($queryString ? '?'.$queryString : '');
 
         $server = array_replace($defaults, $server, array(
             'REQUEST_METHOD'       => strtoupper($method),

+ 1 - 1
src/Symfony/Component/HttpKernel/Profiler/MysqlProfilerStorage.php

@@ -25,7 +25,7 @@ class MysqlProfilerStorage extends PdoProfilerStorage
     {
         if (null === $this->db) {
             if ('mysql' !== substr($this->dsn, 0, 5)) {
-                throw new \RuntimeException('Please check your configuration. You are trying to use Mysql with a wrong dsn. "' . $this->dsn . '"');
+                throw new \RuntimeException('Please check your configuration. You are trying to use Mysql with a wrong dsn. "'.$this->dsn.'"');
             }
 
             if (!class_exists('PDO') || !in_array('mysql', \PDO::getAvailableDrivers(), true)) {

+ 1 - 1
src/Symfony/Component/Locale/Resources/data/update-data.php

@@ -363,7 +363,7 @@ foreach ($translatedLocales as $translatedLocale) {
         }
 
         if (count($extras) > 0) {
-            $langName .= ' (' . implode(', ', $extras) . ')';
+            $langName .= ' ('.implode(', ', $extras).')';
         }
 
         $localeNames[$supportedLocale] = $langName;

+ 2 - 2
src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php

@@ -180,7 +180,7 @@ class FullTransformer
                 $transformer = $transformers[$transformerIndex];
                 $captureName = str_repeat($transformerIndex, $length);
 
-                return "(?P<$captureName>" . $transformer->getReverseMatchingRegExp($length) . ')';
+                return "(?P<$captureName>".$transformer->getReverseMatchingRegExp($length).')';
             }
         }, $escapedPattern);
 
@@ -224,7 +224,7 @@ class FullTransformer
         $specialCharsArray = str_split($specialChars);
 
         $specialCharsMatch = implode('|', array_map(function($char) {
-            return $char . '+';
+            return $char.'+';
         }, $specialCharsArray));
 
         return $specialCharsMatch;

+ 1 - 1
src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php

@@ -30,7 +30,7 @@ class QuarterTransformer extends Transformer
             case 2:
                 return $this->padLeft($quarter, $length);
             case 3:
-                return 'Q' . $quarter;
+                return 'Q'.$quarter;
             default:
                 $map = array(1 => '1st quarter', 2 => '2nd quarter', 3 => '3rd quarter', 4 => '4th quarter');
 

+ 1 - 1
src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php

@@ -85,7 +85,7 @@ class TimeZoneTransformer extends Transformer
                 ));
             }
 
-            return 'Etc/GMT' . ($hours != 0 ? $signal . $hours : '');
+            return 'Etc/GMT'.($hours != 0 ? $signal.$hours : '');
         }
 
         throw new \InvalidArgumentException('The GMT time zone \'%s\' does not match with the supported formats GMT[+-]HH:MM or GMT[+-]HHMM.');

+ 2 - 2
src/Symfony/Component/Locale/Stub/StubNumberFormatter.php

@@ -302,7 +302,7 @@ class StubNumberFormatter
     {
         // The original NumberFormatter does not support this format type
         if ($type == self::TYPE_CURRENCY) {
-            trigger_error(__METHOD__ . '(): Unsupported format type ' . $type, \E_USER_WARNING);
+            trigger_error(__METHOD__.'(): Unsupported format type '.$type, \E_USER_WARNING);
 
             return false;
         }
@@ -439,7 +439,7 @@ class StubNumberFormatter
     public function parse($value, $type = self::TYPE_DOUBLE, &$position = null)
     {
         if ($type == self::TYPE_DEFAULT || $type == self::TYPE_CURRENCY) {
-            trigger_error(__METHOD__ . '(): Unsupported format type ' . $type, \E_USER_WARNING);
+            trigger_error(__METHOD__.'(): Unsupported format type '.$type, \E_USER_WARNING);
 
             return false;
         }

+ 1 - 1
src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php

@@ -39,7 +39,7 @@ $finder = new Finder();
 $finder->name('*Platform.php')->in(dirname($reflection->getFileName()));
 foreach ($finder as $file) {
     require_once $file->getPathName();
-    $className = 'Doctrine\\DBAL\\Platforms\\' . $file->getBasename('.php');
+    $className = 'Doctrine\\DBAL\\Platforms\\'.$file->getBasename('.php');
 
     $reflection = new ReflectionClass($className);
     if ($reflection->isAbstract()) {

+ 4 - 4
src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php

@@ -82,9 +82,9 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer
                     unset($data[$paramName]);
                 } else if (!$constructorParameter->isOptional()) {
                     throw new RuntimeException(
-                        'Cannot create an instance of ' . $class .
-                        ' from serialized data because its constructor requires ' .
-                        'parameter "' . $constructorParameter->getName() .
+                        'Cannot create an instance of '.$class.
+                        ' from serialized data because its constructor requires '.
+                        'parameter "'.$constructorParameter->getName().
                         '" to be present.');
                 }
             }
@@ -95,7 +95,7 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer
         }
 
         foreach ($data as $attribute => $value) {
-            $setter = 'set' . $attribute;
+            $setter = 'set'.$attribute;
             if (method_exists($object, $setter)) {
                 $object->$setter($value);
             }

+ 1 - 1
src/Symfony/Component/Translation/Loader/XliffFileLoader.php

@@ -56,7 +56,7 @@ class XliffFileLoader implements LoaderInterface
             throw new \Exception(implode("\n", $this->getXmlErrors()));
         }
 
-        $location = str_replace('\\', '/', __DIR__) . '/schema/dic/xliff-core/xml.xsd';
+        $location = str_replace('\\', '/', __DIR__).'/schema/dic/xliff-core/xml.xsd';
         $parts = explode('/', $location);
         if (preg_match('#^phar://#i', $location)) {
             $tmpfile = tempnam(sys_get_temp_dir(), 'sf2');

+ 2 - 2
src/Symfony/Component/Validator/Constraints/FileValidator.php

@@ -62,8 +62,8 @@ class FileValidator extends ConstraintValidator
 
             if ($size > $limit) {
                 $this->setMessage($constraint->maxSizeMessage, array(
-                    '{{ size }}'    => $size . $suffix,
-                    '{{ limit }}'   => $limit . $suffix,
+                    '{{ size }}'    => $size.$suffix,
+                    '{{ limit }}'   => $limit.$suffix,
                     '{{ file }}'    => $path,
                 ));
 

+ 1 - 1
src/Symfony/Component/Validator/Constraints/TypeValidator.php

@@ -23,7 +23,7 @@ class TypeValidator extends ConstraintValidator
         }
 
         $type = $constraint->type == 'boolean' ? 'bool' : $constraint->type;
-        $function = 'is_' . $type;
+        $function = 'is_'.$type;
 
         if (function_exists($function) && call_user_func($function, $value)) {
             return true;