@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $idParentFileDirectory = $fileDirectoryTransfer->getFkParentFileDirectory(); |
72 | 72 | |
73 | 73 | return $this->getTransactionHandler()->handleTransaction( |
74 | - function () use ($idFileDirectory, $idParentFileDirectory) { |
|
74 | + function() use ($idFileDirectory, $idParentFileDirectory) { |
|
75 | 75 | return $this->executeDeleteTransaction($idFileDirectory, $idParentFileDirectory); |
76 | 76 | } |
77 | 77 | ); |
@@ -86,8 +86,7 @@ discard block |
||
86 | 86 | protected function executeDeleteTransaction(int $idFileDirectory, ?int $idParentFileDirectory = null) |
87 | 87 | { |
88 | 88 | $idParentFileDirectory === null ? |
89 | - $this->deleteDirectoryFiles($idFileDirectory) : |
|
90 | - $this->moveDirectoryFiles($idFileDirectory, $idParentFileDirectory); |
|
89 | + $this->deleteDirectoryFiles($idFileDirectory) : $this->moveDirectoryFiles($idFileDirectory, $idParentFileDirectory); |
|
91 | 90 | |
92 | 91 | $fileSystemDeleteDirectoryTransfer = new FileSystemDeleteDirectoryTransfer(); |
93 | 92 | $fileSystemDeleteDirectoryTransfer->setFileSystemName($this->config->getStorageName()); |
@@ -54,7 +54,7 @@ |
||
54 | 54 | */ |
55 | 55 | public function save(FileDirectoryTransfer $fileDirectoryTransfer) |
56 | 56 | { |
57 | - return $this->getTransactionHandler()->handleTransaction(function () use ($fileDirectoryTransfer) { |
|
57 | + return $this->getTransactionHandler()->handleTransaction(function() use ($fileDirectoryTransfer) { |
|
58 | 58 | return $this->executeSaveTransaction($fileDirectoryTransfer); |
59 | 59 | }); |
60 | 60 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | protected function addFileNameField(FormBuilderInterface $builder) |
84 | 84 | { |
85 | 85 | $formData = $builder->getData(); |
86 | - $fileNameCallback = function ($object, ExecutionContextInterface $context) use ($formData) { |
|
86 | + $fileNameCallback = function($object, ExecutionContextInterface $context) use ($formData) { |
|
87 | 87 | if (!empty($formData[static::FIELD_ID_FILE])) { |
88 | 88 | if (empty($formData[static::FILED_FILE_UPLOAD]) && empty($formData[static::FIELD_FILE_NAME])) { |
89 | 89 | $context->addViolation(static::ERROR_FILE_MISSED_EDIT_MESSAGE); |
@@ -142,10 +142,10 @@ discard block |
||
142 | 142 | $builder->get(static::FILED_FILE_UPLOAD) |
143 | 143 | ->addModelTransformer( |
144 | 144 | new CallbackTransformer( |
145 | - function ($data) { |
|
145 | + function($data) { |
|
146 | 146 | return $data; |
147 | 147 | }, |
148 | - function (?UploadedFile $uploadedFile = null) { |
|
148 | + function(?UploadedFile $uploadedFile = null) { |
|
149 | 149 | return $this->mapUploadedFileToTransfer($uploadedFile); |
150 | 150 | } |
151 | 151 | ) |
@@ -102,12 +102,12 @@ |
||
102 | 102 | protected function createDateTimeModelTransformer() |
103 | 103 | { |
104 | 104 | return new CallbackTransformer( |
105 | - function ($value) { |
|
105 | + function($value) { |
|
106 | 106 | if ($value !== null) { |
107 | 107 | return new DateTime($value); |
108 | 108 | } |
109 | 109 | }, |
110 | - function ($value) { |
|
110 | + function($value) { |
|
111 | 111 | return $value; |
112 | 112 | } |
113 | 113 | ); |
@@ -34,8 +34,7 @@ |
||
34 | 34 | |
35 | 35 | $redirectUrl = Url::generate( |
36 | 36 | $request->get(static::FILE_DIRECTORY_ID) ? |
37 | - '/file-manager-gui/directories-tree' : |
|
38 | - '/file-manager-gui' |
|
37 | + '/file-manager-gui/directories-tree' : '/file-manager-gui' |
|
39 | 38 | )->build(); |
40 | 39 | |
41 | 40 | if ($form->isSubmitted()) { |
@@ -137,8 +137,7 @@ discard block |
||
137 | 137 | ->deleteMimeType($mimeTypeTransfer); |
138 | 138 | |
139 | 139 | $mimeTypeResponseTransfer->getIsSuccessful() ? |
140 | - $this->addSuccessMessage(static::MESSAGE_MIME_TYPE_DELETING_SUCCESS) : |
|
141 | - $this->addErrorMessage(static::MESSAGE_MIME_TYPE_DELETING_ERROR); |
|
140 | + $this->addSuccessMessage(static::MESSAGE_MIME_TYPE_DELETING_SUCCESS) : $this->addErrorMessage(static::MESSAGE_MIME_TYPE_DELETING_ERROR); |
|
142 | 141 | |
143 | 142 | return $this->redirectResponse( |
144 | 143 | Url::generate(static::ROUTE_MIME_TYPE_INDEX)->build() |
@@ -159,8 +158,7 @@ discard block |
||
159 | 158 | ); |
160 | 159 | |
161 | 160 | $mimeTypeResponseTransfer->getIsSuccessful() ? |
162 | - $this->addSuccessMessage(static::MESSAGE_MIME_TYPE_SAVING_SUCCESS) : |
|
163 | - $this->addErrorMessage(static::MESSAGE_MIME_TYPE_SAVING_ERROR); |
|
161 | + $this->addSuccessMessage(static::MESSAGE_MIME_TYPE_SAVING_SUCCESS) : $this->addErrorMessage(static::MESSAGE_MIME_TYPE_SAVING_ERROR); |
|
164 | 162 | |
165 | 163 | return $mimeTypeResponseTransfer; |
166 | 164 | } |
@@ -87,7 +87,7 @@ |
||
87 | 87 | protected function prepareDataForExport(array $productsSku): array |
88 | 88 | { |
89 | 89 | return array_map( |
90 | - function ($item) { |
|
90 | + function($item) { |
|
91 | 91 | return [$item]; |
92 | 92 | }, |
93 | 93 | $productsSku |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function getMetadata($filesystemName, $path) |
90 | 90 | { |
91 | - return $this->handleReadOperation(function () use ($filesystemName, $path) { |
|
91 | + return $this->handleReadOperation(function() use ($filesystemName, $path) { |
|
92 | 92 | $metadata = $this->filesystemProvider |
93 | 93 | ->getFilesystemByName($filesystemName) |
94 | 94 | ->getMetadata($path); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function getMimeType($filesystemName, $path) |
121 | 121 | { |
122 | - return $this->handleReadOperation(function () use ($filesystemName, $path) { |
|
122 | + return $this->handleReadOperation(function() use ($filesystemName, $path) { |
|
123 | 123 | return $this->filesystemProvider |
124 | 124 | ->getFilesystemByName($filesystemName) |
125 | 125 | ->getMimetype($path); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | */ |
135 | 135 | public function getVisibility($filesystemName, $path) |
136 | 136 | { |
137 | - return $this->handleReadOperation(function () use ($filesystemName, $path) { |
|
137 | + return $this->handleReadOperation(function() use ($filesystemName, $path) { |
|
138 | 138 | return $this->filesystemProvider |
139 | 139 | ->getFilesystemByName($filesystemName) |
140 | 140 | ->getVisibility($path); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | */ |
150 | 150 | public function getTimestamp($filesystemName, $path) |
151 | 151 | { |
152 | - return $this->handleReadOperation(function () use ($filesystemName, $path) { |
|
152 | + return $this->handleReadOperation(function() use ($filesystemName, $path) { |
|
153 | 153 | $timestamp = $this->filesystemProvider |
154 | 154 | ->getFilesystemByName($filesystemName) |
155 | 155 | ->getTimestamp($path); |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | */ |
167 | 167 | public function getSize($filesystemName, $path) |
168 | 168 | { |
169 | - return $this->handleReadOperation(function () use ($filesystemName, $path) { |
|
169 | + return $this->handleReadOperation(function() use ($filesystemName, $path) { |
|
170 | 170 | return $this->filesystemProvider |
171 | 171 | ->getFilesystemByName($filesystemName) |
172 | 172 | ->getSize($path); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | */ |
182 | 182 | public function read($filesystemName, $path) |
183 | 183 | { |
184 | - return $this->handleReadOperation(function () use ($filesystemName, $path) { |
|
184 | + return $this->handleReadOperation(function() use ($filesystemName, $path) { |
|
185 | 185 | return $this->filesystemProvider |
186 | 186 | ->getFilesystemByName($filesystemName) |
187 | 187 | ->read($path); |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | */ |
198 | 198 | public function listContents($filesystemName, $directory = '', $recursive = false) |
199 | 199 | { |
200 | - return $this->handleReadOperation(function () use ($filesystemName, $directory, $recursive) { |
|
200 | + return $this->handleReadOperation(function() use ($filesystemName, $directory, $recursive) { |
|
201 | 201 | $resourceCollection = $this->filesystemProvider |
202 | 202 | ->getFilesystemByName($filesystemName) |
203 | 203 | ->listContents($directory, $recursive); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $csvFileTransfer->requireData(); |
25 | 25 | |
26 | 26 | $streamedResponse = new StreamedResponse(); |
27 | - $streamedResponse->setCallback(function () use ($csvFileTransfer) { |
|
27 | + $streamedResponse->setCallback(function() use ($csvFileTransfer) { |
|
28 | 28 | $csvHandle = fopen('php://output', 'w+'); |
29 | 29 | if ($csvFileTransfer->getHeader() && is_array($csvFileTransfer->getHeader())) { |
30 | 30 | fputcsv($csvHandle, $csvFileTransfer->getHeader()); |