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 3232
3333 - name : Run test suite
3434 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
12.idea
23composer.lock
34vendor
4- coverage
5+ coverage
Original file line number Diff line number Diff line change 11# Parable Http
22
3+ ## 0.5.2
4+
5+ _ Changes_
6+ - Added static analysis through psalm.
7+
38## 0.5.1
49
510_ 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 ` .
712
813## 0.5.0
914
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ dependencies:
44 --no-plugins \
55 --no-scripts
66
7+ psalm :
8+ vendor/bin/psalm --clear-cache
9+ vendor/bin/psalm
10+
711tests : dependencies
812 vendor/bin/phpunit --verbose tests
913
@@ -13,3 +17,7 @@ coverage: dependencies
1317
1418tests-clean :
1519 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 1818 "ralouphie/getallheaders" : " ^3.0"
1919 },
2020 "require-dev" : {
21- "phpunit/phpunit" : " ^9.0"
21+ "phpunit/phpunit" : " ^9.0" ,
22+ "vimeo/psalm" : " ^4.6"
2223 },
2324 "autoload" : {
2425 "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
5353
5454 public function getProtocol (): string
5555 {
56- return $ this ->protocol ?? ' HTTP/1.1 ' ;
56+ return $ this ->protocol ;
5757 }
5858
5959 public function getProtocolVersion (): string
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ public function appendBody(string $content): void
5151
5252 public function getContentType (): string
5353 {
54- return $ this ->getHeader ('Content-Type ' );
54+ return $ this ->getHeader ('Content-Type ' ) ?? ' text/html ' ;
5555 }
5656
5757 public function setContentType (string $ contentType ): void
@@ -61,7 +61,7 @@ public function setContentType(string $contentType): void
6161
6262 public function getProtocol (): string
6363 {
64- return $ this ->protocol ?? ' HTTP/1.1 ' ;
64+ return $ this ->protocol ;
6565 }
6666
6767 public function getProtocolVersion (): string
You can’t perform that action at this time.
0 commit comments