Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/validator/ConstraintValidator.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
56 * | 56 * |
57 * @return string The type of the value | 57 * @return string The type of the value |
58 */ | 58 */ |
59 protected function formatTypeOf($value) | 59 protected function formatTypeOf($value) |
60 { | 60 { |
61 return is_object($value) ? get_class($value) : gettype($value); | 61 return \is_object($value) ? \get_class($value) : \gettype($value); |
62 } | 62 } |
63 | 63 |
64 /** | 64 /** |
65 * Returns a string representation of the value. | 65 * Returns a string representation of the value. |
66 * | 66 * |
105 } | 105 } |
106 | 106 |
107 return $value->format('Y-m-d H:i:s'); | 107 return $value->format('Y-m-d H:i:s'); |
108 } | 108 } |
109 | 109 |
110 if (is_object($value)) { | 110 if (\is_object($value)) { |
111 if (($format & self::OBJECT_TO_STRING) && method_exists($value, '__toString')) { | 111 if (($format & self::OBJECT_TO_STRING) && method_exists($value, '__toString')) { |
112 return $value->__toString(); | 112 return $value->__toString(); |
113 } | 113 } |
114 | 114 |
115 return 'object'; | 115 return 'object'; |
116 } | 116 } |
117 | 117 |
118 if (is_array($value)) { | 118 if (\is_array($value)) { |
119 return 'array'; | 119 return 'array'; |
120 } | 120 } |
121 | 121 |
122 if (is_string($value)) { | 122 if (\is_string($value)) { |
123 return '"'.$value.'"'; | 123 return '"'.$value.'"'; |
124 } | 124 } |
125 | 125 |
126 if (is_resource($value)) { | 126 if (\is_resource($value)) { |
127 return 'resource'; | 127 return 'resource'; |
128 } | 128 } |
129 | 129 |
130 if (null === $value) { | 130 if (null === $value) { |
131 return 'null'; | 131 return 'null'; |