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/doc/rad_logo.png' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: 157 files indexed
INFO: 141 source files to be analyzed
ERROR: Unable to parse file: /code/src/Rad/Service/Service.php
ERROR: Parse error at line 27 column 22:
17: * Singleton Service
18: *
19: * @author guillaume
20: */
21: abstract class Service implements ServiceInterface {
22:
23: /**
24: *
25: * @var array
26: */
27: protected static array $instances = [];
^
28:
29: /**
30: *
31: * @var string|null
32: */
33: protected ?string $serviceType = null;
34:
35: /**
36: *
37: * @var string|null
ERROR: Unable to parse file: /code/src/Rad/Database/PDODatabaseHandler.php
ERROR: Parse error at line 55 column 76:
45: } catch (PDOException $ex) {
46: Log::getHandler()->error($ex->getMessage());
47: }
48: }
49:
50: /**
51: * @param string $sql
52: *
53: * @return PDOStatement
54: */
55: public function prepare(string $sql, array $options = []): PDOStatement|false {
^
56: try {
57: Log::getHandler()->debug($sql);
58: $stmt = parent::prepare($sql, $options);
59: } catch (PDOException $ex) {
60: Log::getHandler()->error($ex->getMessage());
61: }
62: return $stmt;
63: }
64:
65: /**
ERROR: Unable to parse file: /code/src/Rad/Rad.php
ERROR: Parse error at line 34 column 15:
24: *
25: */
26: class Rad {
27:
28: const VERSION = '1.0';
29:
30: /**
31: *
32: * @var RouterInterface
33: */
34: protected ?RouterInterface $router = null;
^
35:
36: /**
37: *
38: * @var ServerRequestInterface
39: */
40: protected ?ServerRequestInterface $request = null;
41:
42: /**
43: *
44: * @var string[]
ERROR: Unable to parse file: /code/src/Rad/Http/HttpClient.php
ERROR: Parse error at line 37 column 131:
27: }
28:
29: /**
30: *
31: * @param string $url
32: * @param array $get_array
33: * @param array $post_array
34: * @param array $headers_array
35: * @return string|bool
36: */
37: public static function doRequest($url, array $get_array = null, array $post_array = null, array $headers_array = null): string|bool {
^
38: $post_params = null;
39: $get_params = null;
40: $opts = [];
41: $opts['http']['method'] = 'GET';
42: if ($headers_array != null) {
43: $opts['http']['header'] = implode(',', $headers_array);
44: }
45:
46: if ($get_array !== null) {
47: $get_params = array_filter($get_array, function ($value) {
ERROR: Unable to parse file: /code/src/Rad/Event/EventHandler.php
ERROR: Parse error at line 35 column 39:
25: if (!isset($this->listeners[$eventName])) {
26: $this->listeners[$eventName] = [];
27: }
28: $this->listeners[$eventName][] = $listener;
29: }
30:
31: public function dispatch(object $event) {
32: $eventName = get_class($event);
33: $listeners = $this->listeners[$eventName] ?? [];
34:
35: array_walk($listeners, static fn(EventListenerInterface $listener) => $listener->handle($event));
^
36: }
37:
38: public function getListenersForEvent(AbstractEvent $event): iterable {
39: $eventName = get_class($event);
40: return $this->listeners[$eventName] ?? [];
41: }
42: }
43:
ERROR: Unable to parse file: /code/src/Rad/Build/DatabaseBuilder/BaseGenerator.php
ERROR: Parse error at line 19 column 15:
9:
10: namespace Rad\Build\DatabaseBuilder;
11:
12: /**
13: * Description of BaseGenerator
14: *
15: * @author Guillaume Monet
16: */
17: class BaseGenerator {
18:
19: protected string $query = "\$result = Database::getHandler()->query(\$sql)";
^
20: protected string $prepare = "\$result = Database::getHandler()->prepare(\$sql)";
21: protected string $execute = "\$result->execute(%s)";
22: protected string $result = "\$res = \$result->fetchAll(\PDO::FETCH_ASSOC)";
23:
24: }
25:
ERROR: Unable to parse file: /code/src/Rad/Build/DatabaseBuilder/Elements/Table.php
ERROR: Parse error at line 25 column 12:
15: * @author guillaume
16: */
17: class Table {
18:
19: use BaseElementTrait;
20:
21: /**
22: *
23: * @var string
24: */
25: public string $name;
^
26:
27: /**
28: *
29: * @var Column[]
30: */
31: public array $columns = [];
32:
33: /**
34: *
35: * @var Index[]
ERROR: Unable to parse file: /code/src/Rad/Build/DatabaseBuilder/Elements/Index.php
ERROR: Parse error at line 25 column 12:
15: * @author guillaume
16: */
17: class Index {
18:
19: use BaseElementTrait;
20:
21: /**
22: *
23: * @var string
24: */
25: public string $name;
^
26:
27: /**
28: *
29: * @var Column[]
30: */
31: public array $columns;
32: public $unique = 0;
33:
34: }
35:
ERROR: Unable to parse file: /code/src/Rad/Build/DatabaseBuilder/ControllersGenerator.php
ERROR: Parse error at line 21 column 12:
11:
12: use Nette\PhpGenerator\ClassType;
13:
14: /**
15: * Description of ControllerGenerator
16: *
17: * @author Guillaume Monet
18: */
19: class ControllersGenerator extends BaseGenerator {
20:
21: public ?string $namespace = null;
^
22: public ?string $path = null;
23: public ?string $prefix = null;
24: public array $baseRequire = array(
25: '\Psr\Http\Message\ServerRequestInterface',
26: '\Psr\Http\Message\ResponseInterface',
27: 'Rad\\Controller\\Controller'
28: );
29:
30: public function generateControllerGetAll(ClassType $mainClass, ClassType $class) {
31: $parse = $class->addMethod('getAll');
ERROR: Unable to parse file: /code/src/Rad/Build/DatabaseBuilder/ClassesGenerator.php
ERROR: Parse error at line 26 column 12:
16:
17: /**
18: * Description of ClassesGenerator
19: *
20: * @author Guillaume Monet
21: */
22: class ClassesGenerator extends BaseGenerator {
23:
24: use ClassesGeneratorStaticTrait;
25:
26: public ?string $namespace = null;
^
27: public ?string $path = null;
28: public array $baseRequire = [
29: "PDO",
30: "Rad\\Model\\Model",
31: "Rad\\Database\\Database",
32: "Rad\\Cache\\Cache",
33: "Rad\\Log\\Log",
34: "Rad\\Utils\\StringUtils",
35: "Rad\\Encryption\\Encryption"
36: ];
ERROR: Unable to parse file: /code/src/Rad/Build/DatabaseBuildHandler.php
ERROR: Parse error at line 26 column 13:
16: use Rad\Build\DatabaseBuilder\GeneratorTools;
17: use Rad\Cache\Cache;
18: use Rad\Config\Config;
19: use Rad\Utils\StringUtils;
20:
21: /**
22: *
23: */
24: class DatabaseBuildHandler implements BuildInterface {
25:
26: private ?ClassesGenerator $classesGenerator = null;
^
27: private ?ControllersGenerator $controllersGenerator = null;
28:
29: public function __construct() {
30: $config = Config::getServiceConfig('build', 'databasebuilder')->config;
31: $this->classesGenerator = new ClassesGenerator();
32: $this->controllersGenerator = new ControllersGenerator();
33:
34: $this->classesGenerator->path = Config::getApiConfig()->install_path . $config->classesPath;
35: $this->classesGenerator->namespace = $config->classesNamespace;
36: $this->controllersGenerator->path = Config::getApiConfig()->install_path . $config->controllersPath;
ERROR: Unable to parse file: /code/src/Rad/Middleware/Middleware.php
ERROR: Parse error at line 20 column 15:
10: namespace Rad\Middleware;
11:
12: use Closure;
13: use InvalidArgumentException;
14: use Psr\Http\Message\ResponseInterface;
15: use Psr\Http\Message\ServerRequestInterface;
16: use Rad\Route\Route;
17:
18: class Middleware {
19:
20: protected array $layers = [];
^
21:
22: public function __construct(array $layers = []) {
23: $this->layers = $layers;
24: }
25:
26: /**
27: *
28: * @param array|Middleware|MiddlewareInterface $layers
29: * @return void
30: * @throws InvalidArgumentException
ERROR: Unable to parse file: /code/src/Rad/Model/Model.php
ERROR: Parse error at line 27 column 12:
17: * Description of IObject.
18: *
19: * @author Guillaume Monet
20: *
21: */
22: class Model implements JsonSerializable {
23:
24: public $resource_uri;
25: public $resource_name;
26: public $resource_namespace;
27: public ?int $id;
^
28:
29: public function __construct() {
30:
31: }
32:
33: public function getId() {
34: return $this->id;
35: }
36:
37: public function getResourceName() {
ERROR: Unable to parse file: /code/src/Rad/Route/TreeNodeRoute.php
ERROR: Parse error at line 25 column 15:
15: * Tree For Routing
16: *
17: * @author guillaume
18: */
19: class TreeNodeRoute {
20:
21: /**
22: * RegExp of the current left
23: * @var string
24: */
25: protected string $path_chunk;
^
26:
27: /**
28: *
29: * @var Route
30: */
31: protected ?Route $route = null;
32:
33: /**
34: *
35: * @var TreeNodeRoute[]
INFO: 141/141 source files have been analyzed
File location was not provided, defaulting to line 1.
[rule=php:S105, severity=MINOR, file=/code/src/Rad/Http/HttpHeaders.php]
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 2.115s
INFO: Final Memory: 7M/185M
INFO: ------------------------------------------------------------------------
|