@@ -80,7 +80,7 @@ |
||
| 80 | 80 | $this->classListeners[$eventName][$loweredClass][$format] = $this->initializeListeners($eventName, $loweredClass, $format); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - return !!$this->classListeners[$eventName][$loweredClass][$format]; |
|
| 83 | + return ! ! $this->classListeners[$eventName][$loweredClass][$format]; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | public function dispatch($eventName, $class, $format, Event $event) |
@@ -83,16 +83,16 @@ |
||
| 83 | 83 | $addition = ''; |
| 84 | 84 | |
| 85 | 85 | $lines = explode("\n", $content); |
| 86 | - for ($i=0,$c=count($lines); $i<$c; $i++) { |
|
| 86 | + for ($i = 0, $c = count($lines); $i < $c; $i++) { |
|
| 87 | 87 | if ($this->indentationLevel > 0 |
| 88 | - && !empty($lines[$i]) |
|
| 88 | + && ! empty($lines[$i]) |
|
| 89 | 89 | && ((empty($addition) && "\n" === substr($this->content, -1)) || "\n" === substr($addition, -1))) { |
| 90 | 90 | $addition .= str_repeat(' ', $this->indentationLevel * $this->indentationSpaces); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | $addition .= $lines[$i]; |
| 94 | 94 | |
| 95 | - if ($i+1 < $c) { |
|
| 95 | + if ($i + 1 < $c) { |
|
| 96 | 96 | $addition .= "\n"; |
| 97 | 97 | } |
| 98 | 98 | } |
@@ -346,7 +346,6 @@ |
||
| 346 | 346 | /** |
| 347 | 347 | * Retrieves internalSubset even in bugfixed php versions |
| 348 | 348 | * |
| 349 | - * @param \DOMDocumentType $child |
|
| 350 | 349 | * @param string $data |
| 351 | 350 | * @return string |
| 352 | 351 | */ |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | if (false !== stripos($data, '<!doctype')) { |
| 65 | 65 | $internalSubset = $this->getDomDocumentTypeEntitySubset($data); |
| 66 | - if (!in_array($internalSubset, $this->doctypeWhitelist, true)) { |
|
| 66 | + if ( ! in_array($internalSubset, $this->doctypeWhitelist, true)) { |
|
| 67 | 67 | throw new InvalidArgumentException(sprintf( |
| 68 | 68 | 'The document type "%s" is not allowed. If it is safe, you may add it to the whitelist configuration.', |
| 69 | 69 | $internalSubset |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | |
| 148 | 148 | if ($namespace === null && $this->objectMetadataStack->count()) { |
| 149 | 149 | $classMetadata = $this->objectMetadataStack->top(); |
| 150 | - $namespace = isset($classMetadata->xmlNamespaces[''])?$classMetadata->xmlNamespaces['']:$namespace; |
|
| 150 | + $namespace = isset($classMetadata->xmlNamespaces['']) ? $classMetadata->xmlNamespaces[''] : $namespace; |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | if (null !== $namespace) { |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $nodes = $data->xpath($entryName); |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - if (!count($nodes)) { |
|
| 161 | + if ( ! count($nodes)) { |
|
| 162 | 162 | if (null === $this->result) { |
| 163 | 163 | return $this->result = array(); |
| 164 | 164 | } |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | |
| 250 | 250 | if ($metadata->xmlCollection) { |
| 251 | 251 | $enclosingElem = $data; |
| 252 | - if (!$metadata->xmlCollectionInline) { |
|
| 252 | + if ( ! $metadata->xmlCollectionInline) { |
|
| 253 | 253 | $enclosingElem = $data->children($metadata->xmlNamespace)->$name; |
| 254 | 254 | } |
| 255 | 255 | |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | |
| 264 | 264 | if ($metadata->xmlNamespace) { |
| 265 | 265 | $node = $data->children($metadata->xmlNamespace)->$name; |
| 266 | - if (!$node->count()) { |
|
| 266 | + if ( ! $node->count()) { |
|
| 267 | 267 | return; |
| 268 | 268 | } |
| 269 | 269 | } else { |
@@ -273,9 +273,9 @@ discard block |
||
| 273 | 273 | if (isset($namespaces[''])) { |
| 274 | 274 | $prefix = uniqid('ns-'); |
| 275 | 275 | $data->registerXPathNamespace($prefix, $namespaces['']); |
| 276 | - $nodes = $data->xpath('./'.$prefix. ':'.$name ); |
|
| 276 | + $nodes = $data->xpath('./'.$prefix.':'.$name); |
|
| 277 | 277 | } else { |
| 278 | - $nodes = $data->xpath('./'. $name ); |
|
| 278 | + $nodes = $data->xpath('./'.$name); |
|
| 279 | 279 | } |
| 280 | 280 | if (empty($nodes)) { |
| 281 | 281 | return; |
@@ -256,7 +256,7 @@ |
||
| 256 | 256 | */ |
| 257 | 257 | public function getCurrentPath() |
| 258 | 258 | { |
| 259 | - if (!$this->metadataStack) { |
|
| 259 | + if ( ! $this->metadataStack) { |
|
| 260 | 260 | return array(); |
| 261 | 261 | } |
| 262 | 262 | |
@@ -169,13 +169,13 @@ |
||
| 169 | 169 | $parentStr |
| 170 | 170 | ) = $unserialized; |
| 171 | 171 | |
| 172 | - if (isset($unserialized['xmlEntryNamespace'])){ |
|
| 172 | + if (isset($unserialized['xmlEntryNamespace'])) { |
|
| 173 | 173 | $this->xmlEntryNamespace = $unserialized['xmlEntryNamespace']; |
| 174 | 174 | } |
| 175 | - if (isset($unserialized['xmlCollectionSkipWhenEmpty'])){ |
|
| 175 | + if (isset($unserialized['xmlCollectionSkipWhenEmpty'])) { |
|
| 176 | 176 | $this->xmlCollectionSkipWhenEmpty = $unserialized['xmlCollectionSkipWhenEmpty']; |
| 177 | 177 | } |
| 178 | - if (isset($unserialized['excludeIf'])){ |
|
| 178 | + if (isset($unserialized['excludeIf'])) { |
|
| 179 | 179 | $this->excludeIf = $unserialized['excludeIf']; |
| 180 | 180 | } |
| 181 | 181 | |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | $this->name |
| 101 | 101 | ) = $unserialized; |
| 102 | 102 | |
| 103 | - if (isset($unserialized['excludeIf'])){ |
|
| 103 | + if (isset($unserialized['excludeIf'])) { |
|
| 104 | 104 | $this->excludeIf = $unserialized['excludeIf']; |
| 105 | 105 | } |
| 106 | 106 | } |
@@ -159,7 +159,7 @@ |
||
| 159 | 159 | } elseif ($annot instanceof Expose) { |
| 160 | 160 | $isExpose = true; |
| 161 | 161 | if (null !== $annot->if) { |
| 162 | - $propertyMetadata->excludeIf = "!(" . $annot->if . ")"; |
|
| 162 | + $propertyMetadata->excludeIf = "!(".$annot->if.")"; |
|
| 163 | 163 | } |
| 164 | 164 | } elseif ($annot instanceof Exclude) { |
| 165 | 165 | if (null !== $annot->if) { |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | ? null |
| 57 | 57 | : $context->attributes->get('validation_groups')->get(); |
| 58 | 58 | |
| 59 | - if (!$groups) { |
|
| 59 | + if ( ! $groups) { |
|
| 60 | 60 | return; |
| 61 | 61 | } |
| 62 | 62 | |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | if (($this->skipVirtualTypeInit && $virtualType) || |
| 63 | - (!$object instanceof Proxy && !$object instanceof ORMProxy) |
|
| 63 | + ( ! $object instanceof Proxy && ! $object instanceof ORMProxy) |
|
| 64 | 64 | ) { |
| 65 | 65 | return; |
| 66 | 66 | } |