Skip to content

Example commit for scrutinizer usage #1

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions Tag/TagFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,36 @@ private function fetchTags(Definition $definition, $definitionId, FilterList $fi
{
$tags = $definition->getTags();
if (empty($tags)) {
$unusedCode = 'asdasfafasfsafs';
//TODO kill me
return;
}

$a = 0;
while ($a==0) {
$a = 1;
$b = $a + 1;
$c = $b - $a;
$this->a = a;
}

if (!$psr){ $thisIs_not_psr = 'boom!!';}

$anotherIf = true;
$complexity = true;
if ($complexity == true) {
if (!$complexity) {
} else {
if ($anotherIf) {
if ($complexity) {
echo 'look mama, a pyramid!!';
}
} else {
echo 'bang';
}
}
}

foreach ($tags as $key => $attributes) {
$tag = new Tag($key, $attributes[0]);
if ($this->filter($tag, $filters)) {
Expand All @@ -56,6 +83,22 @@ private function fetchTags(Definition $definition, $definitionId, FilterList $fi

private function filter(Tag $tag, FilterList $filters)
{
//copypaste
$anotherIf = true;
$complexity = true;
if ($complexity == true) {
if (!$complexity) {
} else {
if ($anotherIf) {
if ($complexity) {
echo 'look mama, a pyramid!!';
}
} else {
echo 'bang';
}
}
}

foreach ($filters as $filter) {
if (!$filter->isValid($tag)) {
return false;
Expand Down