Skip to content

Commit

Permalink
chore: enable phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Nov 12, 2023
1 parent e62e48c commit 67556e3
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 57 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 BBCode Details 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: .
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Javascript
name: FoF BBCode Details JS

on: [workflow_dispatch, push, pull_request]

Expand All @@ -14,5 +14,6 @@ jobs:
backend_directory: .
js_package_manager: npm
main_git_branch: master

secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
127 changes: 71 additions & 56 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,77 @@
{
"name": "fof/bbcode-details",
"description": "Details BBCode for Flarum",
"keywords": [
"flarum"
],
"type": "flarum-extension",
"license": "MIT",
"support": {
"issues": "https://github.com/FriendsOfFlarum/bbcode-details/issues",
"source": "https://github.com/FriendsOfFlarum/bbcode-details",
"forum": "https://discuss.flarum.org/d/18796"
},
"homepage": "https://friendsofflarum.org",
"funding": [
{
"type": "website",
"url": "https://opencollective.com/fof/donate"
}
],
"require": {
"flarum/core": "^1.2.0"
},
"authors": [
{
"name": "Sajjad Hashemian",
"email": "[email protected]"
"name": "fof/bbcode-details",
"description": "Details BBCode for Flarum",
"keywords": [
"flarum"
],
"type": "flarum-extension",
"license": "MIT",
"support": {
"issues": "https://github.com/FriendsOfFlarum/bbcode-details/issues",
"source": "https://github.com/FriendsOfFlarum/bbcode-details",
"forum": "https://discuss.flarum.org/d/18796"
},
{
"name": "David Sevilla Martín",
"email": "[email protected]",
"role": "Developer"
"homepage": "https://friendsofflarum.org",
"funding": [
{
"type": "website",
"url": "https://opencollective.com/fof/donate"
}
],
"require": {
"flarum/core": "^1.2.0"
},
{
"name": "Katos",
"email": "[email protected]",
"role": "Developer"
}
],
"replace": {
"sijad/flarum-ext-details": "*"
},
"autoload": {
"psr-4": {
"FoF\\BBCodeDetails\\": "src/"
}
},
"extra": {
"flarum-extension": {
"title": "FoF BBCode Details",
"category": "feature",
"icon": {
"name": "fas fa-minus-square",
"backgroundColor": "#e74c3c",
"color": "#fff"
}
"authors": [
{
"name": "Sajjad Hashemian",
"email": "[email protected]"
},
{
"name": "David Sevilla Martín",
"email": "[email protected]",
"role": "Developer"
},
{
"name": "Katos",
"email": "[email protected]",
"role": "Developer"
}
],
"replace": {
"sijad/flarum-ext-details": "*"
},
"autoload": {
"psr-4": {
"FoF\\BBCodeDetails\\": "src/"
}
},
"extra": {
"flarum-extension": {
"title": "FoF BBCode Details",
"category": "feature",
"icon": {
"name": "fas fa-minus-square",
"backgroundColor": "#e74c3c",
"color": "#fff"
}
},
"flagrow": {
"discuss": "https://discuss.flarum.org/d/18796"
},
"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/18796"
"scripts-descriptions": {
"analyse:phpstan": "Run static analysis"
}
}
}
12 changes: 12 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
includes:
- vendor/flarum/phpstan/extension.neon

parameters:
# The level will be increased in Flarum 2.0
level: 5
paths:
- extend.php
excludePaths:
- *.blade.php
checkMissingIterableValueType: false
databaseMigrationsPath: ['migrations']

0 comments on commit 67556e3

Please sign in to comment.