@@ -467,9 +467,9 @@ discard block |
||
467 | 467 | public function getChildrenCenter() |
468 | 468 | { |
469 | 469 | $node = $this->getChildAt(0); |
470 | - $node1 = $this->getChildAt(count($this->children) - 1); |
|
470 | + $node1 = $this->getChildAt(count($this->children)-1); |
|
471 | 471 | |
472 | - return $node->getOffset() + (($node1->getOffset() - $node->getOffset()) + $node1->getWidth()) / 2; |
|
472 | + return $node->getOffset()+(($node1->getOffset()-$node->getOffset())+$node1->getWidth())/2; |
|
473 | 473 | } |
474 | 474 | |
475 | 475 | /** |
@@ -529,14 +529,14 @@ discard block |
||
529 | 529 | $yc = 0; |
530 | 530 | $xd = 0; |
531 | 531 | $yd = 0; |
532 | - $xa = $this->x + ($this->width / 2); |
|
533 | - $ya = $this->y + $this->height; |
|
532 | + $xa = $this->x+($this->width/2); |
|
533 | + $ya = $this->y+$this->height; |
|
534 | 534 | |
535 | 535 | foreach ($this->children as $child) { |
536 | - $xd = $xc = $child->getX() + ($child->getWidth() / 2); |
|
536 | + $xd = $xc = $child->getX()+($child->getWidth()/2); |
|
537 | 537 | $yd = $child->getY(); |
538 | 538 | $xb = $xa; |
539 | - $yb = $yc = $ya + ($yd - $ya) / 2; |
|
539 | + $yb = $yc = $ya+($yd-$ya)/2; |
|
540 | 540 | $this->links[$child->id]['xa'] = $xa; |
541 | 541 | $this->links[$child->id]['ya'] = $ya; |
542 | 542 | $this->links[$child->id]['xb'] = $xb; |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | $leftSibling = $node->getLeftSibling(); |
213 | 213 | |
214 | 214 | if (isset($leftSibling)) { |
215 | - $node->setOffset($leftSibling->getOffset() + $leftSibling->getWidth() + $this->colSpace); |
|
215 | + $node->setOffset($leftSibling->getOffset()+$leftSibling->getWidth()+$this->colSpace); |
|
216 | 216 | } else { |
217 | 217 | $node->setOffset(0); |
218 | 218 | } |
@@ -220,16 +220,16 @@ discard block |
||
220 | 220 | $childCount = $node->childCount(); |
221 | 221 | |
222 | 222 | for ($i = 0; $i < $childCount; ++$i) { |
223 | - $this->firstPass($node->getChildAt($i), $level + 1); |
|
223 | + $this->firstPass($node->getChildAt($i), $level+1); |
|
224 | 224 | } |
225 | 225 | |
226 | 226 | $midPoint = $node->getChildrenCenter(); |
227 | - $midPoint -= $node->getWidth() / 2; |
|
227 | + $midPoint -= $node->getWidth()/2; |
|
228 | 228 | $leftSibling = $node->getLeftSibling(); |
229 | 229 | |
230 | 230 | if (isset($leftSibling)) { |
231 | - $node->setOffset($leftSibling->getOffset() + $leftSibling->getWidth() + $this->colSpace); |
|
232 | - $node->setModifier($node->getOffset() - $midPoint); |
|
231 | + $node->setOffset($leftSibling->getOffset()+$leftSibling->getWidth()+$this->colSpace); |
|
232 | + $node->setModifier($node->getOffset()-$midPoint); |
|
233 | 233 | |
234 | 234 | $this->layout($node, $level); |
235 | 235 | } else { |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | } |
238 | 238 | } |
239 | 239 | |
240 | - self::$logger->debug('Memory usage at first scan ['.((memory_get_usage(true) / 1024) / 1024).' MB]'); |
|
240 | + self::$logger->debug('Memory usage at first scan ['.((memory_get_usage(true)/1024)/1024).' MB]'); |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | /** |
@@ -252,17 +252,17 @@ discard block |
||
252 | 252 | */ |
253 | 253 | private function secondPass($node, $level, $x = 0, $y = 0) |
254 | 254 | { |
255 | - $nodeX = $node->getOffset() + $x; |
|
255 | + $nodeX = $node->getOffset()+$x; |
|
256 | 256 | $nodeY = $y; |
257 | 257 | |
258 | 258 | $node->setX($nodeX); |
259 | 259 | $node->setY($nodeY); |
260 | 260 | |
261 | - $this->height = ($this->height > $node->getY() + $node->getWidth()) ? $this->height : $node->getY() + $node->getWidth(); |
|
262 | - $this->width = ($this->width > $nodeX + $node->getWidth()) ? $this->width : $nodeX + $node->getWidth() + 10; |
|
261 | + $this->height = ($this->height > $node->getY()+$node->getWidth()) ? $this->height : $node->getY()+$node->getWidth(); |
|
262 | + $this->width = ($this->width > $nodeX+$node->getWidth()) ? $this->width : $nodeX+$node->getWidth()+10; |
|
263 | 263 | |
264 | 264 | if ($node->childCount() > 0) { |
265 | - $this->secondPass($node->getChildAt(0), $level + 1, $x + $node->getModifier(), $y + $node->getHeight() + $this->rowSpace); |
|
265 | + $this->secondPass($node->getChildAt(0), $level+1, $x+$node->getModifier(), $y+$node->getHeight()+$this->rowSpace); |
|
266 | 266 | } |
267 | 267 | |
268 | 268 | $rightSibling = $node->getRightSibling(); |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | $this->secondPass($rightSibling, $level, $x, $y); |
272 | 272 | } |
273 | 273 | |
274 | - self::$logger->debug('Memory usage at second scan ['.((memory_get_usage(true) / 1024) / 1024).' MB]'); |
|
274 | + self::$logger->debug('Memory usage at second scan ['.((memory_get_usage(true)/1024)/1024).' MB]'); |
|
275 | 275 | } |
276 | 276 | |
277 | 277 | /** |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | $modifierSumLeft += $leftAncestor->getModifier(); |
301 | 301 | } |
302 | 302 | |
303 | - $totalGap = ($firstChildLeftNeighbour->getOffset() + $modifierSumLeft + $firstChildLeftNeighbour->getWidth() + $this->branchSpace) - ($firstChild->getOffset() + $modifierSumRight); |
|
303 | + $totalGap = ($firstChildLeftNeighbour->getOffset()+$modifierSumLeft+$firstChildLeftNeighbour->getWidth()+$this->branchSpace)-($firstChild->getOffset()+$modifierSumRight); |
|
304 | 304 | |
305 | 305 | if ($totalGap > 0) { |
306 | 306 | $subTree = $node; |
@@ -312,14 +312,14 @@ discard block |
||
312 | 312 | } |
313 | 313 | |
314 | 314 | $subTreeMove = $node; |
315 | - $singleGap = $totalGap / $subTreesCount; |
|
315 | + $singleGap = $totalGap/$subTreesCount; |
|
316 | 316 | |
317 | 317 | while (isset($subTreeMove) && $subTreeMove !== $leftAncestor) { |
318 | 318 | $subTreeMove = $subTreeMove->getLeftSibling(); |
319 | 319 | |
320 | 320 | if (isset($subTreeMove)) { |
321 | - $subTreeMove->setOffset($subTreeMove->getOffset() + $totalGap); |
|
322 | - $subTreeMove->setModifier($subTreeMove->getModifier() + $totalGap); |
|
321 | + $subTreeMove->setOffset($subTreeMove->getOffset()+$totalGap); |
|
322 | + $subTreeMove->setModifier($subTreeMove->getModifier()+$totalGap); |
|
323 | 323 | $totalGap -= $singleGap; |
324 | 324 | } |
325 | 325 | } |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | for ($i = 0; $i < $childCount; ++$i) { |
384 | 384 | $child = $node->getChildAt($i); |
385 | 385 | |
386 | - $leftmostDescendant = $this->getLeftmost($child, $level + 1, $maxlevel); |
|
386 | + $leftmostDescendant = $this->getLeftmost($child, $level+1, $maxlevel); |
|
387 | 387 | |
388 | 388 | if (isset($leftmostDescendant)) { |
389 | 389 | return $leftmostDescendant; |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | $this->render(); |
452 | 452 | } |
453 | 453 | |
454 | - if (isset($this->nodes[$this->position + 1])) { |
|
454 | + if (isset($this->nodes[$this->position+1])) { |
|
455 | 455 | ++$this->position; |
456 | 456 | |
457 | 457 | return $this->nodes[$this->position]; |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | */ |
470 | 470 | public function hasNext() |
471 | 471 | { |
472 | - if (isset($this->nodes[$this->position + 1])) { |
|
472 | + if (isset($this->nodes[$this->position+1])) { |
|
473 | 473 | return true; |
474 | 474 | } else { |
475 | 475 | return false; |
@@ -379,6 +379,6 @@ |
||
379 | 379 | */ |
380 | 380 | public static function isBase64($value) |
381 | 381 | { |
382 | - return (bool) preg_match('/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/', $value); |
|
382 | + return (bool)preg_match('/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/', $value); |
|
383 | 383 | } |
384 | 384 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * |
74 | 74 | * @since 1.0 |
75 | 75 | */ |
76 | - private $excludeSubDirectories = array('cache','lib','docs','attachments','dist','vendor'); |
|
76 | + private $excludeSubDirectories = array('cache', 'lib', 'docs', 'attachments', 'dist', 'vendor'); |
|
77 | 77 | |
78 | 78 | /** |
79 | 79 | * The Total Lines of Code (TLOC) for the project. |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | * |
147 | 147 | * @since 1.0 |
148 | 148 | */ |
149 | - private $comments = array('/','*','#'); |
|
149 | + private $comments = array('/', '*', '#'); |
|
150 | 150 | |
151 | 151 | /** |
152 | 152 | * Constructor, default $rootDir is . |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * |
57 | 57 | * @since 2.0 |
58 | 58 | */ |
59 | - private $HTTPMethods = array('HEAD','GET','POST','PUT','PATCH','DELETE','OPTIONS'); |
|
59 | + private $HTTPMethods = array('HEAD', 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'); |
|
60 | 60 | |
61 | 61 | /** |
62 | 62 | * The HTTP method of this request (must be in HTTPMethods array). |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | $URI = mb_substr($this->URI, 0, mb_strpos($this->URI, '?')); |
629 | 629 | |
630 | 630 | // let's take this opportunity to pass query string params to $this->params |
631 | - $queryString = mb_substr($this->URI, (mb_strpos($this->URI, '?') + 1)); |
|
631 | + $queryString = mb_substr($this->URI, (mb_strpos($this->URI, '?')+1)); |
|
632 | 632 | $this->queryString = $queryString; |
633 | 633 | parse_str($queryString, $this->params); |
634 | 634 | } else { |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | $name = $paramNames[$i]; |
643 | 643 | |
644 | 644 | if (!isset($this->params[trim($name, '{}')])) { |
645 | - if (isset($paramValues[$i]) && substr($name, 0, 1) == '{' && substr($name, strlen($name) - 1, 1) == '}') { |
|
645 | + if (isset($paramValues[$i]) && substr($name, 0, 1) == '{' && substr($name, strlen($name)-1, 1) == '}') { |
|
646 | 646 | $this->params[trim($name, '{}')] = $paramValues[$i]; |
647 | 647 | } |
648 | 648 | if (!isset($paramValues[$i]) && isset($defaultParams[trim($name, '{}')])) { |
@@ -97,7 +97,7 @@ |
||
97 | 97 | // Execute the command and store the process ID |
98 | 98 | $output = array(); |
99 | 99 | exec($command, $output); |
100 | - $pid = (int) $output[0]; |
|
100 | + $pid = (int)$output[0]; |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | if (!isset($pid)) { |
@@ -95,7 +95,7 @@ |
||
95 | 95 | list($originalWidth, $originalHeight) = $imageInfo; |
96 | 96 | |
97 | 97 | if ($originalWidth > $originalHeight) { |
98 | - $originalX = floor(($originalWidth - $originalHeight) / 2); |
|
98 | + $originalX = floor(($originalWidth-$originalHeight)/2); |
|
99 | 99 | $sourceWidth = $sourceHeight = $originalHeight; |
100 | 100 | } else { |
101 | 101 | $sourceWidth = $sourceHeight = $originalWidth; |
@@ -65,7 +65,7 @@ |
||
65 | 65 | * |
66 | 66 | * @since 1.0 |
67 | 67 | */ |
68 | - protected $dataLabels = array('OID' => 'Blacklisted Client ID#','client' => 'Client string'); |
|
68 | + protected $dataLabels = array('OID' => 'Blacklisted Client ID#', 'client' => 'Client string'); |
|
69 | 69 | |
70 | 70 | /** |
71 | 71 | * The name of the database table for the class. |
@@ -94,7 +94,7 @@ |
||
94 | 94 | * |
95 | 95 | * @since 1.2.2 |
96 | 96 | */ |
97 | - protected $dataLabels = array('OID' => 'Action Log ID#','client' => 'Client string','IP' => 'IP address','message' => 'Message','personOID' => 'Owner'); |
|
97 | + protected $dataLabels = array('OID' => 'Action Log ID#', 'client' => 'Client string', 'IP' => 'IP address', 'message' => 'Message', 'personOID' => 'Owner'); |
|
98 | 98 | |
99 | 99 | /** |
100 | 100 | * The name of the database table for the class. |