Skip to content

Instantly share code, notes, and snippets.

@Ig0r-M-magic42
Created November 16, 2022 10:45
Show Gist options
  • Save Ig0r-M-magic42/7656d2d62c003ecd8f73515bc376f2ee to your computer and use it in GitHub Desktop.
Save Ig0r-M-magic42/7656d2d62c003ecd8f73515bc376f2ee to your computer and use it in GitHub Desktop.
diff --git a/src/FacebookAds/Object/ServerSide/AdsPixelSettings.php b/src/FacebookAds/Object/ServerSide/AdsPixelSettings.php
index f995a18..21015e5 100644
--- a/src/FacebookAds/Object/ServerSide/AdsPixelSettings.php
+++ b/src/FacebookAds/Object/ServerSide/AdsPixelSettings.php
@@ -151,7 +151,7 @@ class AdsPixelSettings implements ArrayAccess {
* @param integer $offset Offset
* @return boolean
*/
- public function offsetExists($offset) {
+ public function offsetExists($offset): bool {
return isset($this->container[$offset]);
}
@@ -160,7 +160,7 @@ class AdsPixelSettings implements ArrayAccess {
* @param integer $offset Offset
* @return mixed
*/
- public function offsetGet($offset) {
+ public function offsetGet($offset): mixed {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@@ -170,7 +170,7 @@ class AdsPixelSettings implements ArrayAccess {
* @param mixed $value Value to be set
* @return void
*/
- public function offsetSet($offset, $value) {
+ public function offsetSet($offset, $value): void {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@@ -183,7 +183,7 @@ class AdsPixelSettings implements ArrayAccess {
* @param integer $offset Offset
* @return void
*/
- public function offsetUnset($offset) {
+ public function offsetUnset($offset): void {
unset($this->container[$offset]);
}
diff --git a/src/FacebookAds/Object/ServerSide/Content.php b/src/FacebookAds/Object/ServerSide/Content.php
index 75087f9..9afaa47 100644
--- a/src/FacebookAds/Object/ServerSide/Content.php
+++ b/src/FacebookAds/Object/ServerSide/Content.php
@@ -205,7 +205,7 @@ class Content implements ArrayAccess {
* @param integer $offset Offset
* @return boolean
*/
- public function offsetExists($offset) {
+ public function offsetExists($offset): bool {
return isset($this->container[$offset]);
}
@@ -214,7 +214,7 @@ class Content implements ArrayAccess {
* @param integer $offset Offset
* @return mixed
*/
- public function offsetGet($offset) {
+ public function offsetGet($offset): mixed {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@@ -224,7 +224,7 @@ class Content implements ArrayAccess {
* @param mixed $value Value to be set
* @return void
*/
- public function offsetSet($offset, $value) {
+ public function offsetSet($offset, $value): void {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@@ -237,7 +237,7 @@ class Content implements ArrayAccess {
* @param integer $offset Offset
* @return void
*/
- public function offsetUnset($offset) {
+ public function offsetUnset($offset): void {
unset($this->container[$offset]);
}
diff --git a/src/FacebookAds/Object/ServerSide/CustomData.php b/src/FacebookAds/Object/ServerSide/CustomData.php
index d4c5498..4308e2b 100644
--- a/src/FacebookAds/Object/ServerSide/CustomData.php
+++ b/src/FacebookAds/Object/ServerSide/CustomData.php
@@ -358,7 +358,7 @@ class CustomData implements ArrayAccess {
* @param integer $offset Offset
* @return boolean
*/
- public function offsetExists($offset) {
+ public function offsetExists($offset): bool {
return isset($this->container[$offset]);
}
@@ -367,7 +367,7 @@ class CustomData implements ArrayAccess {
* @param integer $offset Offset
* @return mixed
*/
- public function offsetGet($offset) {
+ public function offsetGet($offset): mixed {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@@ -377,7 +377,7 @@ class CustomData implements ArrayAccess {
* @param mixed $value Value to be set
* @return void
*/
- public function offsetSet($offset, $value) {
+ public function offsetSet($offset, $value): void {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@@ -390,7 +390,7 @@ class CustomData implements ArrayAccess {
* @param integer $offset Offset
* @return void
*/
- public function offsetUnset($offset) {
+ public function offsetUnset($offset): void {
unset($this->container[$offset]);
}
diff --git a/src/FacebookAds/Object/ServerSide/Event.php b/src/FacebookAds/Object/ServerSide/Event.php
index ee22ac5..0a7820c 100644
--- a/src/FacebookAds/Object/ServerSide/Event.php
+++ b/src/FacebookAds/Object/ServerSide/Event.php
@@ -322,7 +322,7 @@ class Event implements ArrayAccess {
* @param integer $offset Offset
* @return boolean
*/
- public function offsetExists($offset) {
+ public function offsetExists($offset): bool {
return isset($this->container[$offset]);
}
@@ -331,7 +331,7 @@ class Event implements ArrayAccess {
* @param integer $offset Offset
* @return mixed
*/
- public function offsetGet($offset) {
+ public function offsetGet($offset): mixed {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@@ -341,7 +341,7 @@ class Event implements ArrayAccess {
* @param mixed $value Value to be set
* @return void
*/
- public function offsetSet($offset, $value) {
+ public function offsetSet($offset, $value): void {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@@ -354,7 +354,7 @@ class Event implements ArrayAccess {
* @param integer $offset Offset
* @return void
*/
- public function offsetUnset($offset) {
+ public function offsetUnset($offset): void {
unset($this->container[$offset]);
}
diff --git a/src/FacebookAds/Object/ServerSide/EventRequest.php b/src/FacebookAds/Object/ServerSide/EventRequest.php
index 3447513..cda3d7d 100644
--- a/src/FacebookAds/Object/ServerSide/EventRequest.php
+++ b/src/FacebookAds/Object/ServerSide/EventRequest.php
@@ -409,7 +409,7 @@ class EventRequest implements ArrayAccess {
* @param integer $offset Offset
* @return boolean
*/
- public function offsetExists($offset) {
+ public function offsetExists($offset): bool {
return isset($this->container[$offset]);
}
@@ -418,7 +418,7 @@ class EventRequest implements ArrayAccess {
* @param integer $offset Offset
* @return mixed
*/
- public function offsetGet($offset) {
+ public function offsetGet($offset): mixed {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@@ -428,7 +428,7 @@ class EventRequest implements ArrayAccess {
* @param mixed $value Value to be set
* @return void
*/
- public function offsetSet($offset, $value) {
+ public function offsetSet($offset, $value): void {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@@ -441,7 +441,7 @@ class EventRequest implements ArrayAccess {
* @param integer $offset Offset
* @return void
*/
- public function offsetUnset($offset) {
+ public function offsetUnset($offset): void {
unset($this->container[$offset]);
}
diff --git a/src/FacebookAds/Object/ServerSide/UserData.php b/src/FacebookAds/Object/ServerSide/UserData.php
index 84a0a69..655459f 100644
--- a/src/FacebookAds/Object/ServerSide/UserData.php
+++ b/src/FacebookAds/Object/ServerSide/UserData.php
@@ -532,7 +532,7 @@ class UserData implements ArrayAccess {
* @param integer $offset Offset
* @return boolean
*/
- public function offsetExists($offset) {
+ public function offsetExists($offset): bool {
return isset($this->container[$offset]);
}
@@ -541,7 +541,7 @@ class UserData implements ArrayAccess {
* @param integer $offset Offset
* @return mixed
*/
- public function offsetGet($offset) {
+ public function offsetGet($offset): mixed {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@@ -551,7 +551,7 @@ class UserData implements ArrayAccess {
* @param mixed $value Value to be set
* @return void
*/
- public function offsetSet($offset, $value) {
+ public function offsetSet($offset, $value): void {
if (is_null($offset)) {
$this->container[] = $value;
} else {
@@ -564,7 +564,7 @@ class UserData implements ArrayAccess {
* @param integer $offset Offset
* @return void
*/
- public function offsetUnset($offset) {
+ public function offsetUnset($offset): void {
unset($this->container[$offset]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment