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: 130 files indexed
INFO: 108 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/Services/ConsultationService.php
ERROR: Parse error at line 53 column 13:
43: use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
44: use Illuminate\Http\UploadedFile;
45: use Illuminate\Support\Collection;
46: use Illuminate\Support\Facades\DB;
47: use Illuminate\Support\Facades\Storage;
48: use Illuminate\Support\Str;
49: use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
50:
51: class ConsultationService implements ConsultationServiceContract
52: {
53: private ConsultationRepositoryContract $consultationRepositoryContract;
^
54: private ConsultationUserRepositoryContract $consultationUserRepositoryContract;
55: private JitsiServiceContract $jitsiServiceContract;
56:
57: public function __construct(
58: ConsultationRepositoryContract $consultationRepositoryContract,
59: ConsultationUserRepositoryContract $consultationUserRepositoryContract,
60: JitsiServiceContract $jitsiServiceContract
61: ) {
62: $this->consultationRepositoryContract = $consultationRepositoryContract;
63: $this->consultationUserRepositoryContract = $consultationUserRepositoryContract;
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 24 column 13:
14: use EscolaLms\Consultations\Http\Resources\ConsultationProposedTermResource;
15: use EscolaLms\Consultations\Http\Resources\ConsultationSimpleResource;
16: use EscolaLms\Consultations\Http\Resources\ConsultationTermsResource;
17: use EscolaLms\Consultations\Services\Contracts\ConsultationServiceContract;
18: use EscolaLms\Core\Dtos\OrderDto;
19: use EscolaLms\Core\Http\Controllers\EscolaLmsBaseController;
20: use Illuminate\Http\JsonResponse;
21:
22: class ConsultationAPIController extends EscolaLmsBaseController implements ConsultationAPISwagger
23: {
24: private ConsultationServiceContract $consultationServiceContract;
^
25:
26: public function __construct(
27: ConsultationServiceContract $consultationServiceContract
28: ) {
29: $this->consultationServiceContract = $consultationServiceContract;
30: }
31:
32: public function index(ListAPIConsultationsRequest $listConsultationsRequest): JsonResponse
33: {
34: $search = $listConsultationsRequest->except(['limit', 'skip']);
ERROR: Unable to parse file: /code/src/Http/Controllers/ConsultationController.php
ERROR: Parse error at line 29 column 13:
19: use EscolaLms\Consultations\Http\Requests\UpdateConsultationRequest;
20: use EscolaLms\Consultations\Http\Resources\ConsultationSimpleResource;
21: use EscolaLms\Consultations\Http\Resources\ConsultationTermsResource;
22: use EscolaLms\Consultations\Services\Contracts\ConsultationServiceContract;
23: use EscolaLms\Core\Dtos\OrderDto;
24: use EscolaLms\Core\Http\Controllers\EscolaLmsBaseController;
25: use Illuminate\Http\JsonResponse;
26:
27: class ConsultationController extends EscolaLmsBaseController implements ConsultationSwagger
28: {
29: private ConsultationServiceContract $consultationServiceContract;
^
30: private UserServiceContract $userService;
31:
32: public function __construct(
33: ConsultationServiceContract $consultationServiceContract,
34: UserServiceContract $userService
35: ) {
36: $this->consultationServiceContract = $consultationServiceContract;
37: $this->userService = $userService;
38: }
39:
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/ConsultationUserRepository.php
ERROR: Parse error at line 61 column 52:
51: $query = $this->model->newQuery();
52: if ($criteria) {
53: $query = $this->applyCriteria($query, $criteria);
54: }
55: return $query->get();
56: }
57:
58: public function getByCurrentUserTutor(): Collection
59: {
60: return $this->model->newQuery()
61: ->whereHas('consultation', fn (Builder $query) => $query
^
62: ->whereAuthorId(auth()->user()->getKey())
63: ->orWhereHas('teachers', fn (Builder $query) => $query->where('users.id', '=', auth()->user()->getKey()))
64: )->get();
65: }
66:
67: public function getBusyTerms(int $consultationId, ?string $date = null): Collection
68: {
69: $query = $this->model->newQuery();
70: $query->where([
71: 'consultation_id' => $consultationId
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.executed_status',
59: 'consultation_user.executed_at',
60: 'consultation_user.product_id',
61: 'consultation_user.created_at',
62: )
^
63: ->leftJoin('consultation_user', 'consultation_user.consultation_id', '=', 'consultations.id')
64: ->where(['consultation_user.user_id' => auth()->user()->getKey()]);
65: }
66: }
67:
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:
15: public function getConsultationId(): int
16: {
17: return $this->consultationId;
18: }
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/FilterConsultationTermsListDto.php
ERROR: Parse error at line 17 column 13:
7: use EscolaLms\Consultations\Repositories\Criteria\UserExistsCriterion;
8: use EscolaLms\Core\Repositories\Criteria\Primitives\NotNullCriterion;
9: use EscolaLms\Core\Repositories\Criteria\Primitives\WhereCriterion;
10: use EscolaLms\Core\Repositories\Criteria\Primitives\WhereNotInOrIsNullCriterion;
11: use EscolaLms\Core\Repositories\Criteria\Primitives\DateCriterion;
12: use EscolaLms\Core\Repositories\Criteria\Primitives\EqualCriterion;
13: use EscolaLms\Core\Repositories\Criteria\Primitives\InCriterion;
14:
15: class FilterConsultationTermsListDto extends BaseDto implements ModelDtoContract
16: {
17: private array $status;
^
18: private array $reminderStatus;
19: private string $dateTo;
20: private string $dateFrom;
21: private string $dateTimeTo;
22: private string $dateTimeFrom;
23: private int $consultationId;
24:
25: private array $criteria = [];
26:
27: public static function prepareFilters(array $search): self
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/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/Events/ReminderAboutTerm.php
ERROR: Parse error at line 10 column 13:
1: <?php
2:
3: namespace EscolaLms\Consultations\Events;
4:
5: use EscolaLms\Consultations\Models\ConsultationUserPivot;
6: use EscolaLms\Core\Models\User;
7:
8: class ReminderAboutTerm extends ConsultationTerm
9: {
10: private string $status;
^
11:
12: public function __construct(User $user, ConsultationUserPivot $consultationTerm, string $status)
13: {
14: parent::__construct($user, $consultationTerm);
15: $this->status = $status;
16: }
17:
18: public function getStatus()
19: {
20: return $this->status;
ERROR: Unable to parse file: /code/src/Events/ReminderTrainerAboutTerm.php
ERROR: Parse error at line 10 column 13:
1: <?php
2:
3: namespace EscolaLms\Consultations\Events;
4:
5: use EscolaLms\Consultations\Models\ConsultationUserPivot;
6: use EscolaLms\Core\Models\User;
7:
8: class ReminderTrainerAboutTerm extends ConsultationTerm
9: {
10: private string $status;
^
11:
12: public function __construct(User $user, ConsultationUserPivot $consultationTerm, string $status)
13: {
14: parent::__construct($user, $consultationTerm);
15: $this->status = $status;
16: }
17:
18: public function getStatus()
19: {
20: return $this->status;
ERROR: Unable to parse file: /code/src/Events/ConsultationTerm.php
ERROR: Parse error at line 14 column 13:
4:
5: use EscolaLms\Core\Models\User;
6: use EscolaLms\Consultations\Models\ConsultationUserPivot;
7: use Illuminate\Foundation\Events\Dispatchable;
8: use Illuminate\Queue\SerializesModels;
9:
10: abstract class ConsultationTerm
11: {
12: use Dispatchable, SerializesModels;
13:
14: private User $user;
^
15: private ConsultationUserPivot $consultationTerm;
16:
17: public function __construct(User $user, ConsultationUserPivot $consultationTerm)
18: {
19: $this->user = $user;
20: $this->consultationTerm = $consultationTerm;
21: }
22:
23: public function getUser(): User
24: {
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: 108/108 source files have been analyzed
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 1.111s
INFO: Final Memory: 11M/164M
INFO: ------------------------------------------------------------------------
|