File tree Expand file tree Collapse file tree 8 files changed +43
-6
lines changed Expand file tree Collapse file tree 8 files changed +43
-6
lines changed Original file line number Diff line number Diff line change 32
32
33
33
- name : Run test suite
34
34
run : vendor/bin/phpunit tests
35
+
36
+ - name : Run static analysis
37
+ run : vendor/bin/psalm
Original file line number Diff line number Diff line change
1
+ .DS_Store
1
2
.idea
2
3
composer.lock
3
4
vendor
4
- coverage
5
+ coverage
Original file line number Diff line number Diff line change 1
1
# Parable Http
2
2
3
+ ## 0.5.2
4
+
5
+ _ Changes_
6
+ - Added static analysis through psalm.
7
+
3
8
## 0.5.1
4
9
5
10
_ Changes_
6
- - ` Request ` can now be instantiated without passing all values, in which cases it will set itself up by using ` RequestFactory::getValuesFromServer ` .
11
+ - ` Request ` can now be instantiated without passing all values, in which cases it will set itself up by using ` RequestFactory::getValuesFromServer ` .
7
12
8
13
## 0.5.0
9
14
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ dependencies:
4
4
--no-plugins \
5
5
--no-scripts
6
6
7
+ psalm :
8
+ vendor/bin/psalm --clear-cache
9
+ vendor/bin/psalm
10
+
7
11
tests : dependencies
8
12
vendor/bin/phpunit --verbose tests
9
13
@@ -13,3 +17,7 @@ coverage: dependencies
13
17
14
18
tests-clean :
15
19
vendor/bin/phpunit --verbose tests
20
+
21
+ coverage-clean :
22
+ rm -rf ./coverage
23
+ XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-html ./coverage tests
Original file line number Diff line number Diff line change 18
18
"ralouphie/getallheaders" : " ^3.0"
19
19
},
20
20
"require-dev" : {
21
- "phpunit/phpunit" : " ^9.0"
21
+ "phpunit/phpunit" : " ^9.0" ,
22
+ "vimeo/psalm" : " ^4.6"
22
23
},
23
24
"autoload" : {
24
25
"psr-4" : {
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <psalm
3
+ errorLevel =" 4"
4
+ resolveFromConfigFile =" true"
5
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
6
+ xmlns =" https://getpsalm.org/schema/config"
7
+ xsi : schemaLocation =" https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8
+ >
9
+ <projectFiles >
10
+ <directory name =" src" />
11
+ <ignoreFiles >
12
+ <directory name =" vendor" />
13
+ </ignoreFiles >
14
+ </projectFiles >
15
+
16
+ <issueHandlers >
17
+ <UnresolvableInclude errorLevel =" suppress" />
18
+ </issueHandlers >
19
+ </psalm >
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public function getRequestUri(): ?string
53
53
54
54
public function getProtocol (): string
55
55
{
56
- return $ this ->protocol ?? ' HTTP/1.1 ' ;
56
+ return $ this ->protocol ;
57
57
}
58
58
59
59
public function getProtocolVersion (): string
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ public function appendBody(string $content): void
51
51
52
52
public function getContentType (): string
53
53
{
54
- return $ this ->getHeader ('Content-Type ' );
54
+ return $ this ->getHeader ('Content-Type ' ) ?? ' text/html ' ;
55
55
}
56
56
57
57
public function setContentType (string $ contentType ): void
@@ -61,7 +61,7 @@ public function setContentType(string $contentType): void
61
61
62
62
public function getProtocol (): string
63
63
{
64
- return $ this ->protocol ?? ' HTTP/1.1 ' ;
64
+ return $ this ->protocol ;
65
65
}
66
66
67
67
public function getProtocolVersion (): string
You can’t perform that action at this time.
0 commit comments