Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

Display filename for each file processed #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mplattu
Copy link

@mplattu mplattu commented Feb 3, 2018

Useful if you are recursively checking your files e.g.

php ../PHP-Analyser/php-analyser.php --filename --detect-all `find path/to/source/ | grep -P "\.php$"`

@Dgame Dgame self-requested a review May 21, 2018 11:59
@@ -43,6 +43,10 @@ public function parse(string $filename, $options = 0)
$tokenizer = new Tokenizer($filename);
$cursor = new Cursor($tokenizer->getTokens());

if ($options & Options::Filename) {
print "==$filename\n";
Copy link
Owner

Choose a reason for hiding this comment

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

Indentation is wrong

@@ -26,9 +26,24 @@
'$_' => true, // for valid unused variables
];

private static $Exceptions_Regexp = [
Copy link
Owner

Choose a reason for hiding this comment

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

const

{
foreach (array_keys(self::$Exceptions_Regexp) as $this_re) {
if (preg_match($this_re, $id)) {
return true;
Copy link
Owner

Choose a reason for hiding this comment

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

indentation

public static function Approve(string $id)
{
return !array_key_exists($id, self::$Exceptions);
return !(self::ApproveRe($id) or array_key_exists($id, self::$Exceptions));
Copy link
Owner

Choose a reason for hiding this comment

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

or should be ||

Copy link
Owner

@Dgame Dgame left a comment

Choose a reason for hiding this comment

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

Just a few stylé-changes and it's good to go.

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

Successfully merging this pull request may close these issues.

None yet

2 participants