-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code quality/no spaces inside parenthesis #31273
Code quality/no spaces inside parenthesis #31273
Conversation
I put this on top of #31271 as they "sort of go together" but "not really". IMO this seems like "a good thing" to tidy up some other random spaces around the code base. |
Why do I get no codecov reported? |
unset($_SERVER['CONTENT_LENGTH']); | ||
unset($_SERVER['REQUEST_METHOD']); | ||
unset($_SERVER['HTTP_OC_CHUNKED'], $_SERVER['CONTENT_LENGTH'], $_SERVER['REQUEST_METHOD']); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still stupid blank lines ....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHP-CS-Fixer/PHP-CS-Fixer#2804
no_extra_consecutive_blank_lines
looks a good thing to add...
de3b457
to
138aa50
Compare
Now I have 589 files changed. Can we get it over 1000? |
Codecov Report
@@ Coverage Diff @@
## master #31273 +/- ##
============================================
+ Coverage 62.58% 62.59% +<.01%
+ Complexity 18384 18227 -157
============================================
Files 1145 1145
Lines 68411 68414 +3
Branches 1234 1234
============================================
+ Hits 42818 42821 +3
Misses 25232 25232
Partials 361 361
Continue to review full report at Codecov.
|
I lost code coverage by deleting blank lines??? |
core/ajax/share.php
Outdated
&& isset($_GET['checkReshare']) | ||
&& isset($_GET['checkShares'])) { | ||
if (isset($_GET['itemType'], $_GET['itemSource'], $_GET['checkReshare'], $_GET['checkShares']) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost got there - I will fix this manually!
lib/private/Files/Cache/Scanner.php
Outdated
@@ -189,7 +189,7 @@ public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData = | |||
$fileId = $cacheData['fileid']; | |||
$data['fileid'] = $fileId; | |||
// only reuse data if the file hasn't explicitly changed | |||
if (isset($data['storage_mtime']) && isset($cacheData['storage_mtime']) && $data['storage_mtime'] === $cacheData['storage_mtime']) { | |||
if (isset($data['storage_mtime'], $cacheData['storage_mtime']) && $data['storage_mtime'] === $cacheData['storage_mtime']) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here it puts in an extra space char - to fix...
lib/private/Files/Cache/Updater.php
Outdated
@@ -123,7 +123,7 @@ public function update($path, $time = null) { | |||
|
|||
$data = $this->scanner->scan($path, Scanner::SCAN_SHALLOW, -1, false); | |||
if ( | |||
isset($data['oldSize']) && isset($data['size']) && | |||
isset($data['oldSize'], $data['size']) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too much space here
lib/private/NaturalSort.php
Outdated
@@ -110,7 +110,7 @@ public function compare($a, $b) { | |||
$aa = self::naturalSortChunkify($a); | |||
$bb = self::naturalSortChunkify($b); | |||
|
|||
for ($x = 0; isset($aa[$x]) && isset($bb[$x]); $x++) { | |||
for ($x = 0; isset($aa[$x], $bb[$x]) ; $x++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
B\onus space here
@DeepDiver1975 this is ready for review and merge, if you want to take the plunge... |
aeac95b
to
420a868
Compare
Can we reset codecov results ? If not, can we put it into a clean PR so we know what codecov finds issues with |
PR #31306 has a clean cherry-pick of all these commits. Let's see what CI thinks about it. |
The other PR also gets 58.51% of diff hit (target 62.58%). I guess that of the lines touched by this code format change, on average they are only inside test-covered code 58.51% of the time, a bit less than the repo average of 62.58%. I don't think we require to do massive unit test writing in order to implement code-style standards??? |
taking care about rebase |
5a369c0
to
6d992b5
Compare
Are we going to backport these code-style changes? I would like that to happen, to minimize future rubbish conflicts when backporting other PRs. |
yes - we will - but I'd first like to get the style sorted out on master and let devs adopt and see if this all works out |
sounds good. "backporting" in the end will be adding the "final" |
Someone override codecov and merge if you like it. |
Effective backport is included in #31453 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Add
php_cs_fixer
ruleno_spaces_inside_parenthesis
Motivation and Context
combine_consecutive_issets
in #31271 leaves behind white space.How Has This Been Tested?
Run
php_cs_fixer
locallyTypes of changes
Checklist: