File: issue-42.php

package info (click to toggle)
php-elisp 1.24.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,220 kB
  • sloc: lisp: 7,069; php: 5,343; makefile: 58; sh: 10
file content (21 lines) | stat: -rw-r--r-- 650 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php

/**
 * Github Issue:    https://github.com/emacs-php/php-mode/issues/42
 *
 * Indenting the code below, particularly the closures, should not
 * cause any problems such as the long backtrace reported in the issue
 * URL above.  This code helps us test, for example, that the Elisp
 * function php-unindent-closure works correctly.
 */

$di->set('config', function () use ($config) {
    return $config;
});

$di->set('logger', function() use ($config) {
    $filename = date('Ymd');
    $logger = new \Logger($config->application->logger->dir . $filename);
    $logger->setFormat($config->application->logger->format);
    return $logger;
});