Skip to content

Commit c4fe32d

Browse files
committed
project init code
0 parents  commit c4fe32d

File tree

15 files changed

+656
-0
lines changed

15 files changed

+656
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
indent_size = 4
9+
indent_style = space
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.md]
15+
trim_trailing_whitespace = false

.scrutinizer.yml

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
filter:
2+
paths:
3+
- 'app/*'
4+
- 'src/*'
5+
excluded_paths:
6+
- 'bootstrap/*'
7+
- 'config/*'
8+
- 'public/*'
9+
- 'resources/*'
10+
- 'vendor/*'
11+
- 'views/*'
12+
tools:
13+
php_analyzer: true
14+
php_mess_detector: true
15+
php_changetracking: true
16+
php_code_sniffer:
17+
config:
18+
standard: PSR2
19+
php_loc:
20+
excluded_dirs:
21+
- vendor
22+
php_pdepend:
23+
excluded_dirs:
24+
- vendor
25+
- tests
26+
checks:
27+
php:
28+
code_rating: true
29+
duplication: true
30+
variable_existence: true
31+
useless_calls: true
32+
use_statement_alias_conflict: true
33+
unused_variables: true
34+
unused_properties: true
35+
unused_parameters: true
36+
unused_methods: true
37+
unreachable_code: true
38+
sql_injection_vulnerabilities: true
39+
security_vulnerabilities: true
40+
precedence_mistakes: true
41+
precedence_in_conditions: true
42+
parameter_non_unique: true
43+
no_property_on_interface: true
44+
no_non_implemented_abstract_methods: true
45+
deprecated_code_usage: true
46+
closure_use_not_conflicting: true
47+
closure_use_modifiable: true
48+
avoid_useless_overridden_methods: true
49+
avoid_conflicting_incrementers: true
50+
assignment_of_null_return: true
51+
verify_property_names: true
52+
verify_argument_usable_as_reference: true
53+
verify_access_scope_valid: true
54+
use_self_instead_of_fqcn: true
55+
too_many_arguments: true
56+
symfony_request_injection: true
57+
switch_fallthrough_commented: true
58+
spacing_of_function_arguments: true
59+
spacing_around_non_conditional_operators: true
60+
spacing_around_conditional_operators: true
61+
space_after_cast: true
62+
single_namespace_per_use: true
63+
simplify_boolean_return: true
64+
scope_indentation:
65+
spaces_per_level: '4'
66+
return_doc_comments: true
67+
require_scope_for_properties: true
68+
require_scope_for_methods: true
69+
require_php_tag_first: true
70+
require_braces_around_control_structures: true
71+
remove_trailing_whitespace: true
72+
remove_php_closing_tag: true
73+
remove_extra_empty_lines: true
74+
psr2_switch_declaration: true
75+
psr2_control_structure_declaration: true
76+
psr2_class_declaration: true
77+
property_assignments: true
78+
properties_in_camelcaps: true
79+
prefer_while_loop_over_for_loop: true
80+
phpunit_assertions: true
81+
php5_style_constructor: true
82+
parameters_in_camelcaps: true
83+
parameter_doc_comments: true
84+
return_doc_comment_if_not_inferrable: true
85+
param_doc_comment_if_not_inferrable: true
86+
overriding_private_members: true
87+
optional_parameters_at_the_end: true
88+
one_class_per_file: true
89+
non_commented_empty_catch_block: true
90+
no_unnecessary_if: true
91+
no_unnecessary_function_call_in_for_loop: true
92+
no_unnecessary_final_modifier: true
93+
no_underscore_prefix_in_properties: true
94+
no_underscore_prefix_in_methods: true
95+
no_trailing_whitespace: true
96+
no_space_inside_cast_operator: true
97+
no_space_before_semicolon: true
98+
no_space_around_object_operator: true
99+
no_goto: true
100+
no_global_keyword: true
101+
no_exit: true
102+
no_empty_statements: true
103+
no_else_if_statements: true
104+
no_duplicate_arguments: true
105+
no_debug_code: true
106+
no_commented_out_code: true
107+
newline_at_end_of_file: true
108+
naming_conventions:
109+
local_variable: '^[a-z][a-zA-Z0-9]*$'
110+
abstract_class_name: ^Abstract|Factory$
111+
utility_class_name: 'Utils?$'
112+
constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$'
113+
property_name: '^[a-z][a-zA-Z0-9]*$'
114+
method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$'
115+
parameter_name: '^[a-z][a-zA-Z0-9]*$'
116+
interface_name: '^[A-Z][a-zA-Z0-9]*Interface$'
117+
type_name: '^[A-Z][a-zA-Z0-9]*$'
118+
exception_name: '^[A-Z][a-zA-Z0-9]*Exception$'
119+
isser_method_name: '^(?:is|has|should|may|supports|was)'
120+
lowercase_php_keywords: true
121+
more_specific_types_in_doc_comments: true
122+
missing_arguments: true
123+
method_calls_on_non_object: true
124+
line_length:
125+
max_length: '120'
126+
lowercase_basic_constants: true
127+
instanceof_class_exists: true
128+
function_in_camel_caps: true
129+
function_body_start_on_new_line: true
130+
fix_use_statements:
131+
remove_unused: true
132+
preserve_multiple: false
133+
preserve_blanklines: false
134+
order_alphabetically: true
135+
foreach_traversable: true
136+
foreach_usable_as_reference: true
137+
fix_php_opening_tag: true
138+
fix_line_ending: true
139+
fix_identation_4spaces: true
140+
fix_doc_comments: true
141+
ensure_lower_case_builtin_functions: true
142+
encourage_postdec_operator: true
143+
classes_in_camel_caps: true
144+
catch_class_exists: true
145+
blank_line_after_namespace_declaration: true
146+
avoid_usage_of_logical_operators: true
147+
avoid_unnecessary_concatenation: true
148+
avoid_tab_indentation: true
149+
avoid_superglobals: true
150+
avoid_perl_style_comments: true
151+
avoid_multiple_statements_on_same_line: true
152+
avoid_fixme_comments: true
153+
avoid_length_functions_in_loops: true
154+
avoid_entity_manager_injection: true
155+
avoid_duplicate_types: true
156+
avoid_corrupting_byteorder_marks: true
157+
argument_type_checks: true
158+
avoid_aliased_php_functions: true
159+
deadlock_detection_in_loops: true

