Commit 6eed1556 authored by Michael Iseard's avatar Michael Iseard
Browse files

get_campaign now requires 'value' parameter

parent 5e05f73e
...@@ -565,14 +565,14 @@ class Settings { ...@@ -565,14 +565,14 @@ class Settings {
} }
/** /**
* Gets the campaign by specified column (e.g id). * Gets the campaign by specified column (e.g. id).
* *
* @param string|null $value * @param string|null $value
* *
* @return array|null * @return array|null
* @throws Exception * @throws Exception
*/ */
public static function get_campaign( ?string $value ): ?array { public static function get_campaign( string $value ): ?array {
$campaigns = self::get_setting( 'campaigns' ); $campaigns = self::get_setting( 'campaigns' );
$key = array_search( $value, array_column( (array) $campaigns, 'id' ) ); $key = array_search( $value, array_column( (array) $campaigns, 'id' ) );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment