Skip to content

Commit 4e07b22

Browse files
committed
Merge branch 'develop'
2 parents bcf2082 + 28b830e commit 4e07b22

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![version](https://img.shields.io/badge/Version-2.0.1-brightgreen.svg)](https://github.com/SimonDevelop/sirene/releases/tag/2.0.1)
1+
[![version](https://img.shields.io/badge/Version-2.0.2-brightgreen.svg)](https://github.com/SimonDevelop/sirene/releases/tag/2.0.2)
22
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.1-8892BF.svg)](https://php.net/)
33
[![Github Actions PHP](https://github.com/SimonDevelop/sirene/workflows/PHP/badge.svg)](https://github.com/SimonDevelop/sirene/actions)
44
[![GitHub license](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/SimonDevelop/sirene/blob/master/LICENSE)

src/Sirene.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function informations(): array|bool
6363
}
6464
curl_close($ch);
6565

66-
return json_decode($result, true);
66+
return is_null(json_decode($result, true)) ? false : json_decode($result, true);
6767
}
6868

6969
/**
@@ -86,7 +86,7 @@ public function siret(string $siret): array|bool
8686
}
8787
curl_close($ch);
8888

89-
return json_decode($result, true);
89+
return is_null(json_decode($result, true)) ? false : json_decode($result, true);
9090
}
9191

9292
/**
@@ -109,7 +109,7 @@ public function siren(string $siren): array|bool
109109
}
110110
curl_close($ch);
111111

112-
return json_decode($result, true);
112+
return is_null(json_decode($result, true)) ? false : json_decode($result, true);
113113
}
114114

115115
/**
@@ -157,7 +157,7 @@ public function searchEtablissement(
157157
}
158158
curl_close($ch);
159159

160-
return json_decode($result, true);
160+
return is_null(json_decode($result, true)) ? false : json_decode($result, true);
161161
} else {
162162
return false;
163163
}

0 commit comments

Comments
 (0)