-
-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2450 from Leantime/phpstan-lvl0
Phpstan lvl0
- Loading branch information
Showing
41 changed files
with
550 additions
and
520 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Static Analysis | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
phpstan: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Run Tests | ||
run: make phpstan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace Leantime\Domain\CsvImport\Listeners; | ||
|
||
use Leantime\Domain\CsvImport\Services; | ||
|
||
/** | ||
* Class AddCSVImportProvider | ||
* | ||
* The AddCSVImportProvider class is responsible for adding a CSV import provider to the given payload. | ||
*/ | ||
class AddCSVImportProvider | ||
{ | ||
/** | ||
* @param mixed $payload | ||
* @return mixed | ||
* @throws \Illuminate\Contracts\Container\BindingResolutionException | ||
*/ | ||
public function handle(mixed $payload): mixed | ||
{ | ||
$provider = app()->make(Services\CsvImport::class); | ||
$payload[$provider->id] = $provider; | ||
|
||
return $payload; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,10 @@ | ||
<?php | ||
|
||
namespace CsvImport; | ||
|
||
use CsvImport\Services\CsvImport as CsvImportService; | ||
use Leantime\Core\Events; | ||
|
||
/** | ||
* MotivationalQuotes | ||
* | ||
* Register Events here | ||
* | ||
*/ | ||
//Create function for the event | ||
class AddCSVImportProvider | ||
{ | ||
/** | ||
* @param $payload | ||
* @return mixed | ||
* @throws \Illuminate\Contracts\Container\BindingResolutionException | ||
*/ | ||
public function handle($payload): mixed | ||
{ | ||
$provider = app()->make(CsvImportService::class); | ||
$payload[$provider->id] = $provider; | ||
|
||
return $payload; | ||
} | ||
} | ||
use Leantime\Domain\CsvImport\Listeners\AddCSVImportProvider; | ||
|
||
//Register event listener | ||
Events::add_filter_listener( | ||
"domain.connector.services.providers.loadProviders.providerList", | ||
new addCSVImportProvider() | ||
new AddCSVImportProvider() | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.