Skip to content

Commit fc14914

Browse files
committed
Added meta files
1 parent 20e87bd commit fc14914

File tree

14 files changed

+161
-12
lines changed

14 files changed

+161
-12
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.editorconfig export-ignore
2+
.gitattributes export-ignore
3+
.gitignore export-ignore
4+
/.php_cs export-ignore
5+
/.styleci.yml export-ignore
6+
/.scrutinizer.yml export-ignore
7+
/.travis.yml export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/Tests/ export-ignore

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/php_cs.cache
2+
/composer.lock
3+
/phpunit.xml
4+
/vendor/

.php_cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->exclude('vendor')
5+
->in(__DIR__)
6+
;
7+
8+
return PhpCsFixer\Config::create()
9+
->setRules([
10+
'@Symfony' => true,
11+
'array_syntax' => ['syntax' => 'short'],
12+
])
13+
->setFinder($finder)
14+
;

.scrutinizer.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
filter:
2+
excluded_paths: [vendor/*, Tests/*]
3+
checks:
4+
php:
5+
code_rating: true
6+
duplication: true
7+
tools:
8+
external_code_coverage:
9+
timeout: 1800 # Timeout in seconds.

.styleci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
preset: symfony
2+
3+
finder:
4+
exclude:
5+
- "Resources"
6+
- "vendor"
7+
8+
enabled:
9+
- short_array_syntax
10+
11+
disabled:
12+
- phpdoc_annotation_without_dot # This is still buggy: https://github.com/symfony/symfony/pull/19198

.travis.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
language: php
2+
3+
cache:
4+
directories:
5+
- $HOME/.composer/cache
6+
7+
branches:
8+
except:
9+
- /^analysis-.*$/
10+
- /^patch-.*$/
11+
12+
env:
13+
global:
14+
- TEST_COMMAND="composer test"
15+
- SYMFONY_PHPUNIT_VERSION="6.3"
16+
17+
matrix:
18+
fast_finish: true
19+
include:
20+
# Run test with code coverage
21+
- php: 7.2
22+
env: COVERAGE=true TEST_COMMAND="composer test-ci"
23+
24+
# Test with lowest dependencies
25+
- php: 7.1
26+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak"
27+
28+
# Test the latest stable release
29+
- php: 7.0
30+
- php: 7.1
31+
32+
# Force some major versions of Symfony
33+
- php: 7.2
34+
env: DEPENDENCIES="dunglas/symfony-lock:^3"
35+
- php: 7.2
36+
env: DEPENDENCIES="dunglas/symfony-lock:^4"
37+
38+
# Latest commit to master
39+
- php: 7.2
40+
env: STABILITY="dev"
41+
42+
allow_failures:
43+
# Dev-master is allowed to fail.
44+
- env: STABILITY="dev"
45+
46+
before_install:
47+
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
48+
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
49+
- if ! [ -z "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;
50+
51+
install:
52+
# To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
53+
- if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
54+
- composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
55+
- vendor/bin/simple-phpunit install
56+
57+
script:
58+
- composer validate --strict --no-check-lock
59+
- $TEST_COMMAND
60+
61+
after_success:
62+
- if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
63+
- if [[ $COVERAGE = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi
64+

Api/WordpressClient.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ class WordpressClient
1616

1717
public function getPage($idOrSlug): Page
1818
{
19-
2019
}
2120

2221
public function getMenu($idOrSlug): Menu
2322
{
24-
2523
}
26-
}
24+
}

DependencyInjection/Configuration.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,5 @@ public function getConfigTreeBuilder()
2222
$rootNode->children()
2323
->scalarNode('url')->cannotBeEmpty()->end()
2424
->end();
25-
26-
2725
}
28-
2926
}

Model/Menu.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66

77
class Menu
88
{
9-
10-
}
9+
}

0 commit comments

Comments
 (0)