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/db/images/smgit_log.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/db/images/smgit_configure_branches.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/db/images/agiletoolkit.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/db/images/smgit_file_compare.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/db/images/smgit_push.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/db/images/smgit_configure_git-flow.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: 94 files indexed
INFO: 30 source files to be analyzed
ERROR: Unable to parse file: /code/src/ExceptionBuilder.php
ERROR: Parse error at line 15 column 13:
5:
6: /**
7: * An exception builder
8: *
9: * @author maso
10: *
11: */
12: class ExceptionBuilder
13: {
14:
15: private ?string $message;
^
16:
17: private array $solutions = [];
18:
19: private array $params = [];
20:
21: private ?int $code = 0;
22:
23: private ?int $status = 0;
24:
25: private ?Throwable $previous;
ERROR: Unable to parse file: /code/src/Process/HttpBodyToEntities.php
ERROR: Parse error at line 14 column 15:
4: use Pluf\Orm\ModelDescriptionRepository;
5: use Pluf\Orm\ObjectMapperBuilder;
6: use Pluf\Scion\UnitTrackerInterface;
7: use Psr\Http\Message\ServerRequestInterface;
8: use Pluf\Orm\AssertionTrait;
9:
10: class HttpBodyToEntities
11: {
12: use AssertionTrait;
13:
14: protected string $class;
^
15:
16: protected bool $multi;
17:
18: protected string $name = "entities";
19:
20: public function __construct(string $class, bool $multi = true, string $name = "entities")
21: {
22: $this->class = $class;
23: $this->multi = $multi;
24: $this->name = $name;
ERROR: Unable to parse file: /code/src/Process/Entity/ReadEntity.php
ERROR: Parse error at line 14 column 13:
4: use Pluf\Core\Exception;
5: use Pluf\Orm\AssertionTrait;
6: use Pluf\Orm\EntityManager;
7: use Pluf\Orm\EntityQuery;
8: use Throwable;
9:
10: class ReadEntity
11: {
12: use AssertionTrait;
13:
14: private string $class;
^
15:
16: public function __construct(string $class)
17: {
18: $this->class = $class;
19: }
20:
21: /**
22: * Store list of cusomers into the repositoer
23: *
24: *
ERROR: Unable to parse file: /code/src/Process/Entity/DeleteEntity.php
ERROR: Parse error at line 12 column 13:
2: namespace Pluf\Core\Process\Entity;
3:
4: use Pluf\Orm\AssertionTrait;
5: use Pluf\Orm\EntityQuery;
6: use Pluf\Orm\EntityManager;
7:
8: class DeleteEntity
9: {
10: use AssertionTrait;
11:
12: private string $class;
^
13:
14: private string $name = "itemId";
15:
16: public function __construct(string $class, string $name = "itemId")
17: {
18: $this->class = $class;
19: $this->name = $name;
20: }
21:
22: /**
ERROR: Unable to parse file: /code/src/Process/Entity/UpdateEntity.php
ERROR: Parse error at line 14 column 13:
4: use Pluf\Core\Exception;
5: use Pluf\Orm\AssertionTrait;
6: use Pluf\Orm\EntityManager;
7: use Throwable;
8: use Pluf\Orm\ModelDescriptionRepository;
9:
10: class UpdateEntity
11: {
12: use AssertionTrait;
13:
14: private string $class;
^
15:
16:
17: public function __construct(string $class)
18: {
19: $this->class = $class;
20: }
21:
22: public function __invoke(EntityManager $entityManager, ModelDescriptionRepository $modelDescriptionRepository, $entity, $itemId)
23: {
24: $md = $modelDescriptionRepository->get($this->class);
ERROR: Unable to parse file: /code/src/Process/Entity/CreateEntities.php
ERROR: Parse error at line 34 column 44:
24: */
25: public function __invoke(EntityManager $entityManager, $entities): array
26: {
27: if (! is_array($entities)) {
28: $entities = [
29: $entities
30: ];
31: }
32: $resultList = [];
33: foreach ($entities as $entity) {
34: $item = $entityManager->persist($entity);
^
35: $resultList[] = $item;
36: }
37: return $resultList;
38: }
39: }
40:
41:
ERROR: Unable to parse file: /code/src/Process/Entity/ReadEntities.php
ERROR: Parse error at line 11 column 13:
1: <?php
2: namespace Pluf\Core\Process\Entity;
3:
4: use Pluf\Orm\AssertionTrait;
5: use Pluf\Orm\EntityQuery;
6:
7: class ReadEntities
8: {
9: use AssertionTrait;
10:
11: private string $class;
^
12: private string $name = "entities";
13:
14: public function __construct(string $class, string $name = "entities")
15: {
16: $this->class = $class;
17: $this->name = $name;
18: }
19:
20: /**
21: * Store list of cusomers into the repositoer
ERROR: Unable to parse file: /code/src/Process/Http/IfMethodIs.php
ERROR: Parse error at line 27 column 13:
17: * along with this program. If not, see <https://www.gnu.org/licenses/>.
18: */
19: namespace Pluf\Core\Process\Http;
20:
21: use Pluf\Scion\UnitTrackerInterface;
22: use Psr\Http\Message\RequestInterface;
23:
24: class IfMethodIs
25: {
26:
27: private string $method;
^
28:
29: public function __construct(string $method)
30: {
31: $this->method = $method;
32: }
33:
34: public function __invoke(RequestInterface $request, UnitTrackerInterface $unitTracker)
35: {
36: if ($request->getMethod() == $this->method) {
37: return $unitTracker->next();
ERROR: Unable to parse file: /code/src/Process/Http/ResourceNotFound.php
ERROR: Parse error at line 37 column 19:
27: *
28: * @author maso (mostafa.barmshory@gmail.com)
29: *
30: */
31: class ResourceNotFound
32: {
33:
34: public function __invoke(ServerRequestInterface $request)
35: {
36: throw new ResourceNotFoundException("Requested resouce not found : {{resource}}",
37: status: 404,
^
38: params:[
39: "resource" => $request?->getUri()?->getPath()
40: ]);
41: }
42: }
43:
44:
ERROR: Unable to parse file: /code/src/Process/Http/IfPathIs.php
ERROR: Parse error at line 32 column 13:
22: use Psr\Http\Message\RequestInterface;
23:
24: /**
25: * Checks if the request path match with the given one.
26: *
27: * @author maso
28: */
29: class IfPathIs
30: {
31:
32: private string $regex;
^
33:
34: private bool $removePrefix = true;
35:
36: /**
37: * Create new instance of the process
38: *
39: * @param string $regex to match with request path
40: * @param bool $removePrefix should remove the pattern from the path
41: */
42: public function __construct(string $regex, bool $removePrefix = true)
ERROR: Unable to parse file: /code/src/Process/Http/FileToResponse.php
ERROR: Parse error at line 47 column 13:
37: */
38: class FileToResponse
39: {
40:
41: /**
42: * Defines response cache police
43: *
44: * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
45: * @var string
46: */
47: private string $cacheControl;
^
48:
49: /**
50: * Mimetype of the response
51: *
52: * The mimpeTypes is a file whre list of all mimetype and extensions are saved. If the
53: * path is not set of find, then the file extensions are used directly.
54: *
55: * @var string
56: */
57: private string $mimeTypes;
ERROR: Unable to parse file: /code/src/Process/Http/AccessLog.php
ERROR: Parse error at line 52 column 13:
42: * - {Remote} – Remote host (client IP address)
43: * - {UserId} – User identity, or dash, if none (often not used)
44: * - {UserName} – Username, via HTTP authentication, or dash if not used
45: * - {Timestamp} – Timestamp of when Apache received the HTTP request
46: * - {Request} – The actual request itself from the client
47: * - {Status} – The status code Apache returns in response to the request
48: * - {RequestSize} – The size of the request in bytes.
49: * - {Referrer} – Referrer header, or dash if not used (In other words, did they click a URL on another site to come to your site)
50: * - {UserAgent} – User agent (contains information about the requester’s browser/OS/etc)
51: */
52: private string $format = "{Remote} {UserId} {UserName} {Timestamp} \"{Request}\" %>{Status} {RequestSize} \"{Referrer}\" \"{UserAgent}\"";
^
53:
54: public function __invoke(RequestInterface $request, UnitTrackerInterface $unitTracker, LoggerInterface $logger, $user = null)
55: {
56: $result = $unitTracker->next();
57: $logger->info($this->format, [
58: "Remote" => self::getIpAddress($request),
59: "User" => $user,
60: "Timestamp" => time(),
61: "Request" => $request,
62: "Status" => $result->getStatusCode(),
ERROR: Unable to parse file: /code/src/Process/Http/IfPathAndMethodIs.php
ERROR: Parse error at line 27 column 13:
17: * along with this program. If not, see <https://www.gnu.org/licenses/>.
18: */
19: namespace Pluf\Core\Process\Http;
20:
21: use Pluf\Scion\UnitTrackerInterface;
22: use Psr\Http\Message\RequestInterface;
23:
24: class IfPathAndMethodIs
25: {
26:
27: private array $regex;
^
28:
29: private array $methods;
30:
31: private bool $removePrefix = true;
32:
33: public function __construct(string|array $regex, array $methods = [
34: 'GET',
35: 'POST',
36: 'DELETE'
37: ], bool $removePrefix = true)
ERROR: Unable to parse file: /code/src/Process/Http/ResponseBodyEncoder.php
ERROR: Parse error at line 77 column 19:
67: $solutions = [];
68: $previous = $t;
69: if($t instanceof \Pluf\Orm\Exception){
70: $params = $t->getParams();
71: $solutions = $t->getSolutions();
72: } else if($t instanceof \atk4\core\Exception){
73: $params = $t->getParams();
74: $solutions = $t->getSolutions();
75: }
76: return new Exception\UnhandledException(
77: status: 500,
^
78: code: $t->getCode(),
79: message: $t->getMessage(),
80: params: $params,
81: previous: $previous,
82: solutions: $solutions);
83: }
84: }
85:
86:
ERROR: Unable to parse file: /code/src/Exception.php
ERROR: Parse error at line 45 column 13:
35: * @author Mostafa Barmshory<mostafa.barmshory@dpq.co.ir>
36: * @since Pluf6
37: *
38: */
39: #[Entity]
40: #[Transients(["line", "file", "string", "trace", "previous"])]
41: class Exception extends RuntimeException
42: {
43:
44:
45: private array $solutions = [];
^
46:
47:
48: private array $params = [];
49:
50:
51: private ?int $status = 500;
52:
53: /**
54: * Crates new instance of the exception
55: *
ERROR: Unable to parse file: /code/src/CollectionQuery.php
ERROR: Parse error at line 16 column 12:
6:
7: // TODO: maso, 2020: add following constraint
8: // use Pluf\Orm\Attribute\IsPositive;
9: // use Pluf\Orm\Attribute\Max;
10:
11: #[Entity]
12: class CollectionQuery
13: {
14:
15: #[Column('start')]
16: public int $start = 0;
^
17:
18: #[Column('count')]
19: public int $count = 500;
20:
21: #[Column('query')]
22: public ?string $query = null;
23: }
24:
25:
INFO: 30/30 source files have been analyzed
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.460s
INFO: Final Memory: 12M/95M
INFO: ------------------------------------------------------------------------
|