src/class-slack-notifier.php
protected function build_attachment_fields( Vulnerabilities $vulnerabilities ) {
		$fields = [];

		foreach ( $vulnerabilities as $vulnerability ) {
			$fixed_in = $vulnerability->fixed_in
				? 'Fixed in v' . $vulnerability->fixed_in
				: 'Not fixed yet';
			$wpvdb_url = "https://wpvulndb.com/vulnerabilities/{$vulnerability->id}";

			$fields[] = [
				'title' => $vulnerability->title,
				'value' => "{$fixed_in} - <{$wpvdb_url}|More info>",
			];
		}

		return $fields;
	}
protected function build_attachment_fields( Vulnerabilities $vulnerabilities ) {
		$fields = [];

		foreach ( $vulnerabilities as $vulnerability ) {
			$fixed_in = $vulnerability->fixed_in
				? 'Fixed in v' . $vulnerability->fixed_in
				: 'Not fixed yet';
			$wpvdb_url = "https://wpvulndb.com/vulnerabilities/{$vulnerability->id}";

			$fields[] = [
				'title' => $vulnerability->title,
				'value' => "{$fixed_in} - <{$wpvdb_url}|More info>",
			];
		}

		return $fields;
	}
protected function build_attachment_fields ( Vulnerabilities $ vulnerabilities ) { $ fields = [ ] ; foreach ( $ vulnerabilities as $ vulnerability ) { $ fixed_in = $ vulnerability -> fixed_in ? 'Fixed in v' . $ vulnerability -> fixed_in : 'Not fixed yet' ; $ wpvdb_url = "https://wpvulndb.com/vulnerabilities/{$vulnerability->id}" ; $ fields [ ] = [ 'title' => $ vulnerability -> title , 'value' => "{$fixed_in} - <{$wpvdb_url}|More info>" , ] ; } return $ fields ; }
Generates the fields array for the message attachment.

@param  Vulnerabilities $vulnerabilities List of vulnerabilities.

@return array
Generates the fields array for the message attachment .