EscolaLMS/Consultations

View on GitHub
Fix #364
Witold Wiśniewski authored 9c9e3bdb
complete00:00:34
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-phan:b885
b885: Pulling from codeclimate/codeclimate-phan
8e402f1a9c57: Pulling fs layer
abc2d0fc5668: Pulling fs layer
dc541c3b1e49: Pulling fs layer
9f6ca43a9b11: Pulling fs layer
c7737daaa88e: Pulling fs layer
dacca831c5b2: Pulling fs layer
16fbe636fb42: Pulling fs layer
723d37ca9d09: Pulling fs layer
9eddffd41f08: Pulling fs layer
fb7a0bf324fd: Pulling fs layer
d45ca5424117: Pulling fs layer
c7737daaa88e: Waiting
dacca831c5b2: Waiting
16fbe636fb42: Waiting
723d37ca9d09: Waiting
fb7a0bf324fd: Waiting
d45ca5424117: Waiting
9eddffd41f08: Waiting
9f6ca43a9b11: Waiting
abc2d0fc5668: Verifying Checksum
abc2d0fc5668: Download complete
dc541c3b1e49: Verifying Checksum
dc541c3b1e49: Download complete
c7737daaa88e: Verifying Checksum
c7737daaa88e: Download complete
8e402f1a9c57: Download complete
9f6ca43a9b11: Verifying Checksum
9f6ca43a9b11: Download complete
dacca831c5b2: Download complete
8e402f1a9c57: Pull complete
abc2d0fc5668: Pull complete
16fbe636fb42: Verifying Checksum
16fbe636fb42: Download complete
723d37ca9d09: Download complete
dc541c3b1e49: Pull complete
9eddffd41f08: Verifying Checksum
9eddffd41f08: Download complete
d45ca5424117: Verifying Checksum
d45ca5424117: Download complete
fb7a0bf324fd: Verifying Checksum
fb7a0bf324fd: Download complete
9f6ca43a9b11: Pull complete
c7737daaa88e: Pull complete
dacca831c5b2: Pull complete
16fbe636fb42: Pull complete
723d37ca9d09: Pull complete
9eddffd41f08: Pull complete
fb7a0bf324fd: Pull complete
d45ca5424117: Pull complete
Digest: sha256:80f9f90a9dc7ed88b958d04b86493d2a7bff8f1bdf1ba775c0c9ba6e254f6181
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-phan:b885
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
83a051f0858f: Waiting
f0e9f15ec462: Waiting
034c114563b8: Waiting
5edc25e33d4e: Waiting
c3166a36a8d9: Waiting
f3c17b6c6935: Verifying Checksum
f3c17b6c6935: Download complete
a3ed95caeb02: Download complete
a0710691c81a: Verifying Checksum
a0710691c81a: Download complete
83a051f0858f: Download complete
a0710691c81a: Pull complete
c3166a36a8d9: Verifying Checksum
c3166a36a8d9: Download complete
a3ed95caeb02: Pull complete
f3c17b6c6935: Pull complete
034c114563b8: Download complete
5edc25e33d4e: Verifying Checksum
5edc25e33d4e: Download complete
f0e9f15ec462: Verifying Checksum
f0e9f15ec462: 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
40adf26d4529: Pulling fs layer
01d3fd4ccf07: Waiting
d54cbc0233c4: Waiting
378b764b6ee5: Waiting
a01b3d804127: Waiting
d8ae1ee899c7: Waiting
02aaff91dfc2: Waiting
f11257bedacf: Waiting
25d9a4b72163: Waiting
e7cb8c1bd7da: Verifying Checksum
e7cb8c1bd7da: Download complete
382dd9e936d2: Download complete
41dcc117e123: Verifying Checksum
41dcc117e123: Download complete
41dcc117e123: Pull complete
d54cbc0233c4: Verifying Checksum
d54cbc0233c4: Download complete
e7cb8c1bd7da: Pull complete
01d3fd4ccf07: Verifying Checksum
01d3fd4ccf07: Download complete
a01b3d804127: Verifying Checksum
a01b3d804127: Download complete
382dd9e936d2: Pull complete
02aaff91dfc2: Verifying Checksum
02aaff91dfc2: Download complete
01d3fd4ccf07: Pull complete
25d9a4b72163: Verifying Checksum
25d9a4b72163: Download complete
378b764b6ee5: Download complete
d54cbc0233c4: Pull complete
a01b3d804127: Pull complete
d8ae1ee899c7: Download complete
f11257bedacf: Verifying Checksum
f11257bedacf: Download complete
40adf26d4529: Verifying Checksum
40adf26d4529: Download 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
a42e650909d2: Verifying Checksum
a42e650909d2: Download complete
97518928ae5f: Verifying Checksum
97518928ae5f: Pull complete
e109c25d106c: Download complete
b2fb00c172a9: Download complete
043df9f67e9a: Verifying Checksum
043df9f67e9a: Download complete
cfbd8af1af7a: Verifying Checksum
cfbd8af1af7a: Download complete
0dff3d7a1a0e: Verifying Checksum
0dff3d7a1a0e: Download complete
043df9f67e9a: Pull complete
a42e650909d2: Pull complete
ea3b98fb78f4: Verifying Checksum
ea3b98fb78f4: Download complete
1519b1438731: Verifying Checksum
1519b1438731: Download complete
1c654bf89a09: Verifying Checksum
1c654bf89a09: Download complete
0dff3d7a1a0e: Pull complete
e109c25d106c: Pull 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
phan
phan engine documentation
8
phpcodesniffer
phpcodesniffer engine documentation
9
phpmd
phpmd engine documentation
10
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: Invalid character encountered in file '/code/docs/new_consultation.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/docs/menu.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/docs/list.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: 148 files indexed
INFO: 126 source files to be analyzed
ERROR: Unable to parse file: /code/src/Jobs/ReminderAboutConsultationJob.php
ERROR: Parse error at line 15 column 13:

 5: use EscolaLms\Consultations\Services\Contracts\ConsultationServiceContract;
 6: use Illuminate\Bus\Queueable;
 7: use Illuminate\Contracts\Queue\ShouldQueue;
 8: use Illuminate\Foundation\Bus\Dispatchable;
 9: use Illuminate\Queue\InteractsWithQueue;
