| @@ -7,7 +7,6 @@ | ||
| 7 | 7 | |
| 8 | 8 | namespace CultuurNet\UDB3; | 
| 9 | 9 | |
| 10 | -use Assert\Assertion; | |
| 11 | 10 | use Broadway\Domain\AggregateRoot; | 
| 12 | 11 | use Broadway\Domain\DomainEventStream; | 
| 13 | 12 | |
| @@ -65,7 +65,7 @@ discard block | ||
| 65 | 65 | $dateRange->datefrom = $firstPeriod->datefrom; | 
| 66 | 66 | |
| 67 | 67 | /** @var CultureFeed_Uitpas_Calendar_Period $lastPeriod */ | 
| 68 | - $lastPeriod = end($uitpasCalendar->periods); | |
| 68 | + $lastPeriod = end($uitpasCalendar->periods); | |
| 69 | 69 | $dateRange->dateto = $lastPeriod->dateto; | 
| 70 | 70 |          } elseif (!empty($uitpasCalendar->timestamps)) { | 
| 71 | 71 | /** | 
| @@ -83,7 +83,7 @@ discard block | ||
| 83 | 83 | $dateRange->datefrom = $firstTimestampDate->getTimestamp(); | 
| 84 | 84 | |
| 85 | 85 | /** @var \CultureFeed_Uitpas_Calendar_Timestamp $lastTimestamp */ | 
| 86 | - $lastTimestamp = end($uitpasCalendar->timestamps); | |
| 86 | + $lastTimestamp = end($uitpasCalendar->timestamps); | |
| 87 | 87 | $lastTimestampDate = new \DateTime(); | 
| 88 | 88 | $lastTimestampDate | 
| 89 | 89 | ->setTimestamp($lastTimestamp->date) | 
| @@ -58,11 +58,11 @@ discard block | ||
| 58 | 58 | |
| 59 | 59 | $prefixedTerms = array_filter( | 
| 60 | 60 | $properties, | 
| 61 | -            function ($property) use ($termPrefix) { | |
| 61 | +            function($property) use ($termPrefix) { | |
| 62 | 62 | return strpos($property, $termPrefix) === 0; | 
| 63 | 63 | } | 
| 64 | 64 | ); | 
| 65 | -        $terms = array_map(function ($term) use ($termPrefix) { | |
| 65 | +        $terms = array_map(function($term) use ($termPrefix) { | |
| 66 | 66 | return str_replace($termPrefix, "", $term); | 
| 67 | 67 | }, $prefixedTerms); | 
| 68 | 68 | |
| @@ -86,7 +86,7 @@ discard block | ||
| 86 | 86 |              if (property_exists($eventObject, 'terms') && $includedTerms) { | 
| 87 | 87 | $filteredTerms = array_filter( | 
| 88 | 88 | $eventObject->terms, | 
| 89 | -                    function ($term) use ($includedTerms) { | |
| 89 | +                    function($term) use ($includedTerms) { | |
| 90 | 90 | return in_array($term->domain, $includedTerms); | 
| 91 | 91 | } | 
| 92 | 92 | ); | 
| @@ -33,8 +33,8 @@ | ||
| 33 | 33 | public function equals(Label $label) | 
| 34 | 34 |      { | 
| 35 | 35 | return strcmp( | 
| 36 | - mb_strtolower((string) $this, 'UTF-8'), | |
| 37 | - mb_strtolower((string) $label, 'UTF-8') | |
| 36 | + mb_strtolower((string)$this, 'UTF-8'), | |
| 37 | + mb_strtolower((string)$label, 'UTF-8') | |
| 38 | 38 | ) == 0; | 
| 39 | 39 | } | 
| 40 | 40 | } | 
| @@ -88,7 +88,7 @@ | ||
| 88 | 88 | } | 
| 89 | 89 | |
| 90 | 90 | return parent::serialize() + array( | 
| 91 | - 'title' => (string) $this->getTitle(), | |
| 91 | + 'title' => (string)$this->getTitle(), | |
| 92 | 92 | 'addresses' => $addresses, | 
| 93 | 93 | 'phones' => $this->getPhones(), | 
| 94 | 94 | 'emails' => $this->getEmails(), | 
| @@ -113,7 +113,7 @@ | ||
| 113 | 113 | $theme = $this->getTheme()->serialize(); | 
| 114 | 114 | } | 
| 115 | 115 | return parent::serialize() + array( | 
| 116 | - 'title' => (string) $this->getTitle(), | |
| 116 | + 'title' => (string)$this->getTitle(), | |
| 117 | 117 | 'event_type' => $this->getEventType()->serialize(), | 
| 118 | 118 | 'theme' => $theme, | 
| 119 | 119 | 'address' => $this->getAddress()->serialize(), | 
| @@ -48,7 +48,7 @@ | ||
| 48 | 48 | ]; | 
| 49 | 49 | |
| 50 | 50 |          if ($this->id) { | 
| 51 | - $serializedSavedSearch['id'] = (string) $this->id; | |
| 51 | + $serializedSavedSearch['id'] = (string)$this->id; | |
| 52 | 52 | } | 
| 53 | 53 | |
| 54 | 54 | return $serializedSavedSearch; | 
| @@ -76,7 +76,7 @@ discard block | ||
| 76 | 76 |      { | 
| 77 | 77 | $name = new String($savedSearch->name); | 
| 78 | 78 | $query = QueryString::fromURLQueryString($savedSearch->query); | 
| 79 | - $id = new String((string) $savedSearch->id); | |
| 79 | + $id = new String((string)$savedSearch->id); | |
| 80 | 80 | |
| 81 | 81 | return new SavedSearch($name, $query, $id); | 
| 82 | 82 | } | 
| @@ -86,8 +86,8 @@ discard block | ||
| 86 | 86 | */ | 
| 87 | 87 | public function write(String $userId, String $name, QueryString $queryString) | 
| 88 | 88 |      { | 
| 89 | - $userId = (string) $userId; | |
| 90 | - $name = (string) $name; | |
| 89 | + $userId = (string)$userId; | |
| 90 | + $name = (string)$name; | |
| 91 | 91 | $query = $queryString->toURLQueryString(); | 
| 92 | 92 | |
| 93 | 93 | $savedSearch = new \CultureFeed_SavedSearches_SavedSearch( | 
| @@ -107,7 +107,7 @@ discard block | ||
| 107 | 107 | 'error' => $exception->getMessage(), | 
| 108 | 108 | 'userId' => $userId, | 
| 109 | 109 | 'name' => $name, | 
| 110 | - 'query' => (string) $queryString, | |
| 110 | + 'query' => (string)$queryString, | |
| 111 | 111 | ] | 
| 112 | 112 | ); | 
| 113 | 113 | } | 
| @@ -119,8 +119,8 @@ discard block | ||
| 119 | 119 | */ | 
| 120 | 120 | public function delete(String $userId, String $searchId) | 
| 121 | 121 |      { | 
| 122 | - $userId = (string) $userId; | |
| 123 | - $searchId = (string) $searchId; | |
| 122 | + $userId = (string)$userId; | |
| 123 | + $searchId = (string)$searchId; | |
| 124 | 124 | |
| 125 | 125 |          try { | 
| 126 | 126 | $this->savedSearches->unsubscribe($searchId, $userId); | 
| @@ -96,7 +96,7 @@ | ||
| 96 | 96 | private function getErrorMessages($validationErrors) | 
| 97 | 97 |      { | 
| 98 | 98 | $errorMessages = array_map( | 
| 99 | -            function ($error) { | |
| 99 | +            function($error) { | |
| 100 | 100 | return $error['message']; | 
| 101 | 101 | }, | 
| 102 | 102 | $validationErrors | 
| @@ -9,7 +9,6 @@ | ||
| 9 | 9 | use CultuurNet\UDB3\Variations\Model\Properties\Description; | 
| 10 | 10 | use CultuurNet\UDB3\Variations\Model\Properties\Id; | 
| 11 | 11 | use JsonSchema\Validator; | 
| 12 | -use ValueObjects\String\String; | |
| 13 | 12 | use stdClass; | 
| 14 | 13 | |
| 15 | 14 | class EditDescriptionJSONDeserializer extends JSONDeserializer |