diff --git a/.php_cs b/.php_cs index dd31fef..cd7ed13 100644 --- a/.php_cs +++ b/.php_cs @@ -4,31 +4,47 @@ $finder = Symfony\Component\Finder\Finder::create() ->files() ->in(__DIR__) ->exclude('vendor') + ->notName("*.md") + ->notName("*.xml") ->notName("*.txt") - ->notName("*.stub") - ->notName("*.log") + ->notName("*.phar") ->ignoreDotFiles(true) ->ignoreVCS(true); $fixers = [ - '-psr0', - '-php_closing_tag', 'blankline_after_open_tag', + 'braces', 'concat_without_spaces', 'double_arrow_multiline_whitespaces', 'duplicate_semicolon', + 'elseif', 'empty_return', + 'encoding', + 'eof_ending', 'extra_empty_lines', + 'function_call_space', + 'function_declaration', 'include', + 'indentation', 'join_function', + 'line_after_namespace', + 'linefeed', 'list_commas', + 'logical_not_operators_with_successor_space', + 'lowercase_constants', + 'lowercase_keywords', + 'method_argument_space', 'multiline_array_trailing_comma', + 'multiline_spaces_before_semicolon', + 'multiple_use', 'namespace_no_leading_whitespace', 'no_blank_lines_after_class_opening', 'no_empty_lines_after_phpdocs', 'object_operator', 'operators_spaces', + 'parenthesis', 'phpdoc_indent', + 'phpdoc_inline_tag', 'phpdoc_no_access', 'phpdoc_no_package', 'phpdoc_scalar', @@ -41,24 +57,29 @@ $fixers = [ 'remove_lines_between_uses', 'return', 'self_accessor', + 'short_array_syntax', + 'short_echo_tag', + 'short_tag', 'single_array_no_trailing_comma', 'single_blank_line_before_namespace', + 'single_line_after_imports', 'single_quote', 'spaces_before_semicolon', 'spaces_cast', 'standardize_not_equal', 'ternary_spaces', + 'trailing_spaces', 'trim_array_spaces', 'unalign_equals', 'unary_operators_spaces', + 'unused_use', + 'visibility', 'whitespacy_lines', - 'multiline_spaces_before_semicolon', - 'short_array_syntax', - 'short_echo_tag', ]; + return Symfony\CS\Config\Config::create() - ->level(Symfony\CS\FixerInterface::PSR2_LEVEL) + ->level(Symfony\CS\FixerInterface::NONE_LEVEL) ->fixers($fixers) ->finder($finder) - ->setUsingCache(true); + ->setUsingCache(true); \ No newline at end of file diff --git a/.php_cs.cache b/.php_cs.cache deleted file mode 100644 index ea19cc3..0000000 --- a/.php_cs.cache +++ /dev/null @@ -1 +0,0 @@ -a:3:{s:7:"version";s:3:"1.9";s:6:"fixers";a:60:{i:0;s:24:"blankline_after_open_tag";i:1;s:6:"braces";i:2;s:21:"concat_without_spaces";i:3;s:34:"double_arrow_multiline_whitespaces";i:4;s:19:"duplicate_semicolon";i:5;s:6:"elseif";i:6;s:12:"empty_return";i:7;s:8:"encoding";i:8;s:10:"eof_ending";i:9;s:17:"extra_empty_lines";i:10;s:19:"function_call_space";i:11;s:20:"function_declaration";i:12;s:7:"include";i:13;s:11:"indentation";i:14;s:13:"join_function";i:15;s:20:"line_after_namespace";i:16;s:8:"linefeed";i:17;s:11:"list_commas";i:18;s:19:"lowercase_constants";i:19;s:18:"lowercase_keywords";i:20;s:21:"method_argument_space";i:21;s:30:"multiline_array_trailing_comma";i:22;s:33:"multiline_spaces_before_semicolon";i:23;s:12:"multiple_use";i:24;s:31:"namespace_no_leading_whitespace";i:25;s:34:"no_blank_lines_after_class_opening";i:26;s:28:"no_empty_lines_after_phpdocs";i:27;s:15:"object_operator";i:28;s:16:"operators_spaces";i:29;s:11:"parenthesis";i:30;s:13:"phpdoc_indent";i:31;s:16:"phpdoc_no_access";i:32;s:17:"phpdoc_no_package";i:33;s:13:"phpdoc_scalar";i:34;s:24:"phpdoc_short_description";i:35;s:17:"phpdoc_to_comment";i:36;s:11:"phpdoc_trim";i:37;s:18:"phpdoc_type_to_var";i:38;s:23:"phpdoc_var_without_name";i:39;s:24:"remove_leading_slash_use";i:40;s:25:"remove_lines_between_uses";i:41;s:6:"return";i:42;s:13:"self_accessor";i:43;s:18:"short_array_syntax";i:44;s:14:"short_echo_tag";i:45;s:9:"short_tag";i:46;s:30:"single_array_no_trailing_comma";i:47;s:34:"single_blank_line_before_namespace";i:48;s:25:"single_line_after_imports";i:49;s:12:"single_quote";i:50;s:23:"spaces_before_semicolon";i:51;s:11:"spaces_cast";i:52;s:21:"standardize_not_equal";i:53;s:14:"ternary_spaces";i:54;s:15:"trailing_spaces";i:55;s:17:"trim_array_spaces";i:56;s:14:"unalign_equals";i:57;s:22:"unary_operators_spaces";i:58;s:10:"visibility";i:59;s:16:"whitespacy_lines";}s:6:"hashes";a:14:{s:9:"readme.md";i:524866302;s:26:"tests/AbstractTestCase.php";i:2287368122;s:20:"tests/TinkerTest.php";i:1835515394;s:13:"bootstrap.php";i:3761032287;s:11:"phpunit.xml";i:1694145476;s:19:"src/TinkerShell.php";i:3818045897;s:20:"src/TinkerCaster.php";i:124959219;s:21:"src/TinkerCommand.php";i:3078368363;s:29:"src/TinkerServiceProvider.php";i:3702323095;s:13:"composer.lock";i:841502038;s:30:"fixture/app/Console/Kernel.php";i:1299537457;s:20:"fixture/app/User.php";i:1850004739;s:7:"artisan";i:2862840535;s:13:"composer.json";i:967205206;}} \ No newline at end of file diff --git a/src/TinkerCaster.php b/src/TinkerCaster.php index 2187276..985b228 100644 --- a/src/TinkerCaster.php +++ b/src/TinkerCaster.php @@ -46,7 +46,7 @@ public static function castApplication(Application $app) foreach (self::$appProperties as $property) { try { $val = $app->$property(); - if (!is_null($val)) { + if (! is_null($val)) { $results[Caster::PREFIX_VIRTUAL.$property] = $val; } } catch (Exception $e) { diff --git a/src/TinkerShell.php b/src/TinkerShell.php index 17ec7b0..6869fc8 100644 --- a/src/TinkerShell.php +++ b/src/TinkerShell.php @@ -65,7 +65,7 @@ public function setIncludes($include) */ public function getShell() { - if (!$this->shell) { + if (! $this->shell) { $config = new Configuration(); $config->getPresenter()->addCasters(