Skip to content

Commit

Permalink
(refactor): only use the prefix 'http://standaarden.overheid.nl/owms/…
Browse files Browse the repository at this point in the history
…terms/' while retrieving the upl resource url but the value is empty
  • Loading branch information
Mike van den Hoek committed Jan 2, 2024
1 parent 5cc5a09 commit 697d420
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## Version 2.1.2

### Refactor

- Only use the prefix 'http://standaarden.overheid.nl/owms/terms/' while retrieving the upl resource url but the value is empty.

## Version 2.1.1

### Refactor
Expand Down
4 changes: 2 additions & 2 deletions pdc-samenwerkende-catalogi.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
<?php declare(strict_types=1);

/**
* Plugin Name: PDC Samenwerkende Catalogi
* Plugin URI: https://www.openwebconcept.nl/
* Description: Plugin to create a XML feed according to the Samenwerkende Catalogi requirements.
* Version: 2.1.1
* Version: 2.1.2
* Author: Yard | Digital Agency
* Author URI: https://www.yard.nl/
* License: GPL-3.0
Expand Down
4 changes: 2 additions & 2 deletions src/SamenwerkendeCatalogi/Foundation/Plugin.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

/**
* The base of the plugin.
Expand Down Expand Up @@ -27,7 +27,7 @@ class Plugin extends BasePlugin
*
* @const string VERSION
*/
public const VERSION = '2.1.1';
public const VERSION = '2.1.2';

protected function checkForUpdate()
{
Expand Down
10 changes: 5 additions & 5 deletions src/SamenwerkendeCatalogi/Models/ScItem.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

namespace OWC\PDC\SamenwerkendeCatalogi\Models;

Expand All @@ -12,9 +12,9 @@ class ScItem extends Item
public function getDoelgroepen(): array
{
$doelgroepTerms = $this->getTerms('pdc-doelgroep');
$doelgroepen = [];
$doelgroepen = [];

if (!is_wp_error($doelgroepTerms) && !empty($doelgroepTerms)) {
if (! is_wp_error($doelgroepTerms) && ! empty($doelgroepTerms)) {
foreach ($doelgroepTerms as $doelgroepTerm) {
$doelgroepen = $this->assignDoelgroepen($doelgroepen, $doelgroepTerm);
}
Expand Down Expand Up @@ -79,10 +79,10 @@ public function getUplResource(): string
$uplResource = get_post_meta($this->getID(), '_owc_pdc_upl_resource', true);

if (empty($uplResource)) {
$uplResource = $this->getStrippedUplName();
$uplResource = sprintf('http://standaarden.overheid.nl/owms/terms/%s', $this->getStrippedUplName());
}

return 'http://standaarden.overheid.nl/owms/terms/' . $uplResource;
return $uplResource;
}

/**
Expand Down

0 comments on commit 697d420

Please sign in to comment.