EscolaLMS/Courses-Import-Export

View on GitHub
Update swagger.yml #146
Witold Wiśniewski authored 06492f7c
complete00:00:26
Your first build completed successfully!

Congratulations

Your first build completed successfully!

See the Results

1
git clone
2
codeclimate validate-config
View output
codeclimate validate-config
No errors or warnings found in .codeclimate.json.
3
codeclimate prepare
View output
codeclimate prepare
4
builder pull-engines
View output
determining required images
docker pull codeclimate/codeclimate-phpcodesniffer:b163
b163: Pulling from codeclimate/codeclimate-phpcodesniffer
a0710691c81a: Pulling fs layer
a3ed95caeb02: Pulling fs layer
f3c17b6c6935: Pulling fs layer
c3166a36a8d9: Pulling fs layer
83a051f0858f: Pulling fs layer
f0e9f15ec462: Pulling fs layer
034c114563b8: Pulling fs layer
5edc25e33d4e: Pulling fs layer
c3166a36a8d9: Waiting
83a051f0858f: Waiting
f0e9f15ec462: Waiting
034c114563b8: Waiting
5edc25e33d4e: Waiting
a3ed95caeb02: Verifying Checksum
a3ed95caeb02: Download complete
a0710691c81a: Verifying Checksum
a0710691c81a: Download complete
f3c17b6c6935: Verifying Checksum
f3c17b6c6935: Download complete
a0710691c81a: Pull complete
83a051f0858f: Verifying Checksum
83a051f0858f: Download complete
a3ed95caeb02: Pull complete
f3c17b6c6935: Pull complete
f0e9f15ec462: Verifying Checksum
f0e9f15ec462: Download complete
034c114563b8: Verifying Checksum
c3166a36a8d9: Verifying Checksum
c3166a36a8d9: Download complete
5edc25e33d4e: Download complete
c3166a36a8d9: Pull complete
83a051f0858f: Pull complete
f0e9f15ec462: Pull complete
034c114563b8: Pull complete
5edc25e33d4e: Pull complete
Digest: sha256:cab8fcc753b6ae0e309b899665b22b1b62c26c56dab9b3c6a938fa72ca7c0640
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-phpcodesniffer:b163
docker pull codeclimate/codeclimate-phpmd:b291
b291: Pulling from codeclimate/codeclimate-phpmd
41dcc117e123: Pulling fs layer
e7cb8c1bd7da: Pulling fs layer
382dd9e936d2: Pulling fs layer
01d3fd4ccf07: Pulling fs layer
d54cbc0233c4: Pulling fs layer
a01b3d804127: Pulling fs layer
02aaff91dfc2: Pulling fs layer
25d9a4b72163: Pulling fs layer
378b764b6ee5: Pulling fs layer
d8ae1ee899c7: Pulling fs layer
f11257bedacf: Pulling fs layer
01d3fd4ccf07: Waiting
40adf26d4529: Pulling fs layer
d54cbc0233c4: Waiting
a01b3d804127: Waiting
02aaff91dfc2: Waiting
d8ae1ee899c7: Waiting
f11257bedacf: Waiting
25d9a4b72163: Waiting
40adf26d4529: Waiting
378b764b6ee5: Waiting
e7cb8c1bd7da: Verifying Checksum
e7cb8c1bd7da: Download complete
382dd9e936d2: Verifying Checksum
382dd9e936d2: Download complete
01d3fd4ccf07: Verifying Checksum
01d3fd4ccf07: Download complete
d54cbc0233c4: Verifying Checksum
d54cbc0233c4: Download complete
41dcc117e123: Verifying Checksum
41dcc117e123: Download complete
a01b3d804127: Verifying Checksum
a01b3d804127: Download complete
41dcc117e123: Pull complete
02aaff91dfc2: Download complete
e7cb8c1bd7da: Pull complete
d8ae1ee899c7: Verifying Checksum
d8ae1ee899c7: Download complete
382dd9e936d2: Pull complete
25d9a4b72163: Verifying Checksum
25d9a4b72163: Download complete
378b764b6ee5: Verifying Checksum
378b764b6ee5: Download complete
40adf26d4529: Verifying Checksum
40adf26d4529: Download complete
01d3fd4ccf07: Pull complete
f11257bedacf: Verifying Checksum
f11257bedacf: Download complete
d54cbc0233c4: Pull complete
a01b3d804127: Pull complete
02aaff91dfc2: Pull complete
25d9a4b72163: Pull complete
378b764b6ee5: Pull complete
d8ae1ee899c7: Pull complete
f11257bedacf: Pull complete
40adf26d4529: Pull complete
Digest: sha256:100ad83154de1d7143edb4360753a5a3c2c35f8a0fd8f00352718003e2b63bfa
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-phpmd:b291
docker pull codeclimate/codeclimate-sonar-php:b23
b23: Pulling from codeclimate/codeclimate-sonar-php
97518928ae5f: Pulling fs layer
043df9f67e9a: Pulling fs layer
a42e650909d2: Pulling fs layer
0dff3d7a1a0e: Pulling fs layer
e109c25d106c: Pulling fs layer
b2fb00c172a9: Pulling fs layer
1519b1438731: Pulling fs layer
cfbd8af1af7a: Pulling fs layer
ea3b98fb78f4: Pulling fs layer
1c654bf89a09: Pulling fs layer
0dff3d7a1a0e: Waiting
e109c25d106c: Waiting
b2fb00c172a9: Waiting
1519b1438731: Waiting
cfbd8af1af7a: Waiting
ea3b98fb78f4: Waiting
1c654bf89a09: Waiting
a42e650909d2: Verifying Checksum
a42e650909d2: Download complete
97518928ae5f: Verifying Checksum
97518928ae5f: Download complete
97518928ae5f: Pull complete
e109c25d106c: Verifying Checksum
e109c25d106c: Download complete
b2fb00c172a9: Download complete
043df9f67e9a: Verifying Checksum
043df9f67e9a: Download complete
cfbd8af1af7a: Verifying Checksum
cfbd8af1af7a: Download complete
0dff3d7a1a0e: Verifying Checksum
0dff3d7a1a0e: Download complete
1519b1438731: Verifying Checksum
1519b1438731: Download complete
043df9f67e9a: Pull complete
a42e650909d2: Pull complete
ea3b98fb78f4: Verifying Checksum
ea3b98fb78f4: Download complete
0dff3d7a1a0e: Pull complete
e109c25d106c: Pull complete
1c654bf89a09: Verifying Checksum
1c654bf89a09: Download complete
b2fb00c172a9: Pull complete
1519b1438731: Pull complete
cfbd8af1af7a: Pull complete
ea3b98fb78f4: Pull complete
1c654bf89a09: Pull complete
Digest: sha256:600639355d67f629857951762cd4d8d2bc9eb16a0496c67a3d6049830edcc87b
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-sonar-php:b23
5
structure
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
6
duplication
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
7
phpcodesniffer
phpcodesniffer engine documentation
8
phpmd
phpmd engine documentation
9
sonar-php
sonar-php engine documentation
View output
INFO: Java 1.8.0_322 Amazon.com Inc. (64-bit)
INFO: Linux 4.4.0-1128-aws amd64
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-core-2.17.0.899.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-cli-2.1.0.566.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
INFO: Index files
INFO: 50 files indexed
INFO: 34 source files to be analyzed
ERROR: Unable to parse file: /code/src/Jobs/CloneCourse.php
ERROR: Parse error at line 27 column 13:

