railpage/railpagecore

View on GitHub
lib/Prerender/Home.php

Summary

Maintainability
D
2 days
Test Coverage

Method render has 99 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function render() {
        
        if (!$this->userObject instanceof User) {
            throw new InvalidArgumentException("No valid user object has been provided"); 
        }
Severity: Major
Found in lib/Prerender/Home.php - About 3 hrs to fix

    Function render has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
    Open

        public function render() {
            
            if (!$this->userObject instanceof User) {
                throw new InvalidArgumentException("No valid user object has been provided"); 
            }
    Severity: Minor
    Found in lib/Prerender/Home.php - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    The method render() has an NPath complexity of 28800. The configured NPath complexity threshold is 200.
    Open

        public function render() {
            
            if (!$this->userObject instanceof User) {
                throw new InvalidArgumentException("No valid user object has been provided"); 
            }
    Severity: Minor
    Found in lib/Prerender/Home.php by phpmd

    NPathComplexity

    Since: 0.1

    The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

    Example

    class Foo {
        function bar() {
            // lots of complicated code
        }
    }

    Source https://phpmd.org/rules/codesize.html#npathcomplexity

    The method render() has 209 lines of code. Current threshold is set to 100. Avoid really long methods.
    Open

        public function render() {
            
            if (!$this->userObject instanceof User) {
                throw new InvalidArgumentException("No valid user object has been provided"); 
            }
    Severity: Minor
    Found in lib/Prerender/Home.php by phpmd

    The method render() has a Cyclomatic Complexity of 20. The configured cyclomatic complexity threshold is 10.
    Open

        public function render() {
            
            if (!$this->userObject instanceof User) {
                throw new InvalidArgumentException("No valid user object has been provided"); 
            }
    Severity: Minor
    Found in lib/Prerender/Home.php by phpmd

    CyclomaticComplexity

    Since: 0.1

    Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

    Example

    // Cyclomatic Complexity = 11
    class Foo {
    1   public function example() {
    2       if ($a == $b) {
    3           if ($a1 == $b1) {
                    fiddle();
    4           } elseif ($a2 == $b2) {
                    fiddle();
                } else {
                    fiddle();
                }
    5       } elseif ($c == $d) {
    6           while ($c == $d) {
                    fiddle();
                }
    7        } elseif ($e == $f) {
    8           for ($n = 0; $n < $h; $n++) {
                    fiddle();
                }
            } else {
                switch ($z) {
    9               case 1:
                        fiddle();
                        break;
    10              case 2:
                        fiddle();
                        break;
    11              case 3:
                        fiddle();
                        break;
                    default:
                        fiddle();
                        break;
                }
            }
        }
    }

    Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

    The class Home has a coupling between objects value of 16. Consider to reduce the number of dependencies under 13.
    Open

    class Home extends Prerender {
        
        /**
         * Render the page 
         * @since Version 3.10.0
    Severity: Minor
    Found in lib/Prerender/Home.php by phpmd

    CouplingBetweenObjects

    Since: 1.1.0

    A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

    Example

    class Foo {
        /**
         * @var \foo\bar\X
         */
        private $x = null;
    
        /**
         * @var \foo\bar\Y
         */
        private $y = null;
    
        /**
         * @var \foo\bar\Z
         */
        private $z = null;
    
        public function setFoo(\Foo $foo) {}
        public function setBar(\Bar $bar) {}
        public function setBaz(\Baz $baz) {}
    
        /**
         * @return \SplObjectStorage
         * @throws \OutOfRangeException
         * @throws \InvalidArgumentException
         * @throws \ErrorException
         */
        public function process(\Iterator $it) {}
    
        // ...
    }

    Source https://phpmd.org/rules/design.html#couplingbetweenobjects

    Avoid assigning values to variables in if clauses and the like (line '92', column '8').
    Open

        public function render() {
            
            if (!$this->userObject instanceof User) {
                throw new InvalidArgumentException("No valid user object has been provided"); 
            }
    Severity: Minor
    Found in lib/Prerender/Home.php by phpmd

    IfStatementAssignment

    Since: 2.7.0

    Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($foo = 'bar') { // possible typo
                // ...
            }
            if ($baz = 0) { // always false
                // ...
            }
        }
    }

    Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            Debug::LogCLI("Template file " . $this->template . " is NOT cached for unique ID \"" . $this->unique . "\""); 
    Severity: Minor
    Found in lib/Prerender/Home.php and 1 other location - About 1 hr to fix
    lib/Images/Image.php on lines 539..539

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 30.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                $latest[$id]['topic_highlight'] = ColourUtility::String2Hex($latest[$id]['topic_title']);
    Severity: Minor
    Found in lib/Prerender/Home.php and 1 other location - About 1 hr to fix
    lib/Prerender/Home.php on lines 215..215

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 30.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                    $latest[$id]['featured_image'] = ImageCache::cache($latest[$id]['featured_image']); 
    Severity: Minor
    Found in lib/Prerender/Home.php and 1 other location - About 1 hr to fix
    lib/Prerender/Home.php on lines 209..209

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 30.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

                        $article['hometext'] = preg_replace("@(\[b\]|\[\/b\])@", "", $article['story_blurb']);
    Severity: Major
    Found in lib/Prerender/Home.php and 6 other locations - About 55 mins to fix
    lib/Newsletters/Weekly.php on lines 408..408
    lib/PrivateMessages/Folder.php on lines 126..126
    lib/RSS/Consume.php on lines 279..279
    lib/RSS/Consume.php on lines 280..280
    lib/RSS/Consume.php on lines 364..364
    lib/Template.php on lines 292..292

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 28.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                if (count($Feed->filter_words) || count($Feed->filter_topics)) {
                    $latest = $Feed->findArticles(0, 20);
                    
                    foreach ($latest as $id => $article) {
                        $article['sid'] = $article['story_id'];
    Severity: Minor
    Found in lib/Prerender/Home.php and 1 other location - About 40 mins to fix
    lib/Gallery/Image.php on lines 294..296

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 24.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

                    $latest[$id]['url'] = $json['article']['source'];
    Severity: Major
    Found in lib/Prerender/Home.php and 4 other locations - About 40 mins to fix
    lib/Prerender/Home.php on lines 208..208
    lib/Prerender/Home.php on lines 210..210
    lib/Prerender/Home.php on lines 211..211
    lib/Prerender/Home.php on lines 212..212

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 23.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

                $latest[$id]['url'] = $json['article']['url'];
    Severity: Major
    Found in lib/Prerender/Home.php and 4 other locations - About 40 mins to fix
    lib/Prerender/Home.php on lines 208..208
    lib/Prerender/Home.php on lines 211..211
    lib/Prerender/Home.php on lines 212..212
    lib/Prerender/Home.php on lines 223..223

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 23.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

                $latest[$id]['staff'] = $json['article']['staff'];
    Severity: Major
    Found in lib/Prerender/Home.php and 4 other locations - About 40 mins to fix
    lib/Prerender/Home.php on lines 208..208
    lib/Prerender/Home.php on lines 210..210
    lib/Prerender/Home.php on lines 211..211
    lib/Prerender/Home.php on lines 223..223

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 23.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

                $latest[$id]['author'] = $json['article']['author'];
    Severity: Major
    Found in lib/Prerender/Home.php and 4 other locations - About 40 mins to fix
    lib/Prerender/Home.php on lines 208..208
    lib/Prerender/Home.php on lines 210..210
    lib/Prerender/Home.php on lines 212..212
    lib/Prerender/Home.php on lines 223..223

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 23.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

                $latest[$id]['topic'] = $json['article']['topic'];
    Severity: Major
    Found in lib/Prerender/Home.php and 4 other locations - About 40 mins to fix
    lib/Prerender/Home.php on lines 210..210
    lib/Prerender/Home.php on lines 211..211
    lib/Prerender/Home.php on lines 212..212
    lib/Prerender/Home.php on lines 223..223

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 23.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

                $latest[$id]['hometext'] = isset($json['article']['blub']) ? wpautop(process_bbcode($json['article']['blub'])) : wpautop(process_bbcode($json['article']['blurb']));
    Severity: Minor
    Found in lib/Prerender/Home.php and 2 other locations - About 40 mins to fix
    lib/Images/Image.php on lines 375..375
    lib/Prerender/Home.php on lines 205..205

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 23.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            $railcam['sizes']['small']['source'] = ImageCache::cache($railcam['sizes']['small']['source']);
    Severity: Minor
    Found in lib/Prerender/Home.php and 1 other location - About 30 mins to fix
    lib/Images/Utility/Updater.php on lines 56..56

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 21.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                $this->smarty->Assign("alerts", $alerts, true);
    Severity: Minor
    Found in lib/Prerender/Home.php and 1 other location - About 30 mins to fix
    lib/Prerender/Home.php on lines 82..82

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 20.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            $this->smarty->Assign("jobs", $newjobs, true);
    Severity: Minor
    Found in lib/Prerender/Home.php and 1 other location - About 30 mins to fix
    lib/Prerender/Home.php on lines 69..69

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 20.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Blank line found at end of control structure
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Blank line found at end of control structure
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Function closing brace must go on the next line following the body; found 1 blank lines before brace
    Open

        }
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    There must be one blank line after the last USE statement; 2 found;
    Open

    use InvalidArgumentException;
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Blank line found at start of control structure
    Open

            if (!$upcoming = $Memcached->fetch($cachekey)) {
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (!$upcoming = $Memcached->fetch($cachekey)) {
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $upcoming[] = $data;
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $Photo = $Camera->getLatest(false); 
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    }
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            /**
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             */
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            /**
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $Feed = new Feed;
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $article['topictext'] = $article['topic_title'];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $data['sid'] = $data['story_id'];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                preg_match("/<p>(.*)<\/p>/", $latest[$id]['hometext'], $matches);
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $upcoming = [];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             * Chronicle
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $Camera = new Camera(1);
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->smarty->Assign("railcam", $railcam); 
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $article['hometext'] = preg_replace("@(\[b\]|\[\/b\])@", "", $article['story_blurb']);
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $article['topic'] = $article['topic_id'];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                /**
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                 * Load the JSON for this article
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $latest[$id]['topic'] = $json['article']['topic'];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $Memcached = AppCore::GetMemcached(); 
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $Events = new Events;
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (filter_var($this->userObject->id, FILTER_VALIDATE_INT) && $this->userObject->id > 0) {
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $article['ForumThreadId'] = $article['forum_topic_id'];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                 */
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                 */
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $newsLatest = array_shift($latest);
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($this->params['handheld']) {
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             */
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            /**
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $latest[$id]['hometext'] = isset($json['article']['blub']) ? wpautop(process_bbcode($json['article']['blub'])) : wpautop(process_bbcode($json['article']['blurb']));
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $latest[$id]['topic_highlight'] = ColourUtility::String2Hex($latest[$id]['topic_title']);
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                 * Pre-rendering
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $Memcached->save("railpage.home.upcomingevents", $upcoming, strtotime("+5 minutes")); 
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             * New photos
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             * Get the latest railcam photo
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $railcam = $Photo->getArray();
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $Feed->setUser($this->userObject)->getFilters(); 
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             */
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                /**
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                 */
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            /**
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $article['sid'] = $article['story_id'];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             * No personal news feed - go ahead as normal
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                 * Instantiate the base News module
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             * Format titles and tags for the latest news articles
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $latest[$id]['url'] = $json['article']['url'];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $latest[$id]['author'] = $json['article']['author'];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    //$Event = EventsFactory::CreateEvent($row['event_id']); 
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $article['catid'] = $article['topic_id'];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $article['title'] = $article['story_title'];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $News = new Base; 
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->smarty->addHeadTag(sprintf("<link rel='prerender' href='%s'>", $json['article']['url']['url']));
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->smarty->assign("newsLatest", $newsLatest);
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if (count($Feed->filter_words) || count($Feed->filter_topics)) {
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $latest[$id] = $article;
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            /**
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if (!isset($data['sid'])) {
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             * Send them to Smarty
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             */
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->smarty->assign("news", $latest);
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($this->smarty->isCached($this->template, $this->unique)) {
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             * Upcoming events
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->smarty->Assign("newphotos", RecentImages::getNewest(5)); 
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $article['informant_id'] = $article['user_id'];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $article['featured_image'] = $article['story_image'];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                 * Get the latest 15 news articles
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $cachekey = "railpage.home.upcomingevents"; 
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $latest = $News->latest(20);
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             */
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                foreach ($Events->getUpcomingEvents(5) as $row) {
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $latest[$id]['hometext'] = strip_tags($matches[1]);
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $article['time_relative'] = time2str($article['story_time_unix']);
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $EventDate = new EventDate($row['id']); 
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if (empty($json['article']['body']) && !empty($json['article']['source'])) {
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->smarty->Assign("chronicle", $Chronicle->getEntriesForToday(10));
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            foreach ($latest as $id => $data) {
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $latest = $Feed->findArticles(0, 20);
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             */
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    foreach ($latest as $id => $article) {
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $article['informant'] = $article['username'];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                /**
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->smarty->assign("pagecontrols", '<p style="background: #333; background: rgba(0, 0, 0, 0.6);margin: 0px -20px;padding: 0px;margin-top: 40px; text-align: center;font-size:1em;">Wasting time and bandwidth since 1992</p>');
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $data = $EventDate->getArray(); 
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->smarty->Assign("upcomingevents", $upcoming); 
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             */
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            /**
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $Chronicle = new Chronicle;
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             */
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            /**
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             * First check if this user has a personalised news feed
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             */
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                 
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (!isset($latest)) {
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $latest[$id]['hometext'] = strip_tags($latest[$id]['hometext'], "<a><p><img><br><br /><strong><em>");
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                // Get the first paragraph from the home text
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            /**
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            /**
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->smarty->Assign("railcam_updated", ContentUtility::relativeTime($railcam['dates']['taken'])); 
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->smarty->Assign("personalfeed", isset($latest));
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                /**
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                 */
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $latest[$id]['staff'] = $json['article']['staff'];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $json = json_decode(News::getArticleJSON($data['sid']), true);
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $latest[$id]['title'] = format_topictitle($data['title']);
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $latest[$id]['url'] = $json['article']['source'];
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

             * Slice the first news article off
    Severity: Minor
    Found in lib/Prerender/Home.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status