@@ -414,11 +414,13 @@ discard block |
||
414 | 414 | * @return QuerySet |
415 | 415 | */ |
416 | 416 | |
417 | - public function do(): QuerySet |
|
417 | + public function do { |
|
418 | + (): QuerySet |
|
418 | 419 | { |
419 | 420 | |
420 | 421 | // Build the query |
421 | 422 | list($query, $values) = $this->buildQuery(); |
423 | + } |
|
422 | 424 | |
423 | 425 | // Connect to DB |
424 | 426 | $db = Application::getDb(); |
@@ -484,7 +486,7 @@ discard block |
||
484 | 486 | $query .= " ".$this->buildJoin($join); |
485 | 487 | $query .= " ".$this->buildJoin($join_t); |
486 | 488 | |
487 | - if(count($this->filters)>0){ |
|
489 | + if(count($this->filters)>0) { |
|
488 | 490 | $query .= sprintf(" WHERE %s ", $whereClause); |
489 | 491 | } |
490 | 492 |
@@ -83,7 +83,8 @@ |
||
83 | 83 | // if it's a main file |
84 | 84 | if(key_exists($file, $this->dependancyTree)) { |
85 | 85 | $this->dependancyTree[$file] = $this->compileFile($file); |
86 | - } else { // if it's an included file |
|
86 | + } else { |
|
87 | +// if it's an included file |
|
87 | 88 | foreach($this->dependancyTree as $main => $dependancies) { |
88 | 89 | if(in_array($file, $dependancies)) { |
89 | 90 | $this->dependancyTree[$main] = $this->compileFile($main); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $template = new Template($path); |
22 | 22 | $template->registerFilter(new SiteFilter()); |
23 | 23 | |
24 | - if(isset($this->custom_filters)){ |
|
24 | + if(isset($this->custom_filters)) { |
|
25 | 25 | foreach($this->custom_filters as $filter){ |
26 | 26 | $template->registerFilter(new $filter()); |
27 | 27 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $level = $params[0] ?? 1; |
36 | 36 | $authenticator = new \Lepton\Authenticator\UserAuthenticator(); |
37 | 37 | $loggedIn = $authenticator->isLoggedIn(); |
38 | - if(! $loggedIn){ |
|
38 | + if(! $loggedIn) { |
|
39 | 39 | return false; |
40 | 40 | } |
41 | 41 | $user = $authenticator->getLoggedUser(); |