Skip to content
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

Add --custom-function parameter to check #6

Closed
wants to merge 29 commits into from
Closed

Add --custom-function parameter to check #6

wants to merge 29 commits into from

Conversation

umutphp
Copy link
Contributor

@umutphp umutphp commented Jun 23, 2020

This pull request is the clone of the pull request for the previous repository (JakubOnderka/PHP-Var-Dump-Check).

Closes #5

Copy link
Member

@grogy grogy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! Thank you for your PR. It looks great.

Here are some comments for improve code and repository history.

  1. Can you help with squash commits? We can call together (like whereby.com) and I can show you how do it.
  2. Can you rebase it to current master?
  3. We can add changelog line, it is perfect new feature.

src/Settings.php Outdated
@@ -138,7 +138,7 @@ public static function parseArguments(array $arguments)
$setting->functionsToCheck = array_unique($setting->functionsToCheck);

// Any custom function is given
if (count($customFunctions) > 0) {
if (!empty($customFunctions)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, why here is used empty?

@@ -48,7 +48,7 @@ Options for run
- `--doctrine` - check dump: `Doctrine::dump`, `\Doctrine\Common\Util\Debug::dump`
- `--symfony` - check dump: `dump`, `VarDumper::dump`, `VarDumper::setHandler`
- `--laravel` - check dump: `dd`, `dump`
- `--custom-function` - comma separated custom function name(s) to check like "pre_echo"
- `--custom-function` - comma separated custom function name(s) to check like `pre_echo`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit can be squash with implementation

.gitignore Outdated
@@ -1,3 +1,2 @@
/vendor/
/composer.lock
.idea
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit can be squashed with implementing commit

@@ -0,0 +1,65 @@
<?php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, why isn't this commit included in implementation? I mean that will be better for people who read Git history :)


class CustomFunctionTest extends PHPUnit_Framework_TestCase
{
public function __construct()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty construction we can remove, what do you mean?


}


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about add test for none function founded? (I mean when code does not includes functionName1) It coverage all cases

src/Settings.php Outdated
@@ -70,8 +70,9 @@ class Settings
*/
public static function parseArguments(array $arguments)
{
$arguments = new ArrayIterator(array_slice($arguments, 1));
$setting = new self;
$arguments = new ArrayIterator(array_slice($arguments, 1));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not horizontal align code, it is not used more in the codebase

@umutphp
Copy link
Contributor Author

umutphp commented Aug 14, 2020

Hi @grogy ,

Many thanks for the review and feedbacks. This was a very old PR coming from the old repo :). I will fix the problems and make the PR ready for merge asap.

@umutphp
Copy link
Contributor Author

umutphp commented Aug 14, 2020

I think I need to close this PR and come with a clean PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add --custom-function parameter to check
5 participants