Skip to content

Commit

Permalink
chore: enable phpstan (#83)
Browse files Browse the repository at this point in the history
* chore: enable phpstan

* fix: phpstan errors

* Apply fixes from StyleCI

* chore: npm audit fix

---------

Co-authored-by: StyleCI Bot <[email protected]>
  • Loading branch information
imorland and StyleCIBot authored Nov 12, 2023
1 parent aa4f010 commit 889bd8d
Show file tree
Hide file tree
Showing 9 changed files with 242 additions and 204 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: FoF Polls PHP

on: [workflow_dispatch, push, pull_request]

jobs:
run:
uses: flarum/framework/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: false
enable_phpstan: true

backend_directory: .
17 changes: 0 additions & 17 deletions .github/workflows/build.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: FoF Polls JS

on: [workflow_dispatch, push, pull_request]

jobs:
run:
uses: flarum/framework/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: true

frontend_directory: ./js
backend_directory: .
js_package_manager: npm
main_git_branch: master

secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
115 changes: 65 additions & 50 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,69 @@
{
"name": "fof/polls",
"description": " A Flarum extension that adds polls to your discussions",
"keywords": [
"flarum"
],
"type": "flarum-extension",
"license": "MIT",
"support": {
"issues": "https://github.com/FriendsOfFlarum/polls/issues",
"source": "https://github.com/FriendsOfFlarum/polls",
"forum": "https://discuss.flarum.org/d/20586"
},
"homepage": "https://friendsofflarum.org",
"funding": [
{
"type": "website",
"url": "https://opencollective.com/fof/donate"
}
],
"require": {
"flarum/core": "^1.3.0"
},
"conflict": {
"reflar/polls": "*"
},
"authors": [
{
"name": "David Sevilla Martin",
"email": "[email protected]",
"role": "Developer"
}
],
"autoload": {
"psr-4": {
"FoF\\Polls\\": "src/",
"FoF\\Polls\\Migrations\\": "migrations/"
}
},
"extra": {
"flarum-extension": {
"title": "FoF Polls",
"category": "discussion",
"icon": {
"name": "fas fa-signal",
"backgroundColor": "#e74c3c",
"color": "#fff"
}
"name": "fof/polls",
"description": " A Flarum extension that adds polls to your discussions",
"keywords": [
"flarum"
],
"type": "flarum-extension",
"license": "MIT",
"support": {
"issues": "https://github.com/FriendsOfFlarum/polls/issues",
"source": "https://github.com/FriendsOfFlarum/polls",
"forum": "https://discuss.flarum.org/d/20586"
},
"homepage": "https://friendsofflarum.org",
"funding": [
{
"type": "website",
"url": "https://opencollective.com/fof/donate"
}
],
"require": {
"flarum/core": "^1.3.0"
},
"conflict": {
"reflar/polls": "*"
},
"authors": [
{
"name": "David Sevilla Martin",
"email": "[email protected]",
"role": "Developer"
}
],
"autoload": {
"psr-4": {
"FoF\\Polls\\": "src/",
"FoF\\Polls\\Migrations\\": "migrations/"
}
},
"extra": {
"flarum-extension": {
"title": "FoF Polls",
"category": "discussion",
"icon": {
"name": "fas fa-signal",
"backgroundColor": "#e74c3c",
"color": "#fff"
}
},
"flagrow": {
"discuss": "https://discuss.flarum.org/d/20586"
},
"flarum-cli": {
"modules": {
"githubActions": true
}
}
},
"require-dev": {
"flarum/phpstan": "*"
},
"scripts": {
"analyse:phpstan": "phpstan analyse",
"clear-cache:phpstan": "phpstan clear-result-cache"
},
"flagrow": {
"discuss": "https://discuss.flarum.org/d/20586"
"scripts-descriptions": {
"analyse:phpstan": "Run static analysis"
}
}
}
Loading

0 comments on commit 889bd8d

Please sign in to comment.