| @@ -1,4 +1,4 @@ discard block | ||
| 1 | -<?php declare(strict_types=1); | |
| 1 | +<?php declare(strict_types = 1); | |
| 2 | 2 | |
| 3 | 3 | namespace JSKOS; | 
| 4 | 4 | |
| @@ -12,7 +12,7 @@ discard block | ||
| 12 | 12 | class AccessPoint extends Item | 
| 13 | 13 |  { | 
| 14 | 14 | const FIELDS = [ | 
| 15 | - 'set' => ['Set','Concept'], | |
| 15 | + 'set' => ['Set', 'Concept'], | |
| 16 | 16 | 'download' => 'URL', | 
| 17 | 17 | ]; | 
| 18 | 18 | |
| @@ -1,4 +1,4 @@ discard block | ||
| 1 | -<?php declare(strict_types=1); | |
| 1 | +<?php declare(strict_types = 1); | |
| 2 | 2 | |
| 3 | 3 | namespace JSKOS; | 
| 4 | 4 | |
| @@ -27,9 +27,9 @@ discard block | ||
| 27 | 27 | * | 
| 28 | 28 | * @param string $context optional JSON-LD context URL. Use empty string to omit. | 
| 29 | 29 | */ | 
| 30 | - public function jsonLDSerialize(string $context=self::DEFAULT_CONTEXT) | |
| 30 | + public function jsonLDSerialize(string $context = self::DEFAULT_CONTEXT) | |
| 31 | 31 |      { | 
| 32 | - $json = [ ]; | |
| 32 | + $json = []; | |
| 33 | 33 | |
| 34 | 34 |          foreach ($this as $key => $value) { | 
| 35 | 35 |              if (isset($value)) { | 
| @@ -51,7 +51,7 @@ discard block | ||
| 51 | 51 | |
| 52 | 52 |          if ($context) { | 
| 53 | 53 | $json['@context'] = $context; | 
| 54 | - $types = defined(get_called_class().'::TYPES') ? static::TYPES : []; | |
| 54 | + $types = defined(get_called_class() . '::TYPES') ? static::TYPES : []; | |
| 55 | 55 |              if (property_exists($this, 'type') and count($types)) { | 
| 56 | 56 |                  if (isset($json['type'])) { | 
| 57 | 57 |                      if (empty(array_intersect($json['type'], $types))) { | 
| @@ -1,4 +1,4 @@ discard block | ||
| 1 | -<?php declare(strict_types=1); | |
| 1 | +<?php declare(strict_types = 1); | |
| 2 | 2 | |
| 3 | 3 | namespace JSKOS; | 
| 4 | 4 | |
| @@ -15,7 +15,7 @@ discard block | ||
| 15 | 15 | * @param Array|Object fields to copy | 
| 16 | 16 | * @param bool strict throw error on unknown fields | 
| 17 | 17 | */ | 
| 18 | - public function __construct($data=null, bool $strict=false) | |
| 18 | + public function __construct($data = null, bool $strict = false) | |
| 19 | 19 |      { | 
| 20 | 20 |          if (is_array($data) || is_object($data)) { | 
| 21 | 21 |              foreach ($data as $key => $value) { | 
| @@ -1,4 +1,4 @@ discard block | ||
| 1 | -<?php declare(strict_types=1); | |
| 1 | +<?php declare(strict_types = 1); | |
| 2 | 2 | |
| 3 | 3 | namespace JSKOS; | 
| 4 | 4 | |
| @@ -28,7 +28,7 @@ discard block | ||
| 28 | 28 | /** | 
| 29 | 29 | * Return a data structure to serialize this container as JSON. | 
| 30 | 30 | */ | 
| 31 | - public function jsonLDSerialize(string $context=self::DEFAULT_CONTEXT) | |
| 31 | + public function jsonLDSerialize(string $context = self::DEFAULT_CONTEXT) | |
| 32 | 32 |      { | 
| 33 | 33 | $map = new \stdClass(); | 
| 34 | 34 |          foreach ($this->members as $lang => $list) { | 
| @@ -1,4 +1,4 @@ discard block | ||
| 1 | -<?php declare(strict_types=1); | |
| 1 | +<?php declare(strict_types = 1); | |
| 2 | 2 | |
| 3 | 3 | namespace JSKOS; | 
| 4 | 4 | |
| @@ -12,15 +12,15 @@ discard block | ||
| 12 | 12 | class Registry extends Item | 
| 13 | 13 |  { | 
| 14 | 14 | const FIELDS = [ | 
| 15 | - 'concepts' => ['Set','AccessPoint'], | |
| 16 | - 'schemes' => ['Set','AccessPoint'], | |
| 17 | - 'types' => ['Set','AccessPoint'], | |
| 18 | - 'mappings' => ['Set','AccessPoint'], | |
| 19 | - 'registries' => ['Set','AccessPoint'], | |
| 20 | - 'concordances' => ['Set','AccessPoint'], | |
| 15 | + 'concepts' => ['Set', 'AccessPoint'], | |
| 16 | + 'schemes' => ['Set', 'AccessPoint'], | |
| 17 | + 'types' => ['Set', 'AccessPoint'], | |
| 18 | + 'mappings' => ['Set', 'AccessPoint'], | |
| 19 | + 'registries' => ['Set', 'AccessPoint'], | |
| 20 | + 'concordances' => ['Set', 'AccessPoint'], | |
| 21 | 21 | 'extent' => 'string', | 
| 22 | 22 | 'languages' => ['Listing'], | 
| 23 | - 'license' => ['Set','Concept'], | |
| 23 | + 'license' => ['Set', 'Concept'], | |
| 24 | 24 | ]; | 
| 25 | 25 | |
| 26 | 26 | /** | 
| @@ -1,4 +1,4 @@ discard block | ||
| 1 | -<?php declare(strict_types=1); | |
| 1 | +<?php declare(strict_types = 1); | |
| 2 | 2 | |
| 3 | 3 | namespace JSKOS; | 
| 4 | 4 | |
| @@ -14,11 +14,11 @@ discard block | ||
| 14 | 14 | ]; | 
| 15 | 15 | |
| 16 | 16 | const FIELDS = [ | 
| 17 | - 'mappings' => ['Set','AccessPoint'], | |
| 17 | + 'mappings' => ['Set', 'AccessPoint'], | |
| 18 | 18 | 'fromScheme' => 'ConceptScheme', | 
| 19 | 19 | 'toScheme' => 'ConceptScheme', | 
| 20 | 20 | 'extent' => 'string', | 
| 21 | - 'license' => ['Set','Concept'], | |
| 21 | + 'license' => ['Set', 'Concept'], | |
| 22 | 22 | ]; | 
| 23 | 23 | |
| 24 | 24 | /** | 
| @@ -1,4 +1,4 @@ discard block | ||
| 1 | -<?php declare(strict_types=1); | |
| 1 | +<?php declare(strict_types = 1); | |
| 2 | 2 | |
| 3 | 3 | namespace JSKOS; | 
| 4 | 4 | |
| @@ -22,7 +22,7 @@ discard block | ||
| 22 | 22 |          if ($value instanceof Resource) { | 
| 23 | 23 | return $value; | 
| 24 | 24 |          } else { | 
| 25 | - throw new InvalidArgumentException(get_called_class().' may only contain JSKOS Resources'); | |
| 25 | + throw new InvalidArgumentException(get_called_class() . ' may only contain JSKOS Resources'); | |
| 26 | 26 | } | 
| 27 | 27 | } | 
| 28 | 28 | |
| @@ -173,9 +173,9 @@ discard block | ||
| 173 | 173 | /** | 
| 174 | 174 | * Return a data structure to serialize this container as JSON. | 
| 175 | 175 | */ | 
| 176 | - public function jsonLDSerialize(string $context=self::DEFAULT_CONTEXT) | |
| 176 | + public function jsonLDSerialize(string $context = self::DEFAULT_CONTEXT) | |
| 177 | 177 |      { | 
| 178 | -        $set = array_map(function ($m) { | |
| 178 | +        $set = array_map(function($m) { | |
| 179 | 179 |              return is_object($m) ? $m->jsonLDSerialize('') : $m; | 
| 180 | 180 | }, $this->members); | 
| 181 | 181 | |
| @@ -1,4 +1,4 @@ discard block | ||
| 1 | -<?php declare(strict_types=1); | |
| 1 | +<?php declare(strict_types = 1); | |
| 2 | 2 | |
| 3 | 3 | namespace JSKOS; | 
| 4 | 4 | |
| @@ -22,8 +22,8 @@ discard block | ||
| 22 | 22 | 'historyNote' => 'LanguageMapOfLists', | 
| 23 | 23 | 'changeNote' => 'LanguageMapOfLists', | 
| 24 | 24 | 'editorialNote' => 'LanguageMapOfLists', | 
| 25 | - 'subject' => ['Set','Concept'], | |
| 26 | - 'subjectOf' => ['Set','Concept'], | |
| 25 | + 'subject' => ['Set', 'Concept'], | |
| 26 | + 'subjectOf' => ['Set', 'Concept'], | |
| 27 | 27 | 'depiction' => ['Listing'], | 
| 28 | 28 | 'startDate' => 'Date', | 
| 29 | 29 | 'endDate' => 'Date', | 
| @@ -1,4 +1,4 @@ discard block | ||
| 1 | -<?php declare(strict_types=1); | |
| 1 | +<?php declare(strict_types = 1); | |
| 2 | 2 | |
| 3 | 3 | namespace JSKOS; | 
| 4 | 4 | |
| @@ -16,13 +16,13 @@ discard block | ||
| 16 | 16 | ]; | 
| 17 | 17 | |
| 18 | 18 | const FIELDS = [ | 
| 19 | - 'topConcepts' => ['Set','Concept'], | |
| 20 | - 'versionOf' => ['Set','ConceptScheme'], | |
| 21 | - 'concepts' => ['Set','AccessPoint'], | |
| 22 | - 'types' => ['Set','AccessPoint'], | |
| 19 | + 'topConcepts' => ['Set', 'Concept'], | |
| 20 | + 'versionOf' => ['Set', 'ConceptScheme'], | |
| 21 | + 'concepts' => ['Set', 'AccessPoint'], | |
| 22 | + 'types' => ['Set', 'AccessPoint'], | |
| 23 | 23 | 'extent' => 'string', | 
| 24 | 24 | 'languages' => ['Listing'], | 
| 25 | - 'license' => ['Set','Concept'], | |
| 25 | + 'license' => ['Set', 'Concept'], | |
| 26 | 26 | ]; | 
| 27 | 27 | |
| 28 | 28 | /** |