Passed
Push — master ( 9c6499...c22bc5 )
by Jens
04:52 queued 02:21
created

ImageFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A createImageFromPostValues() 0 10 1
1
<?php
2
/**
3
 * Created by jensk on 17-3-2017.
4
 */
5
6
namespace CloudControl\Cms\storage\factories;
7
8
9
class ImageFactory
10
{
11
	/**
12
	 * @param $postValues
13
	 * @param $filename
14
	 * @param $fileNames
15
	 *
16
	 * @return \stdClass
17
	 */
18
	public static function createImageFromPostValues($postValues, $filename, $fileNames)
19
	{
20
		$imageObject = new \stdClass();
21
		$imageObject->file = $filename;
22
		$imageObject->type = $postValues['type'];
23
		$imageObject->size = $postValues['size'];
24
		$imageObject->set = $fileNames;
25
26
		return $imageObject;
27
	}
28
}