Skip to content
This repository was archived by the owner on Mar 30, 2024. It is now read-only.

Commit a54eb90

Browse files
committed
Code Check und Docker PHP-8
1 parent 2371c81 commit a54eb90

File tree

7 files changed

+42
-6
lines changed

7 files changed

+42
-6
lines changed

.phan/config.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
/*
3+
Run check via Docker-Installes Phan:
4+
5+
# function defined in shell
6+
phan() {
7+
docker run -v $PWD:/mnt/src --rm -u "1000:1000" phanphp/phan:latest $@; return $?;
8+
}
9+
10+
# start in document root of project
11+
$ phan -o report.txt
12+
*/
13+
return [
14+
'target_php_version' => '8.0',
15+
'directory_list' => [
16+
'imexport',
17+
'php',
18+
'start'
19+
],
20+
'backward_compatibility_checks' => true,
21+
'plugins' => [
22+
'AlwaysReturnPlugin',
23+
'DollarDollarPlugin',
24+
'DuplicateArrayKeyPlugin',
25+
'DuplicateExpressionPlugin',
26+
'PregRegexCheckerPlugin',
27+
'PrintfCheckerPlugin',
28+
'SleepCheckerPlugin',
29+
'UnreachableCodePlugin',
30+
'UseReturnValuePlugin',
31+
'EmptyStatementListPlugin',
32+
'LoopVariableReusePlugin',
33+
]
34+
];

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM kimbtechnologies/php_nginx:latest
1+
FROM kimbtechnologies/php_nginx:8-latest
22

33
# enable get_browser() in PHP
44
RUN mkdir /start/ \

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
latest
2-
0.5.5
2+
0.5.6
33
0.5
44
0

php/core/Calendar.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ class Calendar {
1515

1616
private const CAL_EOL = "\r\n";
1717

18-
public function __construct( Login $login ) {
18+
private Login $login;
19+
20+
public function __construct(Login $login) {
1921
$this->login = $login;
2022
}
2123

php/core/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static function getBaseUrl() : string {
3939
}
4040

4141
public static function getImprintData() : ?array {
42-
if(empty($_ENV['CONF_IMPRESSUMURL']) || empty($_ENV['CONF_IMPRESSUMURL'])){
42+
if(empty($_ENV['CONF_IMPRESSUMURL']) || empty($_ENV['CONF_IMPRESSUMNAME'])){
4343
return null;
4444
}
4545
return array(

php/core/DataAccess.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class DataAccess {
2121
private array $cmd = array();
2222
private array $cmdSemantical = array();
2323

24-
private array $allShares = array();
24+
private array $shares = array();
2525

2626
public function __construct( Login $login, Share $share ) {
2727
$this->login = $login;

php/core/JSONReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ private function setValueHelper( $index, $value, $data ){
278278
//ersten Index raus
279279
$i0 = array_shift( $index );
280280
//machen (Rekursion)
281-
$data[$i0] = $this->setValueHelper( $index, $value, $data[$i0] );
281+
$data[$i0] = $this->setValueHelper( $index, $value, $data[$i0] ); // @phan-suppress-current-line PhanTypeArraySuspiciousNullable
282282
}
283283
//ganzes Array zurueck
284284
return $data;

0 commit comments

Comments
 (0)