Skip to content

Commit 27f2b78

Browse files
Fix return statements
1 parent 1000881 commit 27f2b78

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

File/MimeType/FileBinaryMimeTypeGuesser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function guess($path)
7474
}
7575

7676
if (!self::isSupported()) {
77-
return;
77+
return null;
7878
}
7979

8080
ob_start();
@@ -84,14 +84,14 @@ public function guess($path)
8484
if ($return > 0) {
8585
ob_end_clean();
8686

87-
return;
87+
return null;
8888
}
8989

9090
$type = trim(ob_get_clean());
9191

9292
if (!preg_match('#^([a-z0-9\-]+/[a-z0-9\-\.]+)#i', $type, $match)) {
9393
// it's not a type, but an error message
94-
return;
94+
return null;
9595
}
9696

9797
return $match[1];

File/MimeType/FileinfoMimeTypeGuesser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ public function guess($path)
5757
}
5858

5959
if (!self::isSupported()) {
60-
return;
60+
return null;
6161
}
6262

6363
if (!$finfo = new \finfo(FILEINFO_MIME_TYPE, $this->magicFile)) {
64-
return;
64+
return null;
6565
}
6666

6767
return $finfo->file($path);

File/MimeType/MimeTypeGuesserInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface MimeTypeGuesserInterface
2626
*
2727
* @param string $path The path to the file
2828
*
29-
* @return string The mime type or NULL, if none could be guessed
29+
* @return string|null The mime type or NULL, if none could be guessed
3030
*
3131
* @throws FileNotFoundException If the file does not exist
3232
* @throws AccessDeniedException If the file could not be read

RequestStack.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function push(Request $request)
4747
public function pop()
4848
{
4949
if (!$this->requests) {
50-
return;
50+
return null;
5151
}
5252

5353
return array_pop($this->requests);
@@ -73,7 +73,7 @@ public function getCurrentRequest()
7373
public function getMasterRequest()
7474
{
7575
if (!$this->requests) {
76-
return;
76+
return null;
7777
}
7878

7979
return $this->requests[0];
@@ -95,7 +95,7 @@ public function getParentRequest()
9595
$pos = \count($this->requests) - 2;
9696

9797
if (!isset($this->requests[$pos])) {
98-
return;
98+
return null;
9999
}
100100

101101
return $this->requests[$pos];

0 commit comments

Comments
 (0)