File: issue-14.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-- 696 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/14
 *
 * The code below should be formatted like so if we run indent-region
 * on it:
 *
 * $post = Post::model()->find(array(
 *     'select' => 'title',
 *     'condition' => 'postID=:postID',
 *     'params' => array(':postID'=>10),
 * ));
 *
 */

$post = Post::model()->find(array(
    'select' => 'title',              // ###php-mode-test### ((indent c-basic-offset))
    'condition' => 'postID=:postID',  // ###php-mode-test### ((indent c-basic-offset))
    'params' => array(':postID'=>10), // ###php-mode-test### ((indent c-basic-offset))
));                                   // ###php-mode-test### ((indent 0))