.styleci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
preset: laravel

.travis.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
language: php
2+
3+
php:
4+
- 5.5
5+
- 5.6
6+
- 7.0
7+
- nightly
8+
- hhvm
9+
10+
matrix:
11+
allow_failures:
12+
- php: 7.0
13+
- php: nightly
14+
- php: hhvm
15+
16+
sudo: false
17+
18+
install: travis_retry composer install --no-interaction --prefer-source
19+
20+
script: vendor/bin/phpunit --coverage-clover=coverage.clover
21+
22+
after_script:
23+
- wget https://scrutinizer-ci.com/ocular.phar
24+
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Changelog
2+
3+
All Notable changes to `:package_name` will be documented in this file.
4+
5+
Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
6+
7+
## NEXT - YYYY-MM-DD
8+
9+
### Added
10+
- Nothing
11+
12+
### Deprecated
13+
- Nothing
14+
15+
### Fixed
16+
- Nothing
17+
18+
### Removed
19+
- Nothing
20+
21+
### Security
22+
- Nothing
23+
24+
25+
## 1.0.0 - 2016-05-26
26+
27+
### Added
28+
- Initial code.

CONDUCT.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4+
5+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
6+
7+
Examples of unacceptable behavior by participants include:
8+
9+
* The use of sexualized language or imagery
10+
* Personal attacks
11+
* Trolling or insulting/derogatory comments
12+
* Public or private harassment
13+
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
14+
* Other unethical or unprofessional conduct.
15+
16+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
17+
18+
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community in a direct capacity. Personal views, beliefs and values of individuals do not necessarily reflect those of the organisation or affiliated individuals and organisations.
19+
20+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
21+
22+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
We accept contributions via Pull Requests on [Github](https://github.com/:vendor/:package_name).
6+
7+
8+
## Pull Requests
9+
10+
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).
11+
12+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
13+
14+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
15+
16+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
17+
18+
- **Create feature branches** - Don't ask us to pull from your master branch.
19+
20+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
21+
22+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
23+
24+
25+
## Running Tests
26+
27+
``` bash
28+
$ composer test
29+
```
30+
31+
32+
**Happy coding**!

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# The MIT License (MIT)
2+
3+
Copyright (c) 2016 Cristian Tabacitu <[email protected]>
4+
5+
> Permission is hereby granted, free of charge, to any person obtaining a copy
6+
> of this software and associated documentation files (the "Software"), to deal
7+
> in the Software without restriction, including without limitation the rights
8+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
> copies of the Software, and to permit persons to whom the Software is
10+
> furnished to do so, subject to the following conditions:
11+
>
12+
> The above copyright notice and this permission notice shall be included in
13+
> all copies or substantial portions of the Software.
14+
>
15+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
> THE SOFTWARE.

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Backpack\MenuMager
2+
3+
[![Latest Version on Packagist][ico-version]][link-packagist]
4+
[![Software License][ico-license]](LICENSE.md)
5+
[![Build Status][ico-travis]][link-travis]
6+
[![Coverage Status][ico-scrutinizer]][link-scrutinizer]
7+
[![Quality Score][ico-code-quality]][link-code-quality]
8+
[![Total Downloads][ico-downloads]][link-downloads]
9+
10+
An admin panel for menu items on Laravel 5, using [Backpack\CRUD](https://github.com/Laravel-Backpack/crud). Add, edit, reorder, nest, rename menu items and link them to [Backpack\PageManager](https://github.com/Laravel-Backpack/pagemanager) pages, external link or custom internal link.
11+
12+
## Install
13+
14+
Via Composer
15+
16+
``` bash
17+
$ composer require laravel-backpack/menumanager
18+
```
19+
20+
## Usage
21+
22+
``` php
23+
$skeleton = new League\Skeleton();
24+
echo $skeleton->echoPhrase('Hello, League!');
25+
```
26+
27+
## Change log
28+
29+
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
30+
31+
## Testing
32+
33+
``` bash
34+
$ composer test
35+
```
36+
37+
## Contributing
38+
39+
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
40+
41+
## Security
42+
43+
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
44+
45+
## Credits
46+
47+
- [Cristian Tabacitu][link-author]
48+
- [All Contributors][link-contributors]
49+
50+
## License
51+
52+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
53+
54+
[ico-version]: https://img.shields.io/packagist/v/backpack/MenuMager.svg?style=flat-square
55+
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
56+
[ico-travis]: https://img.shields.io/travis/laravel-backpack/MenuMager/master.svg?style=flat-square
57+
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/laravel-backpack/MenuMager.svg?style=flat-square
58+
[ico-code-quality]: https://img.shields.io/scrutinizer/g/laravel-backpack/MenuMager.svg?style=flat-square
59+
[ico-downloads]: https://img.shields.io/packagist/dt/laravel-backpack/MenuMager.svg?style=flat-square
60+
61+
[link-packagist]: https://packagist.org/packages/laravel-backpack/MenuMager
62+
[link-travis]: https://travis-ci.org/laravel-backpack/MenuMager
63+
[link-scrutinizer]: https://scrutinizer-ci.com/g/laravel-backpack/MenuMager/code-structure
64+
[link-code-quality]: https://scrutinizer-ci.com/g/laravel-backpack/MenuMager
65+
[link-downloads]: https://packagist.org/packages/laravel-backpack/MenuMager
66+
[link-author]: https://github.com/tabacitu
67+
[link-contributors]: ../../contributors

0 commit comments

Comments
 (0)