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

Commit

Permalink
feature: create examples. Create gitattributes
Browse files Browse the repository at this point in the history
  • Loading branch information
funivan committed Jan 17, 2014
1 parent 746750c commit d83bcf6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.gitattributes export-ignore
.gitignore export-ignore
composer.json export-ignore
composer.lock export-ignore
.travis.yml export-ignore
examples/ export-ignore
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Flexible library for parsing and modify php code;


##Install:
`composer require fiv/tokenizer:dev-master`
`composer require fiv/tokenizer:*`

##Use
For example lets find all if and elseif conditions:
Expand Down
10 changes: 8 additions & 2 deletions test.php → examples/ParseIfConditions.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<?php


require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/../vendor/autoload.php';
/*
Lets detect next conditions:
1. if (true)
2. if (!empty($test) && isset($test))
3. elseif (is_array(array(isset($a))))
*/

$fileTokens = new Fiv\Tokenizer\File(__FILE__);
$query = $fileTokens->getCollection()->extendedQuery();
Expand Down

0 comments on commit d83bcf6

Please sign in to comment.