Skip to content

Commit 9781d8d

Browse files
derrabusnicolas-grekas
authored andcommitted
Fix inconsistent return points.
1 parent dacdad8 commit 9781d8d

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

File/MimeType/ExtensionGuesser.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,7 @@ public function guess($mimeType)
9090
return $extension;
9191
}
9292
}
93+
94+
return null;
9395
}
9496
}

File/MimeType/MimeTypeGuesser.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,7 @@ public function guess($path)
129129
if (2 === \count($this->guessers) && !FileBinaryMimeTypeGuesser::isSupported() && !FileinfoMimeTypeGuesser::isSupported()) {
130130
throw new \LogicException('Unable to guess the mime type as no guessers are available (Did you enable the php_fileinfo extension?)');
131131
}
132+
133+
return null;
132134
}
133135
}

Request.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,49 +97,49 @@ class Request
9797
/**
9898
* Custom parameters.
9999
*
100-
* @var \Symfony\Component\HttpFoundation\ParameterBag
100+
* @var ParameterBag
101101
*/
102102
public $attributes;
103103

104104
/**
105105
* Request body parameters ($_POST).
106106
*
107-
* @var \Symfony\Component\HttpFoundation\ParameterBag
107+
* @var ParameterBag
108108
*/
109109
public $request;
110110

111111
/**
112112
* Query string parameters ($_GET).
113113
*
114-
* @var \Symfony\Component\HttpFoundation\ParameterBag
114+
* @var ParameterBag
115115
*/
116116
public $query;
117117

118118
/**
119119
* Server and execution environment parameters ($_SERVER).
120120
*
121-
* @var \Symfony\Component\HttpFoundation\ServerBag
121+
* @var ServerBag
122122
*/
123123
public $server;
124124

125125
/**
126126
* Uploaded files ($_FILES).
127127
*
128-
* @var \Symfony\Component\HttpFoundation\FileBag
128+
* @var FileBag
129129
*/
130130
public $files;
131131

132132
/**
133133
* Cookies ($_COOKIE).
134134
*
135-
* @var \Symfony\Component\HttpFoundation\ParameterBag
135+
* @var ParameterBag
136136
*/
137137
public $cookies;
138138

139139
/**
140140
* Headers (taken from the $_SERVER).
141141
*
142-
* @var \Symfony\Component\HttpFoundation\HeaderBag
142+
* @var HeaderBag
143143
*/
144144
public $headers;
145145

@@ -199,7 +199,7 @@ class Request
199199
protected $format;
200200

201201
/**
202-
* @var \Symfony\Component\HttpFoundation\Session\SessionInterface
202+
* @var SessionInterface
203203
*/
204204
protected $session;
205205

@@ -1449,6 +1449,8 @@ public function getFormat($mimeType)
14491449
return $format;
14501450
}
14511451
}
1452+
1453+
return null;
14521454
}
14531455

14541456
/**

Response.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class Response
8888
const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511; // RFC6585
8989

9090
/**
91-
* @var \Symfony\Component\HttpFoundation\ResponseHeaderBag
91+
* @var ResponseHeaderBag
9292
*/
9393
public $headers;
9494

@@ -790,6 +790,8 @@ public function getMaxAge()
790790
if (null !== $this->getExpires()) {
791791
return (int) $this->getExpires()->format('U') - (int) $this->getDate()->format('U');
792792
}
793+
794+
return null;
793795
}
794796

795797
/**
@@ -846,6 +848,8 @@ public function getTtl()
846848
if (null !== $maxAge = $this->getMaxAge()) {
847849
return $maxAge - $this->getAge();
848850
}
851+
852+
return null;
849853
}
850854

851855
/**

0 commit comments

Comments
 (0)