Skip to content

Commit

Permalink
Run CS Fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
usernane committed Apr 29, 2023
1 parent 3c01a56 commit 69109f2
Show file tree
Hide file tree
Showing 5 changed files with 206 additions and 202 deletions.
4 changes: 3 additions & 1 deletion example/upload-file.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
Expand All @@ -15,11 +16,12 @@
]);
$files = $u->uploadAsFileObj();
$file = $files[0];

if ($file instanceof UploadedFile) {
if (!$file->isUploaded()) {
http_response_code(404);
echo 'File not uploaded due to error code: '.$file->getUploadError();
} else {
echo 'Successfully uploaded.';
}
}
}
6 changes: 3 additions & 3 deletions php_cs.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ $finder = PhpCsFixer\Finder::create()
->in(__DIR__)
;

return PhpCsFixer\Config::create()
->setRules([
$config = new PhpCsFixer\Config();
return $config->setRules([
'align_multiline_comment' => [
'comment_type' => 'phpdocs_only'
],
Expand Down Expand Up @@ -54,7 +54,7 @@ return PhpCsFixer\Config::create()
'sort_algorithm' => 'alpha'
],
'ordered_class_elements' => [
'sortAlgorithm' => 'alpha',
'sort_algorithm' => 'alpha',
'order' => [
'constant_public',
'constant_protected',
Expand Down
Loading

0 comments on commit 69109f2

Please sign in to comment.