Merge branch 'release/7.0.3' #145
Mostafa Barmshory authored e2af11e3
complete00:00:28
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-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
9f6ca43a9b11: Waiting
c7737daaa88e: Waiting
dacca831c5b2: Waiting
16fbe636fb42: Waiting
fb7a0bf324fd: Waiting
d45ca5424117: Waiting
723d37ca9d09: Waiting
9eddffd41f08: Waiting
abc2d0fc5668: Verifying Checksum
abc2d0fc5668: Download complete
dc541c3b1e49: Verifying Checksum
dc541c3b1e49: Download complete
c7737daaa88e: Verifying Checksum
c7737daaa88e: Download complete
8e402f1a9c57: Download complete
dacca831c5b2: Verifying Checksum
dacca831c5b2: Download complete
8e402f1a9c57: Pull complete
9f6ca43a9b11: Verifying Checksum
9f6ca43a9b11: Download complete
16fbe636fb42: Verifying Checksum
16fbe636fb42: Download complete
abc2d0fc5668: Pull complete
723d37ca9d09: Verifying Checksum
723d37ca9d09: Download complete
dc541c3b1e49: Pull complete
fb7a0bf324fd: Download complete
9eddffd41f08: Verifying Checksum
9eddffd41f08: Download complete
d45ca5424117: Verifying Checksum
d45ca5424117: 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-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: Download complete
b2fb00c172a9: Verifying Checksum
b2fb00c172a9: Download complete
0dff3d7a1a0e: Verifying Checksum
0dff3d7a1a0e: Download complete
043df9f67e9a: Verifying Checksum
043df9f67e9a: Download complete
cfbd8af1af7a: Verifying Checksum
cfbd8af1af7a: Download complete
ea3b98fb78f4: Verifying Checksum
ea3b98fb78f4: Download complete
1519b1438731: Verifying Checksum
1519b1438731: Download complete
1c654bf89a09: Verifying Checksum
1c654bf89a09: Download complete
043df9f67e9a: Pull complete
a42e650909d2: Pull 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/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: ------------------------------------------------------------------------