17: use Illuminate\Queue\SerializesModels;
18: use Illuminate\Support\Facades\Log;
19: 
20: class CloneCourse implements ShouldQueue
21: {
22:     use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
23: 
24:     public $tries = 3;
25:     public $timeout = 18000;
26: 
27:     private Course $course;
                ^
28:     private Authenticatable $user;
29: 
30:     /**
31:      * @param Course $course
32:      * @param Authenticatable $user
33:      */
34:     public function __construct(Course $course, Authenticatable $user)
35:     {
36:         $this->course = $course;
37:         $this->user = $user;

ERROR: Unable to parse file: /code/src/Services/ExportImportService.php
ERROR: Parse error at line 36 column 13:

26: use Illuminate\Support\Facades\File;
27: use Illuminate\Support\Facades\Log;
28: use Illuminate\Support\Facades\Storage;
29: use Illuminate\Support\Facades\Validator;
30: use Illuminate\Support\Str;
31: use ZanySoft\Zip\Facades\Zip;
32: use ZipArchive;
33: 
34: class ExportImportService implements ExportImportServiceContract
35: {
36:     private CourseRepositoryContract $courseRepository;
                ^
37:     private LessonRepositoryContract $lessonRepository;
38:     private TopicRepositoryContract $topicRepository;
39:     private TopicResourceRepositoryContract $topicResourceRepo;
40:     private CategoriesRepositoryContract $categoriesRepository;
41: 
42:     private string $dirFullPath;
43: 
44:     private array $topicTypes = [
45:         'EscolaLms\\TopicTypes\\Models\\TopicContent\\ScormSco',
46:         'EscolaLms\\TopicTypes\\Models\\TopicContent\\H5P',

ERROR: Unable to parse file: /code/src/Http/Resources/CourseExportResource.php
ERROR: Parse error at line 45 column 79:

35:         $this->withoutWrapping();
36: 
37:         $course = $this->getResource();
38: 
39:         $fields = [
40:             'title' => $course->title,
41:             'summary' => $course->summary,
42:             'image_path' => self::sanitizePath($course->image_path),
43:             'video_path' => self::sanitizePath($course->video_path),
44:             'duration' => $course->duration,
45:             'scorm_sco' => $this->when($course->scorm_sco_id !== null, fn () => CourseScormScoExportResource::make($course)),
                                                                                  ^
46:             'status' => $course->status,
47:             'subtitle' => $course->subtitle,
48:             'language' => $course->language,
49:             'description' => $course->description,
50:             'level' => $course->level,
51:             'lessons' => LessonExportResource::collection($course->lessons()->main()->orderBy('order')->get()),
52:             'poster_path' => self::sanitizePath($course->poster_path),
53:             'categories' => CategoryExportResource::collection($course->categories),
54:             'tags' => $course->tags
55:         ];

ERROR: Unable to parse file: /code/src/Http/Controllers/CourseExportImportAPIController.php
ERROR: Parse error at line 23 column 15:

13: use Exception;
14: use Illuminate\Http\JsonResponse;
15: 
16: /**
17:  * SWAGGER_VERSION
18:  * This class should be parent class for other API controllers
19:  * Class AppBaseController.
20:  */
21: class CourseExportImportAPIController extends EscolaLmsBaseController implements CourseExportImportAPISwagger
22: {
23:     protected ExportImportServiceContract $exportImportService;
                  ^
24:     protected CloneCourseServiceContract $cloneCourseService;
25: 
26:     public function __construct(
27:         ExportImportServiceContract $exportImportService,
28:         CloneCourseServiceContract $cloneCourseService
29:     ) {
30:         $this->exportImportService = $exportImportService;
31:         $this->cloneCourseService = $cloneCourseService;
32:     }
33: 

ERROR: Unable to parse file: /code/src/Events/CloneCourseEvent.php
ERROR: Parse error at line 14 column 13:

 4: 
 5: use EscolaLms\Courses\Models\Course;
 6: use Illuminate\Contracts\Auth\Authenticatable;
 7: use Illuminate\Foundation\Events\Dispatchable;
 8: use Illuminate\Queue\SerializesModels;
 9: 
10: abstract class CloneCourseEvent
11: {
12:     use Dispatchable, SerializesModels;
13: 
14:     private Authenticatable $user;
                ^
15:     private Course $course;
16: 
17:     /**
18:      * @param Authenticatable $user
19:      * @param Course $course
20:      */
21:     public function __construct(Authenticatable $user, Course $course)
22:     {
23:         $this->user = $user;
24:         $this->course = $course;

ERROR: Unable to parse file: /code/src/Strategies/ScormScoTopicTypeStrategy.php
ERROR: Parse error at line 12 column 13:

 2: 
 3: namespace EscolaLms\CoursesImportExport\Strategies;
 4: 
 5: use EscolaLms\CoursesImportExport\Strategies\Contract\TopicImportStrategy;
 6: use EscolaLms\Scorm\Services\Contracts\ScormServiceContract;
 7: use Illuminate\Http\UploadedFile;
 8: use Illuminate\Support\Facades\File;
 9: 
10: class ScormScoTopicTypeStrategy implements TopicImportStrategy
11: {
12:     private ScormServiceContract $scormService;
                ^
13: 
14:     public function __construct()
15:     {
16:         $this->scormService = app(ScormServiceContract::class);
17:     }
18: 
19:     public function make(string $path, array $data): ?int
20:     {
21:         if (!$data['identifier'] || !$data['scorm_file']) {
22:             return null;

ERROR: Unable to parse file: /code/src/Strategies/H5PTopicTypeStrategy.php
ERROR: Parse error at line 12 column 13:

 2: 
 3: namespace EscolaLms\CoursesImportExport\Strategies;
 4: 
 5: use EscolaLms\CoursesImportExport\Strategies\Contract\TopicImportStrategy;
 6: use EscolaLms\HeadlessH5P\Repositories\Contracts\H5PContentRepositoryContract;
 7: use Illuminate\Http\UploadedFile;
 8: use Illuminate\Support\Facades\File;
 9: 
10: class H5PTopicTypeStrategy implements TopicImportStrategy
11: {
12:     private H5PContentRepositoryContract $h5PContentRepository;
                ^
13: 
14:     public function __construct()
15:     {
16:         $this->h5PContentRepository = app(H5PContentRepositoryContract::class);
17:     }
18: 
19:     public function make(string $path, array $data): ?int
20:     {
21:         $filePath = $path . DIRECTORY_SEPARATOR . $data['h5p_file'];
22:         if (!File::exists($filePath)) {

INFO: 34/34 source files have been analyzed
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.421s
INFO: Final Memory: 11M/95M
INFO: ------------------------------------------------------------------------