10: use Illuminate\Queue\SerializesModels;
11: 
12: class ReminderAboutConsultationJob implements ShouldQueue
13: {
14:     use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
15:     private string $status;
                ^
16: 
17:     /**
18:      * Create a new job instance.
19:      *
20:      * @return void
21:      */
22:     public function __construct(string $status)
23:     {
24:         $this->status = $status;
25:     }

ERROR: Unable to parse file: /code/src/Rules/UserTermExist.php
ERROR: Parse error at line 10 column 13:

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Rules;
 4: 
 5: use EscolaLms\Consultations\Models\ConsultationUserTerm;
 6: use Illuminate\Contracts\Validation\Rule;
 7: 
 8: class UserTermExist implements Rule
 9: {
10:     private ?int $consultationUserId;
                ^
11: 
12:     public function __construct(?int $consultationUserId = null)
13:     {
14:         $this->consultationUserId = $consultationUserId;
15:     }
16: 
17:     public function passes($attribute, $value)
18:     {
19:         if (!is_numeric($this->consultationUserId)) {
20:             return false;

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

48: use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
49: use Illuminate\Http\UploadedFile;
50: use Illuminate\Support\Collection;
51: use Illuminate\Support\Facades\DB;
52: use Illuminate\Support\Facades\Storage;
53: use Illuminate\Support\Str;
54: use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
55: 
56: class ConsultationService implements ConsultationServiceContract
57: {
58:     private ConsultationRepositoryContract $consultationRepositoryContract;
                ^
59:     private ConsultationUserRepositoryContract $consultationUserRepositoryContract;
60:     private JitsiServiceContract $jitsiServiceContract;
61:     protected ConsultationUserTermRepositoryContract $consultationUserTermRepository;
62: 
63:     public function __construct(
64:         ConsultationRepositoryContract $consultationRepositoryContract,
65:         ConsultationUserRepositoryContract $consultationUserRepositoryContract,
66:         JitsiServiceContract $jitsiServiceContract,
67:         ConsultationUserTermRepositoryContract $consultationUserTermRepository,
68:     ) {

ERROR: Unable to parse file: /code/src/Http/Resources/ConsultationSimpleResource.php
ERROR: Parse error at line 40 column 13:

30:             'duration' => $this->resource->getDuration(),
31:             'image_path' => $this->resource->image_path,
32:             'image_url' => $this->resource->image_url,
33:             'logotype_path' => $this->resource->logotype_path,
34:             'logotype_url' => $this->resource->logotype_url,
35:             'proposed_terms' => ConsultationProposedTermResource::collection($consultationServiceContract->filterProposedTerms($this->resource->getKey(), $this->resource->proposedTerms)),
36:             'busy_terms' => ConsultationTermResource::collection($consultationServiceContract->getBusyTermsFormatDate($this->resource->getKey())),
37:             'categories' => $this->resource->categories,
38:             'max_session_students' => $this->resource->max_session_students,
39:             'teachers' => ConsultationAuthorResource::collection($this->resource->teachers),
40:             ...ModelFields::getExtraAttributesValues($this->resource, MetaFieldVisibilityEnum::PUBLIC)
                ^
41:         ];
42:         return self::apply($fields, $this);
43:     }
44: }
45: 

ERROR: Unable to parse file: /code/src/Http/Controllers/ConsultationAPIController.php
ERROR: Parse error at line 28 column 13:

18: use EscolaLms\Consultations\Http\Resources\ConsultationProposedTermResource;
19: use EscolaLms\Consultations\Http\Resources\ConsultationSimpleResource;
20: use EscolaLms\Consultations\Http\Resources\ConsultationTermsResource;
21: use EscolaLms\Consultations\Services\Contracts\ConsultationServiceContract;
22: use EscolaLms\Core\Dtos\OrderDto;
23: use EscolaLms\Core\Http\Controllers\EscolaLmsBaseController;
24: use Illuminate\Http\JsonResponse;
25: 
26: class ConsultationAPIController extends EscolaLmsBaseController implements ConsultationAPISwagger
27: {
28:     private ConsultationServiceContract $consultationServiceContract;
                ^
29: 
30:     public function __construct(
31:         ConsultationServiceContract $consultationServiceContract
32:     ) {
33:         $this->consultationServiceContract = $consultationServiceContract;
34:     }
35: 
36:     public function index(ListAPIConsultationsRequest $listConsultationsRequest): JsonResponse
37:     {
38:         $search = $listConsultationsRequest->except(['limit', 'skip']);

ERROR: Unable to parse file: /code/src/Http/Controllers/ConsultationController.php
ERROR: Parse error at line 31 column 13:

21: use EscolaLms\Consultations\Http\Resources\ConsultationSimpleResource;
22: use EscolaLms\Consultations\Http\Resources\ConsultationTermsResource;
23: use EscolaLms\Consultations\Http\Resources\ConsultationUserTermsResource;
24: use EscolaLms\Consultations\Services\Contracts\ConsultationServiceContract;
25: use EscolaLms\Core\Dtos\OrderDto;
26: use EscolaLms\Core\Http\Controllers\EscolaLmsBaseController;
27: use Illuminate\Http\JsonResponse;
28: 
29: class ConsultationController extends EscolaLmsBaseController implements ConsultationSwagger
30: {
31:     private ConsultationServiceContract $consultationServiceContract;
                ^
32:     private UserServiceContract $userService;
33: 
34:     public function __construct(
35:         ConsultationServiceContract $consultationServiceContract,
36:         UserServiceContract $userService
37:     ) {
38:         $this->consultationServiceContract = $consultationServiceContract;
39:         $this->userService = $userService;
40:     }
41: 

ERROR: Unable to parse file: /code/src/Helpers/StrategyHelper.php
ERROR: Parse error at line 7 column 13:

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Helpers;
 4: 
 5: class StrategyHelper
 6: {
 7:     private string $namespace;
                ^
 8: 
 9:     public function __construct(string $baseStrategyName)
10:     {
11:         $this->setNamespace($baseStrategyName);
12:     }
13: 
14:     /**
15:      * This method used strategy pattern and execute method given in the parameters
16:      * Strategy dir it must contain minimum to file: BaseStrategy contain in pattern {{parentDir}}Strategy
17:      * in localization ?/Strategies/{{parentDir}} and strategy class in the same localization

ERROR: Unable to parse file: /code/src/Repositories/Criteria/ConsultationTermEqualCriterion.php
ERROR: Parse error at line 19 column 25:

 9: {
10:     public function __construct(int $value = null)
11:     {
12:         parent::__construct(null, $value);
13:     }
14: 
15:     public function apply(Builder $query): Builder
16:     {
17:         return $query->whereHas(
18:             'terms',
19:             fn (Builder $query) => $query->where('consultation_user.id', '=', $this->value)
                            ^
20:         );
21:     }
22: }
23: 

ERROR: Unable to parse file: /code/src/Repositories/Criteria/CategoriesCriterion.php
ERROR: Parse error at line 19 column 25:

 9: {
10:     public function __construct(array $value = null)
11:     {
12:         parent::__construct(null, $value);
13:     }
14: 
15:     public function apply(Builder $query): Builder
16:     {
17:         return $query->whereHas(
18:             'categories',
19:             fn (Builder $query) => $query->whereIn('categories.id', $this->value)
                            ^
20:         );
21:     }
22: }
23: 

ERROR: Unable to parse file: /code/src/Repositories/Criteria/UserTermConsultationCriterion.php
ERROR: Parse error at line 19 column 25:

 9: {
10:     public function __construct(int $value = null)
11:     {
12:         parent::__construct(null, $value);
13:     }
14: 
15:     public function apply(Builder $query): Builder
16:     {
17:         return $query->whereHas(
18:             'consultationUser',
19:             fn (Builder $query) => $query->where('consultation_user.consultation_id', '=', $this->value)
                            ^
20:         );
21:     }
22: }
23: 

ERROR: Unable to parse file: /code/src/Repositories/Criteria/UserTermUserExistsCriterion.php
ERROR: Parse error at line 17 column 66:

 7: 
 8: class UserTermUserExistsCriterion extends Criterion
 9: {
10:     public function __construct(array $value = null)
11:     {
12:         parent::__construct(null, $value);
13:     }
14: 
15:     public function apply(Builder $query): Builder
16:     {
17:         return $query->whereHas('consultationUser', fn ($query) => $query->whereHas('user'));
                                                                     ^
18:     }
19: }
20: 

ERROR: Unable to parse file: /code/src/Repositories/ConsultationUserRepository.php
ERROR: Parse error at line 66 column 56:

56:     }
57: 
58:     public function getBusyTerms(int $consultationId, ?string $date = null): Collection
59:     {
60:         $query = $this->model->newQuery();
61:         $query->where([
62:             'consultation_id' => $consultationId
63:         ]);
64: 
65:         if ($date) {
66:             $query->whereHas('userTerms', fn ($query) => $query->where('executed_at', '=', $date));
                                                           ^
67:         }
68:         $query->whereHas('userTerms', fn ($query) => $query->whereIn('executed_status', [ConsultationTermStatusEnum::APPROVED, ConsultationTermStatusEnum::REPORTED]));
69: 
70:         return $query->get();
71:     }
72: }
73: 

ERROR: Unable to parse file: /code/src/Repositories/ConsultationUserTermRepository.php
ERROR: Parse error at line 80 column 58:

70: 
71:         return $this->applyPagination($query)->get();
72:     }
73: 
74:     /**
75:      * @return Collection<int, Model>
76:      */
77:     public function getBusyTerms(int $consultationId, ?string $date = null): Collection
78:     {
79:         $query = $this->model->newQuery();
80:         $query->whereHas('consultationUser', fn($query) => $query->where('consultation_id', '=', $consultationId));
                                                             ^
81: 
82:         $query->whereNotNull('executed_at');
83: 
84:         if ($date) {
85:             $query->where([
86:                 'executed_at' => $date
87:             ]);
88:         }
89:         $query->whereIn('executed_status', [ConsultationTermStatusEnum::APPROVED, ConsultationTermStatusEnum::REPORTED]);
90:         return $query->get();

ERROR: Unable to parse file: /code/src/Repositories/ConsultationRepository.php
ERROR: Parse error at line 62 column 13:

52:     public function getBoughtConsultationsByQuery(Builder $query): Builder
53:     {
54:         return $query
55:             ->select(
56:                 'consultations.*',
57:                 'consultation_user.id as consultation_user_id',
58:                 'consultation_user_terms.executed_status',
59:                 'consultation_user_terms.executed_at',
60:                 'consultation_user.product_id',
61:                 'consultation_user.created_at',
62:             )
                ^
63:             ->leftJoin('consultation_user', 'consultation_user.consultation_id', '=', 'consultations.id')
64:             ->leftJoin('consultation_user_terms', 'consultation_user_terms.consultation_user_id', '=', 'consultation_user.id')
65:             ->where(['consultation_user.user_id' => auth()->user()->getKey()]);
66:     }
67: }
68: 

ERROR: Unable to parse file: /code/src/Dto/ConsultationSaveScreenDto.php
ERROR: Parse error at line 9 column 15:

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Dto;
 4: 
 5: use Illuminate\Http\UploadedFile;
 6: 
 7: class ConsultationSaveScreenDto extends BaseDto
 8: {
 9:     protected int $consultationId;
                  ^
10:     protected int $userTerminId;
11:     protected string $userEmail;
12:     protected UploadedFile|string $file;
13:     protected string $timestamp;
14:     protected string $executedAt;
15: 
16:     public function getConsultationId(): int
17:     {
18:         return $this->consultationId;
19:     }

ERROR: Unable to parse file: /code/src/Dto/FilterListDto.php
ERROR: Parse error at line 17 column 13:

 7: use EscolaLms\Consultations\Repositories\Criteria\ConsultationSearch;
 8: use EscolaLms\Consultations\Repositories\Criteria\ConsultationTermEqualCriterion;
 9: use EscolaLms\Consultations\Repositories\Criteria\Primitives\OrderCriterion;
10: use EscolaLms\Core\Repositories\Criteria\Primitives\DateCriterion;
11: use EscolaLms\Core\Repositories\Criteria\Primitives\EqualCriterion;
12: use EscolaLms\Core\Repositories\Criteria\Primitives\HasCriterion;
13: use EscolaLms\Core\Repositories\Criteria\Primitives\InCriterion;
14: 
15: class FilterListDto extends BaseDto
16: {
17:     private string $name;
                ^
18:     private int $consultationTermId;
19:     private array $status;
20:     private string $dateTo;
21:     private string $dateFrom;
22:     private array $categories;
23:     private bool $onlyWithCategories;
24: 
25:     private string $orderBy;
26:     private string $order;
27: 

ERROR: Unable to parse file: /code/src/Dto/FinishTermDto.php
ERROR: Parse error at line 7 column 15:

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Dto;
 4: 
 5: class FinishTermDto extends BaseDto
 6: {
 7:     protected string $term;
                  ^
 8:     protected ?string $finishedAt = null;
 9: 
10:     protected function setTerm(string $term): void
11:     {
12:         $this->term = $term;
13:     }
14: 
15:     public function getTerm(): string
16:     {
17:         return $this->term;

ERROR: Unable to parse file: /code/src/Dto/ConsultationUserTermResourceDto.php
ERROR: Parse error at line 10 column 12:

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Dto;
 4: 
 5: use EscolaLms\Consultations\Models\User;
 6: use Illuminate\Support\Collection;
 7: 
 8: class ConsultationUserTermResourceDto
 9: {
10:     public int $consultation_user_id;
               ^
11:     public int $consultation_id;
12:     public string $executed_at;
13:     public string $executed_status;
14:     public string $duration;
15:     public Collection $users;
16:     public ?User $author;
17:     public ?string $finished_at;
18: 
19:     public function __construct(int $consultation_user_id, int $consultation_id, string $executed_at, string $status, string $duration, ?User $author, ?string $finished_at = null, ?Collection $users = null)
20:     {

ERROR: Unable to parse file: /code/src/Dto/FilterConsultationTermsListDto.php
ERROR: Parse error at line 20 column 13:

10: use EscolaLms\Consultations\Repositories\Criteria\UserTermUserExistsCriterion;
11: use EscolaLms\Core\Repositories\Criteria\Primitives\NotNullCriterion;
12: use EscolaLms\Core\Repositories\Criteria\Primitives\WhereCriterion;
13: use EscolaLms\Core\Repositories\Criteria\Primitives\WhereNotInOrIsNullCriterion;
14: use EscolaLms\Core\Repositories\Criteria\Primitives\DateCriterion;
15: use EscolaLms\Core\Repositories\Criteria\Primitives\EqualCriterion;
16: use EscolaLms\Core\Repositories\Criteria\Primitives\InCriterion;
17: 
18: class FilterConsultationTermsListDto extends BaseDto implements ModelDtoContract
19: {
20:     private array $status;
                ^
21:     private array $reminderStatus;
22:     private string $dateTo;
23:     private string $dateFrom;
24:     private string $dateTimeTo;
25:     private string $dateTimeFrom;
26:     private int $consultationId;
27: 
28:     private array $criteria = [];
29: 
30:     public static function prepareFilters(array $search): self

ERROR: Unable to parse file: /code/src/Dto/ChangeTermConsultationDto.php
ERROR: Parse error at line 7 column 15:

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Dto;
 4: 
 5: class ChangeTermConsultationDto extends BaseDto
 6: {
 7:     protected string $executedAt;
                  ^
 8:     protected string $term;
 9:     protected ?int $userId = null;
10:     protected ?bool $accept = null;
11: 
12:     protected function setExecutedAt(string $executedAt): void
13:     {
14:         $this->executedAt = $executedAt;
15:     }
16: 
17:     public function getExecutedAt(): string

ERROR: Unable to parse file: /code/src/Dto/ConsultationDto.php
ERROR: Parse error at line 15 column 15:

 5: use Carbon\Carbon;
 6: use EscolaLms\Consultations\Dto\Contracts\ModelDtoContract;
 7: use EscolaLms\Consultations\Enum\ConstantEnum;
 8: use EscolaLms\Consultations\Models\Consultation;
 9: use EscolaLms\Consultations\Models\ConsultationProposedTerm;
10: use Illuminate\Http\UploadedFile;
11: use Illuminate\Support\Str;
12: 
13: class ConsultationDto extends BaseDto implements ModelDtoContract
14: {
15:     protected string $name;
                  ^
16:     protected string $status;
17:     protected string $description;
18:     protected ?string $shortDesc;
19:     protected ?string $activeTo;
20:     protected ?string $activeFrom;
21:     protected ?string $duration;
22:     protected ?int $authorId;
23:     protected $imagePath = false;
24:     protected $logotypePath = false;
25: 

ERROR: Unable to parse file: /code/src/Dto/ConsultationUserResourceDto.php
ERROR: Parse error at line 7 column 12:

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Dto;
 4: 
 5: class ConsultationUserResourceDto extends BaseDto
 6: {
 7:     public ?int $id = null;
               ^
 8:     public ?string $firstName = null;
 9:     public ?string $lastName = null;
10:     public ?string $email = null;
11:     public ?string $phone = null;
12:     public ?bool $isActive = null;
13:     public ?string $emailVerifiedAt = null;
14:     public ?string $pathAvatar = null;
15:     public ?string $gender = null;
16:     public ?string $age = null;
17:     public ?string $country = null;

ERROR: Unable to parse file: /code/src/Dto/Traits/DtoHelper.php
ERROR: Parse error at line 9 column 15:

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Dto\Traits;
 4: 
 5: use Illuminate\Support\Str;
 6: 
 7: trait DtoHelper
 8: {
 9:     protected array $relations = [];
                  ^
10:     protected array $files = [];
11: 
12:     protected function setterByData(array $data): void
13:     {
14:         foreach ($data as $k => $v) {
15:             $key = Str::studly($k);
16:             if (method_exists($this, 'set' . $key)) {
17:                 $this->{'set' . $key}($v);
18:             } else {
19:                 $key = lcfirst($key);

ERROR: Unable to parse file: /code/src/Dto/ConsultationUserTermDto.php
ERROR: Parse error at line 7 column 15:

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Dto;
 4: 
 5: class ConsultationUserTermDto extends BaseDto
 6: {
 7:     protected string $term;
                  ^
 8:     protected ?int $userId = null;
 9: 
10:     protected function setTerm(string $term): void
11:     {
12:         $this->term = $term;
13:     }
14: 
15:     public function getTerm(): string
16:     {
17:         return $this->term;

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

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Events;
 4: 
 5: use EscolaLms\Consultations\Models\ConsultationUserPivot;
 6: use EscolaLms\Consultations\Models\ConsultationUserTerm;
 7: use EscolaLms\Core\Models\User;
 8: 
 9: class ReminderAboutTerm extends ConsultationTerm
10: {
11:     private string $status;
                ^
12: 
13:     public function __construct(User $user, ConsultationUserPivot $consultationTerm, string $status, ?ConsultationUserTerm $consultationUserTerm = null)
14:     {
15:         parent::__construct($user, $consultationTerm, $consultationUserTerm);
16:         $this->status = $status;
17:     }
18: 
19:     public function getStatus()
20:     {
21:         return $this->status;

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

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Events;
 4: 
 5: use EscolaLms\Consultations\Models\ConsultationUserPivot;
 6: use EscolaLms\Consultations\Models\ConsultationUserTerm;
 7: use EscolaLms\Core\Models\User;
 8: 
 9: class ReminderTrainerAboutTerm extends ConsultationTerm
10: {
11:     private string $status;
                ^
12: 
13:     public function __construct(User $user, ConsultationUserPivot $consultationTerm, string $status, ?ConsultationUserTerm $consultationUserTerm = null)
14:     {
15:         parent::__construct($user, $consultationTerm, $consultationUserTerm);
16:         $this->status = $status;
17:     }
18: 
19:     public function getStatus()
20:     {
21:         return $this->status;

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

 5: use EscolaLms\Consultations\Models\ConsultationUserTerm;
 6: use EscolaLms\Core\Models\User;
 7: use EscolaLms\Consultations\Models\ConsultationUserPivot;
 8: use Illuminate\Foundation\Events\Dispatchable;
 9: use Illuminate\Queue\SerializesModels;
10: 
11: abstract class ConsultationTerm
12: {
13:     use Dispatchable, SerializesModels;
14: 
15:     private User $user;
                ^
16:     private ConsultationUserPivot $consultationTerm;
17:     private ?ConsultationUserTerm $consultationUserTerm;
18: 
19:     public function __construct(User $user, ConsultationUserPivot $consultationTerm, ?ConsultationUserTerm $consultationUserTerm = null)
20:     {
21:         $this->user = $user;
22:         $this->consultationTerm = $consultationTerm;
23:         $this->consultationUserTerm = $consultationUserTerm;
24:     }
25: 

ERROR: Unable to parse file: /code/src/Listeners/ReminderAboutTermListener.php
ERROR: Parse error at line 10 column 13:

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Listeners;
 4: 
 5: use EscolaLms\Consultations\Events\ReminderAboutTerm;
 6: use EscolaLms\Consultations\Services\Contracts\ConsultationServiceContract;
 7: 
 8: class ReminderAboutTermListener
 9: {
10:     private ConsultationServiceContract $consultationServiceContract;
                ^
11:     /**
12:      * Create the event listener.
13:      *
14:      * @return void
15:      */
16:     public function __construct(
17:         ConsultationServiceContract $consultationServiceContract
18:     ) {
19:         $this->consultationServiceContract = $consultationServiceContract;
20:     }

ERROR: Unable to parse file: /code/src/Strategies/Relations/ConsultationWithTeachersStrategy.php
ERROR: Parse error at line 10 column 13:

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Strategies\Relations;
 4: 
 5: use EscolaLms\Consultations\Models\Consultation;
 6: use EscolaLms\Consultations\Strategies\Contracts\RelationStrategyContract;
 7: 
 8: class ConsultationWithTeachersStrategy implements RelationStrategyContract
 9: {
10:     private Consultation $consultation;
                ^
11:     private array $data;
12: 
13:     public function __construct(array $params) {
14:         $this->consultation = $params[0];
15:         $this->data = $params[1] ?? [];
16:     }
17: 
18:     public function setRelation(): void
19:     {
20:         $this->consultation->teachers()->sync($this->data['teachers']);

ERROR: Unable to parse file: /code/src/Strategies/Relations/ConsultationWithCategoriesStrategy.php
ERROR: Parse error at line 10 column 13:

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Strategies\Relations;
 4: 
 5: use EscolaLms\Consultations\Models\Consultation;
 6: use EscolaLms\Consultations\Strategies\Contracts\RelationStrategyContract;
 7: 
 8: class ConsultationWithCategoriesStrategy implements RelationStrategyContract
 9: {
10:     private Consultation $consultation;
                ^
11:     private array $data;
12: 
13:     public function __construct(array $params) {
14:         $this->consultation = $params[0];
15:         $this->data = $params[1] ?? [];
16:     }
17: 
18:     public function setRelation(): void
19:     {
20:         $this->consultation->categories()->sync($this->data['categories']);

ERROR: Unable to parse file: /code/src/Strategies/Relations/ConsultationWithProposedTermsStrategy.php
ERROR: Parse error at line 10 column 13:

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Strategies\Relations;
 4: 
 5: use EscolaLms\Consultations\Models\Consultation;
 6: use EscolaLms\Consultations\Strategies\Contracts\RelationStrategyContract;
 7: 
 8: class ConsultationWithProposedTermsStrategy implements RelationStrategyContract
 9: {
10:     private Consultation $consultation;
                ^
11:     private array $data;
12: 
13:     public function __construct(array $params) {
14:         $this->consultation = $params[0];
15:         $this->data = $params[1] ?? [];
16:     }
17: 
18:     public function setRelation(): void
19:     {
20:         $this->consultation->proposedTerms()->delete();

ERROR: Unable to parse file: /code/src/Strategies/Relations/RelationsStrategy.php
ERROR: Parse error at line 9 column 13:

 1: <?php
 2: 
 3: namespace EscolaLms\Consultations\Strategies\Relations;
 4: 
 5: use EscolaLms\Consultations\Strategies\Contracts\RelationStrategyContract;
 6: 
 7: class RelationsStrategy
 8: {
 9:     private RelationStrategyContract $relationStrategyContract;
                ^
10: 
11:     public function __construct(
12:         RelationStrategyContract $relationStrategyContract
13:     )
14:     {
15:         $this->relationStrategyContract = $relationStrategyContract;
16:     }
17: 
18:     public function setRelation(): void
19:     {

ERROR: Unable to parse file: /code/database/seeders/ConsultationTermsSeeder.php
ERROR: Parse error at line 13 column 13:

 3: namespace EscolaLms\Consultations\Database\Seeders;
 4: 
 5: use EscolaLms\Consultations\Enum\ConsultationTermStatusEnum;
 6: use EscolaLms\Consultations\Models\Consultation;
 7: use EscolaLms\Consultations\Models\ConsultationUserPivot;
 8: use EscolaLms\Core\Models\User;
 9: use Illuminate\Database\Seeder;
10: 
11: class ConsultationTermsSeeder extends Seeder
12: {
13:     private ?int $author = null;
                ^
14:     private ?int $user = null;
15: 
16:     public function __construct(?int $author = null, ?int $user = null)
17:     {
18:         $this->author = $author;
19:         $this->user = $user;
20:     }
21: 
22:     public function run()
23:     {

INFO: 126/126 source files have been analyzed
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 1.203s
INFO: Final Memory: 12M/164M
INFO: ------------------------------------------------------------------------