Skip to content

Commit 394ceca

Browse files
committed
first commit
0 parents  commit 394ceca

9 files changed

+705
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
vendor
2+
temp
3+
composer.lock
4+
.DS_STORE

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Sohel Amin
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# PHPCloc
2+
Cloc & Code duplication checker written in PHP
3+
4+
## Requirements
5+
PHP >= 5.4
6+
7+
## Installation
8+
```
9+
$ composer global require appzcoder/phpcloc
10+
```
11+
12+
## Usage
13+
Cloc
14+
```
15+
$ phpcloc cloc .
16+
```
17+
18+
Dublicate code checker
19+
```
20+
$ phpcloc duplicate . --ext=php
21+
```
22+
23+
## Author
24+
25+
[Sohel Amin](http://sohelamin.com)
26+
27+
## License
28+
29+
This project is licensed under the MIT License - see the [License File](LICENSE) for details

composer.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "appzcoder/phpcloc",
3+
"authors": [
4+
{
5+
"name": "Sohel Amin",
6+
"email": "[email protected]"
7+
}
8+
],
9+
"require": {
10+
"symfony/console": "^4.0"
11+
},
12+
"autoload": {
13+
"psr-4": {
14+
"Appzcoder\\PHPCloc\\": "src/"
15+
}
16+
}
17+
}

phpcloc

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env php
2+
<?php
3+
require __DIR__.'/vendor/autoload.php';
4+
5+
use Appzcoder\PHPCloc\Commands\ClocCommand;
6+
use Appzcoder\PHPCloc\Commands\DuplicateCommand;
7+
use Symfony\Component\Console\Application as BaseApplication;
8+
9+
final class Application extends BaseApplication
10+
{
11+
/**
12+
* {@inheritdoc}
13+
*/
14+
public function getLongVersion()
15+
{
16+
return 'PHPCloc by <comment>Sohel Amin <https://github.com/sohelamin></comment>';
17+
}
18+
}
19+
20+
$application = new Application();
21+
22+
$application->add(new ClocCommand());
23+
$application->add(new DuplicateCommand());
24+
25+
$application->run();

0 commit comments

Comments
 (0)