File tree Expand file tree Collapse file tree 11 files changed +39
-26
lines changed Expand file tree Collapse file tree 11 files changed +39
-26
lines changed Original file line number Diff line number Diff line change 2727 "require-dev" : {
2828 "laravel/scout" : " ^10.10" ,
2929 "nunomaduro/collision" : " ^8.1" ,
30- "nunomaduro/larastan" : " ^2 .0" ,
30+ "nunomaduro/larastan" : " ^3 .0" ,
3131 "orchestra/testbench" : " ^9.0" ,
32- "phpstan/phpstan" : " ^1.10 " ,
32+ "phpstan/phpstan" : " ^2.0 " ,
3333 "phpunit/phpunit" : " ^10.1" ,
34- "spatie/laravel-ray" : " ^1.30" ,
3534 "squizlabs/php_codesniffer" : " ^3.7" ,
3635 "vimeo/psalm" : " ^5.0"
3736 },
Original file line number Diff line number Diff line change @@ -2,20 +2,11 @@ includes:
22 - ./vendor/nunomaduro/larastan/extension.neon
33
44parameters :
5-
6- paths :
7- - src/
8-
9- # Level 9 is the highest level
10- level : 6
11-
12- # ignoreErrors:
13- # - '#PHPDoc tag @var#'
14- #
15- # excludePaths:
16- # - ./*/*/FileToBeExcluded.php
17- #
18- # checkMissingIterableValueType: false
19- checkMissingIterableValueType : false
20-
21- checkGenericClassInNonGenericObjectType : false
5+ level : 6
6+ paths :
7+ - src
8+ ignoreErrors :
9+ - ' #Class [a-zA-Z0-9\\_ ]+ implements generic interface [a-zA-Z0-9\\_ ]+ but does not specify its types : [a-zA-Z0-9\\_ ]+ #'
10+ - ' #Method [a-zA-Z0-9\\_ ]+::[a-zA-Z0-9\\_ ]+\ (\ ) return type with generic class [a-zA-Z0-9\\_ ]+ does not specify its types : .+ #'
11+ - ' #Trait [a-zA-Z0-9\\_ ]+ is used zero times and is not analysed. #'
12+ - ' #Unable to resolve the template type TRelatedModel in call to method [a-zA-Z0-9\\_ ]+::[a-zA-Z0-9\\_ ]+\ (\)#'
Original file line number Diff line number Diff line change 2828 <div class =" {{ $crud -> getEditContentClass () } }" >
2929 @include (' crud::inc.grouped_errors' )
3030
31- <form action =" {{ url ( $crud -> route . ' /import ' ) } }" enctype =" multipart/form-data" method =" post" >
31+ <form action =" {{ $action } }" enctype =" multipart/form-data" method =" post" >
3232 @csrf
3333
3434 @includeFirst (
Original file line number Diff line number Diff line change @@ -8,5 +8,8 @@ interface ExportableCrud
88{
99 public function getExport (): ImportExport ;
1010
11+ /**
12+ * @return array<string, mixed>
13+ */
1114 public function getExportParameters (): array ;
1215}
Original file line number Diff line number Diff line change @@ -8,5 +8,8 @@ interface ImportableCrud
88{
99 public function getImport (): ImportExport ;
1010
11+ /**
12+ * @return array<string, mixed>
13+ */
1114 public function getImportParameters (): array ;
1215}
Original file line number Diff line number Diff line change @@ -7,5 +7,8 @@ interface MultiExportableCrud
77 public const QUERY_PARAM = 'export ' ;
88 public const DEFAULT_EXPORT_NAME = 'default ' ;
99
10+ /**
11+ * @return array<string, mixed>
12+ */
1013 public function getAvailableExports (): array ;
1114}
Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ public function import(): View
3232
3333 $ this ->data ['crud ' ] = $ this ->crud ;
3434 $ this ->data ['title ' ] = $ this ->crud ->getTitle ();
35+ $ this ->data ['action ' ] = url (
36+ $ this ->crud ->route . '/ ' . config ('backpack-async-import-export.admin_import_route ' ),
37+ );
3538
3639 return view ('backpack-async-export::pages.import ' , $ this ->data );
3740 }
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ class ImportRequest extends FormRequest
88{
99 const PARAM_FILE = 'file ' ;
1010
11+ /**
12+ * @return array<string, mixed>
13+ */
1114 public function rules (): array
1215 {
1316 return [
Original file line number Diff line number Diff line change @@ -26,9 +26,11 @@ class ExportJob implements ShouldQueue
2626 use SerializesModels;
2727
2828 private ImportExport $ export ;
29- private array $ exportParameters ;
3029
31- public function __construct (ImportExport $ export , array $ exportParameters )
30+ /**
31+ * @param array<string, mixed> $exportParameters
32+ */
33+ public function __construct (ImportExport $ export , private array $ exportParameters )
3234 {
3335 $ this ->export = $ export ;
3436 $ this ->exportParameters = $ exportParameters ;
Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ class ImportJob implements ShouldQueue
2121 use Queueable;
2222 use SerializesModels;
2323
24+ /**
25+ * @param array<string, mixed> $exportParameters
26+ */
2427 public function __construct (
2528 private ImportExport $ export ,
2629 private array $ exportParameters
@@ -70,7 +73,7 @@ public function handle(): void
7073 ->implode (', ' );
7174 throw new \Exception ($ message );
7275 }
73- } catch (\Exception | \ Throwable $ exception ) {
76+ } catch (\Throwable $ exception ) {
7477 $ this ->export ->update ([
7578 ImportExport::COLUMN_STATUS => ImportExportStatus::Error,
7679 ImportExport::COLUMN_ERROR => $ exception ->getMessage (),
You can’t perform that action at this time.
0 commit comments