aws-samples / php-examples-for-aws-lambda
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 48% duplication:
    • 711 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 348 duplicated lines
  • 44 duplicates
system48% (348 lines)
Duplication per Extension
yaml47% (141 lines)
php52% (117 lines)
yml50% (70 lines)
css40% (20 lines)
Duplication per Component (primary)
0.6-MVC-to-microservice/src73% (110 lines)
0.6-MVC-to-microservice50% (70 lines)
0.4-Building-A-Serverless-Laravel-App-With-AWS-SAM55% (65 lines)
0.3-Replacing-The-HTTP-Web-Server-For-Traditional-PHP-Frameworks50% (65 lines)
0.3-Replacing-The-HTTP-Web-Server-For-Traditional-PHP-Frameworks/assets40% (20 lines)
0.7-PHP-Lambda-functions-with-Docker-container-images28% (11 lines)
0.1-SimplePhpFunction/src70% (7 lines)
0.2-Relational-Database-RDS-Proxy-Example0% (0 lines)
0.2-Relational-Database-RDS-Proxy-Example/src0% (0 lines)
0.7-PHP-Lambda-functions-with-Docker-container-images/src0% (0 lines)
0.1-SimplePhpFunction0% (0 lines)

Duplication Between Components (50+ lines)

G 0.3-Replacing-The-HTTP-Web-Server-For-Traditional-PHP-Frameworks 0.3-Replacing-The-HTTP-Web-Server-For-Traditional-PHP-Frameworks 0.4-Building-A-Serverless-Laravel-App-With-AWS-SAM 0.4-Building-A-Serverless-Laravel-App-With-AWS-SAM 0.3-Replacing-The-HTTP-Web-Server-For-Traditional-PHP-Frameworks--0.4-Building-A-Serverless-Laravel-App-With-AWS-SAM 130

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 44 duplicates...
Size#FoldersFilesLinesCode
20 x 2 0.3-Replacing-The-HTTP-W...ditional-PHP-Frameworks
0.4-Building-A-Serverless-Laravel-App-With-AWS-SAM
template.yaml
template.yaml
21:40 (18%)
31:50 (17%)
view
19 x 2 0.3-Replacing-The-HTTP-W...ditional-PHP-Frameworks
0.4-Building-A-Serverless-Laravel-App-With-AWS-SAM
template.yaml
template.yaml
87:107 (17%)
105:125 (16%)
view
19 x 2 0.3-Replacing-The-HTTP-W...ditional-PHP-Frameworks
0.4-Building-A-Serverless-Laravel-App-With-AWS-SAM
template.yaml
template.yaml
56:77 (17%)
75:96 (16%)
view
16 x 2 0.6-MVC-to-microservice/...andlers/delete-item/src
0.6-MVC-to-microservice/src/handlers/get-by-id/src
index.php
index.php
2:38 (57%)
1:19 (57%)
view
15 x 2 0.6-MVC-to-microservice/...andlers/delete-item/src
0.6-MVC-to-microservice/...andlers/update-item/src
index.php
index.php
2:36 (53%)
2:36 (41%)
view
15 x 2 0.6-MVC-to-microservice/src/handlers/get-by-id/src
0.6-MVC-to-microservice/...andlers/update-item/src
index.php
index.php
1:17 (53%)
2:36 (41%)
view
14 x 2 0.6-MVC-to-microservice
0.6-MVC-to-microservice
template.yml
template.yml
31:46 (10%)
91:106 (10%)
view
14 x 2 0.6-MVC-to-microservice
0.6-MVC-to-microservice
template.yml
template.yml
61:76 (10%)
151:166 (10%)
view
14 x 2 0.6-MVC-to-microservice
0.6-MVC-to-microservice
template.yml
template.yml
61:76 (10%)
121:136 (10%)
view
14 x 2 0.6-MVC-to-microservice
0.6-MVC-to-microservice
template.yml
template.yml
121:136 (10%)
151:166 (10%)
view
13 x 2 0.6-MVC-to-microservice
0.6-MVC-to-microservice
template.yml
template.yml
31:45 (9%)
151:165 (9%)
view
13 x 2 0.6-MVC-to-microservice
0.6-MVC-to-microservice
template.yml
template.yml
31:45 (9%)
121:135 (9%)
view
13 x 2 0.6-MVC-to-microservice
0.6-MVC-to-microservice
template.yml
template.yml
61:75 (9%)
91:105 (9%)
view
13 x 2 0.6-MVC-to-microservice
0.6-MVC-to-microservice
template.yml
template.yml
91:105 (9%)
151:165 (9%)
view
13 x 2 0.6-MVC-to-microservice
0.6-MVC-to-microservice
template.yml
template.yml
91:105 (9%)
121:135 (9%)
view
13 x 2 0.6-MVC-to-microservice
0.6-MVC-to-microservice
template.yml
template.yml
31:45 (9%)
61:75 (9%)
view
11 x 2 0.3-Replacing-The-HTTP-W...ditional-PHP-Frameworks
0.7-PHP-Lambda-functions...Docker-container-images
template.yaml
template.yaml
56:66 (10%)
18:28 (28%)
view
11 x 2 0.4-Building-A-Serverless-Laravel-App-With-AWS-SAM
0.7-PHP-Lambda-functions...Docker-container-images
template.yaml
template.yaml
75:85 (9%)
18:28 (28%)
view
9 x 2 0.6-MVC-to-microservice/...dlers/get-all-items/src
0.6-MVC-to-microservice/src/handlers/put-item/src
index.php
index.php
1:27 (36%)
2:30 (28%)
view
9 x 2 0.6-MVC-to-microservice/...dlers/get-all-items/src
0.6-MVC-to-microservice/...andlers/update-item/src
index.php
index.php
1:27 (36%)
2:30 (25%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
8 x 6 0.6-MVC-to-microservice/...andlers/update-item/src
0.6-MVC-to-microservice/src/handlers/get-by-id/src
0.6-MVC-to-microservice/...dlers/get-all-items/src
0.6-MVC-to-microservice/...andlers/delete-item/src
0.6-MVC-to-microservice/src/handlers/put-item/src
0.1-SimplePhpFunction/src
index.php
index.php
index.php
index.php
index.php
index.php
55:63 
29:37 
42:50 
48:56 
52:60 
23:31 
view