forked from moodlehq/moodle-plugin-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust filter plugin requirements to comply with 4.5.
- Loading branch information
Showing
7 changed files
with
128 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Moodle Plugin CI package. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* Copyright (c) 2018 Blackboard Inc. (http://www.blackboard.com) | ||
* License http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace MoodlePluginCI\PluginValidate\Finder; | ||
|
||
use PhpParser\Node\Name; | ||
|
||
/** | ||
* Finds function call. | ||
*/ | ||
class FunctionCallFinder extends AbstractParserFinder | ||
{ | ||
public function getType(): string | ||
{ | ||
return 'function call'; | ||
} | ||
|
||
public function findTokens($file, FileTokens $fileTokens): void | ||
{ | ||
$statements = $this->parser->parseFile($file); | ||
|
||
foreach ($this->filter->filterFunctionCalls($statements) as $funccall) { | ||
if ($funccall->name instanceof Name) { | ||
$fileTokens->compare((string) $funccall->name); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters