@@ -59,12 +59,12 @@ discard block |
||
59 | 59 | { |
60 | 60 | parent::__construct($status); |
61 | 61 | |
62 | - $constant = 'self::' . strtoupper(str_replace(' ', '_', $status)); |
|
62 | + $constant = 'self::'.strtoupper(str_replace(' ', '_', $status)); |
|
63 | 63 | if (!defined($constant)) { |
64 | - throw new \DomainException('Unknown status: ' . $status); |
|
64 | + throw new \DomainException('Unknown status: '.$status); |
|
65 | 65 | } |
66 | - $this->name=constant($constant); |
|
67 | - $this->order=$this->getOrder(); |
|
66 | + $this->name = constant($constant); |
|
67 | + $this->order = $this->getOrder(); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function getName() |
76 | 76 | { |
77 | - return isset($this->name)?$this->name:''; |
|
77 | + return isset($this->name) ? $this->name : ''; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function __construct($basePath = '') |
51 | 51 | { |
52 | - $this->basePath = rtrim($basePath, '/') . '/'; |
|
52 | + $this->basePath = rtrim($basePath, '/').'/'; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | public function __invoke($name, array $params = []) |
65 | 65 | { |
66 | 66 | if (is_array($name)) { |
67 | - if (!isset($name[ 'ajax' ])) { |
|
67 | + if (!isset($name['ajax'])) { |
|
68 | 68 | throw new \InvalidArgumentException('Key "ajax" is required when passing array as first argument.'); |
69 | 69 | } |
70 | 70 | $params = $name; |
@@ -58,7 +58,7 @@ |
||
58 | 58 | $states = static::getStates(); |
59 | 59 | |
60 | 60 | if (!in_array($state, $states)) { |
61 | - throw new \InvalidArgumentException('Invalid state name: ' . $state); |
|
61 | + throw new \InvalidArgumentException('Invalid state name: '.$state); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | $this->state = $state; |
@@ -59,7 +59,7 @@ |
||
59 | 59 | * @param array $images |
60 | 60 | * @param PermissionsInterface $permissions |
61 | 61 | * |
62 | - * @return mixed |
|
62 | + * @return ImageSet |
|
63 | 63 | */ |
64 | 64 | public function setImages(array $images, PermissionsInterface $permissions = null); |
65 | 65 |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $imageSpecs = $this->options->getImages(); |
87 | 87 | |
88 | 88 | |
89 | - $images = [ ImageSetInterface::ORIGINAL => $this->createEntity($file, $data) ]; |
|
89 | + $images = [ImageSetInterface::ORIGINAL => $this->createEntity($file, $data)]; |
|
90 | 90 | |
91 | 91 | foreach ($imageSpecs as $key => $size) { |
92 | 92 | $newImage = ImageSetInterface::THUMBNAIL == $key |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | : $this->createImage($image, $size); |
95 | 95 | |
96 | 96 | if ($newImage) { |
97 | - $entity = $this->createEntity($newImage, $data, $key); |
|
97 | + $entity = $this->createEntity($newImage, $data, $key); |
|
98 | 98 | $images[$key] = $entity; |
99 | 99 | } |
100 | 100 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | $entity |
144 | 144 | ->setFile($file) |
145 | - ->setName(($prefix ? "$prefix-" : '') . $data['name']) |
|
145 | + ->setName(($prefix ? "$prefix-" : '').$data['name']) |
|
146 | 146 | ->setType($data['type']) |
147 | 147 | ; |
148 | 148 |
@@ -43,7 +43,7 @@ |
||
43 | 43 | * @var array |
44 | 44 | */ |
45 | 45 | protected $images = [ |
46 | - ImageSetInterface::THUMBNAIL => [100,100], |
|
46 | + ImageSetInterface::THUMBNAIL => [100, 100], |
|
47 | 47 | ]; |
48 | 48 | |
49 | 49 | /** |
@@ -46,7 +46,7 @@ |
||
46 | 46 | case ImagineOptions::LIB_GD: |
47 | 47 | case ImagineOptions::LIB_IMAGICK: |
48 | 48 | case ImagineOptions::LIB_GMAGICK: |
49 | - $imagineClass = '\Imagine\\' . $lib . '\Imagine'; |
|
49 | + $imagineClass = '\Imagine\\'.$lib.'\Imagine'; |
|
50 | 50 | $imagine = new $imagineClass; |
51 | 51 | break; |
52 | 52 | } |
@@ -46,7 +46,6 @@ |
||
46 | 46 | * Converts the given value so that it can be hydrated by the hydrator. |
47 | 47 | * |
48 | 48 | * @param mixed $value The original value. |
49 | - * @param array $data (optional) The original data for context. |
|
50 | 49 | * |
51 | 50 | * @return mixed Returns the value that should be hydrated. |
52 | 51 | */ |
@@ -33,7 +33,7 @@ |
||
33 | 33 | * |
34 | 34 | * @var array |
35 | 35 | */ |
36 | - protected $headscripts = [ 'Jobs/js/forms.manager-select.js' ]; |
|
36 | + protected $headscripts = ['Jobs/js/forms.manager-select.js']; |
|
37 | 37 | |
38 | 38 | public function setHeadscripts(array $scripts) |
39 | 39 | { |