protected static function addPatterns(IgnoreManager $manager, $patterns)
    {
        $enabled = false === $patterns ? false : true;
        $manager->setEnabled($enabled);

        if (\is_array($patterns)) {
            foreach ($patterns as $pattern) {
                $manager->addPattern($pattern);
            }
        }
    }