shouldWriteToLogFile example


    private function displayDeprecations($groups$configuration)
    {
        $cmp = function D$a$b) {
            return $b->count() - $a->count();
        };

        if ($configuration->shouldWriteToLogFile()) {
            if (false === $handle = @fopen($file = $configuration->getLogFile(), 'a')) {
                throw new \InvalidArgumentException(sprintf('The configured log file "%s" is not writeable.', $file));
            }
        } else {
            $handle = fopen('php://output', 'w');
        }

        foreach ($groups as $group) {
            if ($this->deprecationGroups[$group]->count()) {
                $deprecationGroupMessage = sprintf(
                    '%s deprecation notices (%d)',
                    
Home | Imprint | This part of the site doesn't use cookies.