Skip to content
Permalink
Browse files

Added styles: compact and minifed

  • Loading branch information...
eelf committed Aug 7, 2014
1 parent 0d722c9 commit 76c8c7205f4c316cb9f557ea960c8ed15a3a1eba
Showing with 25 additions and 0 deletions.
  1. +7 −0 phpcf-src/styles/compact/formatting-rules.php
  2. +18 −0 phpcf-src/styles/minified/formatting-rules.php
@@ -0,0 +1,7 @@
<?php
$controls['{']['CTX_FUNCTION_D CTX_FUNCTION_LONG_D CTX_CLASS_METHOD_LONG_D CTX_CLASS_D CTX_CLASS_METHOD_D'] = array(
PHPCF_KEY_DESCR_LEFT => '"{" to start on a new line in function/method/class declaration',
PHPCF_KEY_LEFT => PHPCF_EX_SHRINK_SPACES,
PHPCF_KEY_DESCR_RIGHT => 'nothing after "{" on the same line and no empty lines',
PHPCF_KEY_RIGHT => array(PHPCF_EX_INCREASE_INDENT, PHPCF_EX_SHRINK_NLS),
);
@@ -0,0 +1,18 @@
<?php
$nospace = array(
PHPCF_KEY_DESCR_LEFT => 'no space',
PHPCF_KEY_LEFT => PHPCF_EX_DELETE_SPACES_STRONG,
PHPCF_KEY_DESCR_RIGHT => 'no space',
PHPCF_KEY_RIGHT => PHPCF_EX_DELETE_SPACES_STRONG,
);
unset($controls['{'], $controls['}'], $controls[';'], $controls[','], $controls['( (_LONG'], $controls[')'],
$controls['T_DOUBLE_ARROW']);
$controls['{'][PHPCF_KEY_ALL] = $controls['}'][PHPCF_KEY_ALL] = $controls[';'][PHPCF_KEY_ALL] =
$controls[','][PHPCF_KEY_ALL] = $controls['( (_LONG'][PHPCF_KEY_ALL] = $controls[')'][PHPCF_KEY_ALL] =
$controls[$binary_operators][PHPCF_KEY_ALL] = $controls['T_DOUBLE_ARROW'][PHPCF_KEY_ALL] = $nospace;
$controls['T_OPEN_TAG'] = array(
PHPCF_KEY_ALL => array(
PHPCF_KEY_DESCR_RIGHT => 'space',
PHPCF_KEY_RIGHT => PHPCF_EX_SHRINK_SPACES_STRONG,
)
);

1 comment on commit 76c8c72

@Sannis

This comment has been minimized.

Copy link

commented on 76c8c72 Feb 20, 2017

@eelf это будет полезно сообществу?

Please sign in to comment.
You can’t perform that action at this time.