Code Duplication    Length = 16-16 lines in 2 locations

src/IMAPMessage.php 1 location

@@ 164-179 (lines=16) @@
161
		return '';
162
	}
163
164
	public function parameters() {
165
		if ( empty($this->parameters) ) {
166
			$structure = $this->structure();
167
168
			$this->parameters['bytes'] = @$structure->bytes;
169
170
			foreach ((array) @$structure->parameters as $param) {
171
				$this->parameters[ strtolower($param->attribute) ] = $param->value;
172
			}
173
			foreach ((array) @$structure->dparameters as $param) {
174
				$this->parameters[ strtolower($param->attribute) ] = $param->value;
175
			}
176
		}
177
178
		return $this->parameters;
179
	}
180
181
	public function simpleStructure() {
182
		$parts = [];

src/IMAPMessagePart.php 1 location

@@ 77-92 (lines=16) @@
74
		return $this->structure;
75
	}
76
77
	public function parameters() {
78
		if ( empty($this->parameters) ) {
79
			$structure = $this->structure();
80
81
			$this->parameters['bytes'] = @$structure->bytes;
82
83
			foreach ((array) @$structure->parameters as $param) {
84
				$this->parameters[ strtolower($param->attribute) ] = $param->value;
85
			}
86
			foreach ((array) @$structure->dparameters as $param) {
87
				$this->parameters[ strtolower($param->attribute) ] = $param->value;
88
			}
89
		}
90
91
		return $this->parameters;
92
	}
93
94
	public function parameter( $name ) {
95
		$parameters = $this->parameters();