Passed
Branch 2.3.0 (833216)
by Lode
02:35
created
src/Document.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		/**
53 53
 		 * encode to json with these default options
54 54
 		 */
55
-		'encodeOptions' => JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE,
55
+		'encodeOptions' => JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE,
56 56
 		
57 57
 		/**
58 58
 		 * encode to human-readable json, useful when debugging
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 * 
99 99
 	 * @throws InputException if the $level is Document::LEVEL_JSONAPI, Document::LEVEL_RESOURCE, or unknown
100 100
 	 */
101
-	public function addLink($key, $href, array $meta=[], $level=Document::LEVEL_ROOT) {
101
+	public function addLink($key, $href, array $meta = [], $level = Document::LEVEL_ROOT) {
102 102
 		if ($level === Document::LEVEL_ROOT) {
103 103
 			$this->linkManagerAddLink($key, $href, $meta);
104 104
 		}
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 * @param array  $meta optional, if given a LinkObject is added, otherwise a link string is added
123 123
 	 * @param string $level one of the Document::LEVEL_* constants, optional, defaults to Document::LEVEL_ROOT
124 124
 	 */
125
-	public function setSelfLink($href, array $meta=[], $level=Document::LEVEL_ROOT) {
125
+	public function setSelfLink($href, array $meta = [], $level = Document::LEVEL_ROOT) {
126 126
 		if ($level === Document::LEVEL_ROOT && ($this->extensions !== [] || $this->profiles !== [])) {
127 127
 			$contentType = Converter::prepareContentType(Document::CONTENT_TYPE_OFFICIAL, $this->extensions, $this->profiles);
128 128
 			
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
 	 * @param string $href
147 147
 	 * @param array  $meta optional, if given a LinkObject is added, otherwise a link string is added
148 148
 	 */
149
-	public function setDescribedByLink($href, array $meta=[]) {
150
-		$this->addLink('describedby', $href, $meta, $level=Document::LEVEL_ROOT);
149
+	public function setDescribedByLink($href, array $meta = []) {
150
+		$this->addLink('describedby', $href, $meta, $level = Document::LEVEL_ROOT);
151 151
 	}
152 152
 	
153 153
 	/**
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	 * @throws InputException if the $level is unknown
159 159
 	 * @throws InputException if the $level is Document::LEVEL_RESOURCE
160 160
 	 */
161
-	public function addMeta($key, $value, $level=Document::LEVEL_ROOT) {
161
+	public function addMeta($key, $value, $level = Document::LEVEL_ROOT) {
162 162
 		if ($level === Document::LEVEL_ROOT) {
163 163
 			if ($this->meta === null) {
164 164
 				$this->setMetaObject(new MetaObject());
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 	/**
289 289
 	 * @inheritDoc
290 290
 	 */
291
-	public function toJson(array $options=[]) {
291
+	public function toJson(array $options = []) {
292 292
 		$options = array_merge(self::$defaults, $options);
293 293
 		
294 294
 		$array = ($options['array'] !== null) ? $options['array'] : $this->toArray();
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 	/**
313 313
 	 * @inheritDoc
314 314
 	 */
315
-	public function sendResponse(array $options=[]) {
315
+	public function sendResponse(array $options = []) {
316 316
 		$options = array_merge(self::$defaults, $options);
317 317
 		
318 318
 		if ($this->httpStatusCode === 204) {
Please login to merge, or discard this patch.