Code Duplication    Length = 15-16 lines in 2 locations

src/LesserPhp/Parser.php 2 locations

@@ 1974-1988 (lines=15) @@
1971
     *
1972
     * @return bool
1973
     */
1974
    protected function handleDirectiveBlock($directiveName)
1975
    {
1976
        // seriously, this || true is required for this statement to work!?
1977
        if (($this->openString('{', $directiveValue, null, [';']) || true) && $this->literal('{')) {
1978
            $dir = $this->pushSpecialBlock('directive');
1979
            $dir->name = $directiveName;
1980
            if ($directiveValue !== null) {
1981
                $dir->value = $directiveValue;
1982
            }
1983
1984
            return true;
1985
        }
1986
1987
        return false;
1988
    }
1989
1990
    /**
1991
     * @param string $directiveName
@@ 2011-2026 (lines=16) @@
2008
     *
2009
     * @return bool
2010
     */
2011
    protected function handleRulesetDefinition($directiveName)
2012
    {
2013
        //Ruleset Definition
2014
        // seriously, this || true is required for this statement to work!?
2015
        if (($this->openString('{', $directiveValue, null, [';']) || true) && $this->literal('{')) {
2016
            $dir = $this->pushBlock($this->fixTags(['@' . $directiveName]));
2017
            $dir->name = $directiveName;
2018
            if ($directiveValue !== null) {
2019
                $dir->value = $directiveValue;
2020
            }
2021
2022
            return true;
2023
        }
2024
2025
        return false;
2026
    }
2027
}
2028