Skip to content

Commit

Permalink
PHPStan OK Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
rmunate authored and rmunate committed Dec 10, 2023
1 parent 1a0adb5 commit c7e4093
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy VitePress site to Pages

on:
push:
branches: [ main ]
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"name": "rmunate/php2js",
"description": "Read PHP Laravel variables in an external JavaScript file without the need for AJAX, FETCH, or AXIOS requests. Use the same variables returned by the controller and defined in the Blade view, as well as some additional values that will simplify your work. A perfect library for monoliths with Blade.",
"description": "Seamless Integration: PHP2JS & QuickRequest, Share PHP Laravel values effortlessly with external JavaScript files using just one command, thanks to the seamless integration of PHP2JS. Execute backend requests swiftly and precisely with the power of QuickRequest. Developing Laravel monoliths has never been easier and more efficient!",
"keywords": [
"PHP2JS",
"php2js",
"toJS",
"toStrictJS",
"laravel",
"blade"
"QuickRequest"
],
"homepage": "https://github.com/rmunate/PHP2JS",
"type": "library",
Expand All @@ -30,6 +29,7 @@
"illuminate/support": "^8.0|^9.0|^10.0"
},
"require-dev": {
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.4"
},
"extra": {
Expand Down
12 changes: 12 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
parameters:
paths:
- src/
level: 5
ignoreErrors:
- message: '#Unsafe usage of new static\(\)#'
- message: '#Function response not found.#'
- message: '#Function view not found.#'
excludePaths:
- 'src/Macros/Php2JsServiceProvider.php'
2 changes: 2 additions & 0 deletions src/Elements/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class Generator extends BaseGenerator
{
use Alias;

private $alias;

/**
* Constructor.
*
Expand Down
5 changes: 2 additions & 3 deletions src/Render.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class Render extends BaseRender
private $data;
private $alias;
private $dataJS = [];
private $php2js = false;

/**
* Constructor.
Expand Down Expand Up @@ -55,7 +54,7 @@ public function toJS(string $alias = 'PHP2JS')
}

/**
* @param array $vars
* @param array $data
* @param string $alias
*
* @return static
Expand All @@ -71,7 +70,7 @@ public function toStrictJS(array $data = [], string $alias = 'PHP2JS'): static
/**
* Return the View.
*
* @return View
* @return mixed
*/
public function compose()
{
Expand Down

0 comments on commit c7e4093

Please sign in to comment.