Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
build:
check:
image: framgia/laravel-workspace
commands:
- curl -o /usr/bin/framgia-ci https://raw.githubusercontent.com/framgia/ci-report-tool/master/dist/framgia-ci && chmod +x /usr/bin/framgia-ci
- chmod -R 777 storage/
- chmod -R 777 bootstrap/cache/
# - cp .env.testing.example .env
# - composer install
# - npm install
# - bower install --allow-root
# - gulp
- framgia-ci run
# compose:
# database:
# image: mysql
# environment:
# MYSQL_DATABASE: homestead_test
# MYSQL_USER: homestead_test
# MYSQL_PASSWORD: secret
# MYSQL_ROOT_PASSWORD: root
# deploy:
# rocketeer:
# image: fdplugins/rocketeer:php5
# when:
# branch: develop
# commands:
# - rocketeer deploy --stage=staging --no-interaction
# rocketeer:
# image: fdplugins/rocketeer:php5
# when:
# branch: master
# commands:
# - rocketeer deploy --stage=production --branch=master --no-interaction
33 changes: 33 additions & 0 deletions .framgia-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
project_type: php
test:
phpcpd:
ignore: true
command: phpcpd --log-pmd=.framgia-ci-reports/phpcpd.xml app
phpmd:
ignore: true
command: phpmd app xml codesize --reportfile .framgia-ci-reports/phpmd.xml
pdepend:
ignore: false
command: pdepend --summary-xml=.framgia-ci-reports/pdepend.xml
--jdepend-chart=.framgia-ci-reports/pdepend.svg
--overview-pyramid=.framgia-ci-reports/pyramid.svg
app
phpmetrics:
ignore: false
command: phpmetrics --report-html=.framgia-ci-reports/metrics.html
--report-xml=.framgia-ci-reports/metrics.xml
app
# eslint:
# ignore: true
# command: eslint --format=checkstyle
# --output-file=.framgia-ci-reports/eslint.xml
# resources/assets/js/
phpcs:
ignore: true
command: phpcs --standard=Framgia --report-checkstyle=.framgia-ci-reports/phpcs.xml app
# phpunit:
# ignore: true
# command:
# - php -dzend_extension=xdebug.so vendor/bin/phpunit
# --coverage-clover=.framgia-ci-reports/coverage-clover.xml
# --coverage-html=.framgia-ci-reports/coverage
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore
CHANGELOG.md export-ignore
4 changes: 4 additions & 0 deletions app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

public function test () {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reporter: CHECKSTYLE
Rule: Squiz.Functions.FunctionDeclaration
Severity: ERROR
File: app/Http/Controllers/Controller.php L14

Expected "function abc(...)"; found "function abc (...)"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reporter: CHECKSTYLE
Rule: Squiz.Functions.MultiLineFunctionDeclaration.SpaceBeforeOpenParen
Severity: ERROR
File: app/Http/Controllers/Controller.php L14

Expected 0 spaces before opening parenthesis; 2 found

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reporter: CHECKSTYLE
Rule: Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine
Severity: ERROR
File: app/Http/Controllers/Controller.php L14

Opening brace should be on a new line

$test = array(1, 2,3, 4, 65);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reporter: CHECKSTYLE
Rule: Generic.WhiteSpace.DisallowTabIndent.TabsUsed
Severity: ERROR
File: app/Http/Controllers/Controller.php L15

Spaces must be used to indent lines; tabs are not allowed

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reporter: CHECKSTYLE
Rule: Framgia.Array.ArrayDeclaration.ShortArraySyntax
Severity: ERROR
File: app/Http/Controllers/Controller.php L15

"array()" function used. Use short array syntax, "[]", instead.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reporter: CHECKSTYLE
Rule: Framgia.Array.ArrayDeclaration.NoSpaceAfterComma
Severity: ERROR
File: app/Http/Controllers/Controller.php L15

Expected 1 space between comma and "3"; 0 found

}
}