Skip to content

Commit f285389

Browse files
author
DKravtsov
committedMay 25, 2025·
Improved html report and DataTables buttons, updated bootstrap and DataTables to the latest version.
1 parent 69eac89 commit f285389

File tree

14 files changed

+182
-95
lines changed

14 files changed

+182
-95
lines changed
 

‎ChangeLog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes in PHPCPD are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
44

5+
## [8.2.3] - 2025-05-25
6+
7+
### Updated
8+
9+
* Improved html report and DataTables buttons, updated bootstrap and DataTables to the latest version.
10+
511
## [8.2.2] - 2025-05-18
612

713
### Updated

‎build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project name="phpcpd" default="setup">
33
<property name="basedir" value="." override="false"/>
4-
<property name="version" value="8.2.2" override="false"/>
4+
<property name="version" value="8.2.3" override="false"/>
55
<target name="setup" depends="clean,install-dependencies"/>
66

77
<target name="clean" description="Cleanup build artifacts">

‎composer.lock

Lines changed: 16 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/images/report_example_01.png

-1.56 KB
Loading

‎docs/report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This format uses `xml` to output the duplications in a more structured format. T
3636
Report file example:
3737
```
3838
<?xml version="1.0" encoding="UTF-8"?>
39-
<pmd-cpd xmlns="https://systemsdk.github.io/phpcpd/report" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" phpcpdVersion="8.2.1" timestamp="2025-04-29T17:39:52+00:00" version="1.0.0" xsi:schemaLocation="https://systemsdk.github.io/phpcpd/report https://systemsdk.github.io/phpcpd/report/phpcpd-report-v1_0_0.xsd">
39+
<pmd-cpd xmlns="https://systemsdk.github.io/phpcpd/report" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" phpcpdVersion="8.2.3" timestamp="2025-05-25T16:09:03+00:00" version="1.0.0" xsi:schemaLocation="https://systemsdk.github.io/phpcpd/report https://systemsdk.github.io/phpcpd/report/phpcpd-report-v1_0_0.xsd">
4040
<duplication lines="59" tokens="136">
4141
<file line="116" endline="175" path="/var/www/html/tests/Fixture/Math.php"/>
4242
<file line="217" endline="276" path="/var/www/html/tests/Fixture/Math.php"/>

‎readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Note: This tool is distributed as a [PHP Archive (PHAR)](https://php.net/phar).
2929
## Usage example
3030
```
3131
$ php ./vendor/bin/phpcpd --fuzzy --verbose src tests
32-
Copy/Paste Detector 8.2.2
32+
Copy/Paste Detector 8.2.3
3333
14/14 [==============================>] 100% Loading & Processing
3434
Found 1 code clones with 17 duplicated lines in 1 files:
3535

‎releases/phpcpd-8.2.3.phar

136 KB
Binary file not shown.

‎releases/phpcpd-latest.phar

0 Bytes
Binary file not shown.

‎report/phpcpd-html-v1_0_0.xslt

Lines changed: 55 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,23 @@
88

99
<!-- Dependencies:
1010
https://getbootstrap.com/docs/5.3/getting-started/download/
11-
https://datatables.net/download/ (Styling Bootstrap5 + DataTables + Buttons + Column Visibility + HTML5 Export + JSZip + pdfmake + Print view
12-
https://releases.jquery.com/
11+
https://datatables.net/download/ (Styling Bootstrap5 + jQuery + DataTables + Buttons + Column Visibility + HTML5 Export + JSZip + pdfmake + Print view
1312
-->
1413

15-
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous"/>
16-
<script src="https://code.jquery.com/jquery-3.7.0.min.js" integrity="sha256-2Pmvv0kuTBOenSvLm6bvfBSSHrUJ+3A7x6P5Ebd07/g=" crossorigin="anonymous"/>
17-
<link href="https://cdn.datatables.net/v/bs5/jszip-2.5.0/dt-1.13.4/b-2.3.6/b-html5-2.3.6/b-print-2.3.6/datatables.min.css" rel="stylesheet"/>
18-
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"/>
19-
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"/>
20-
<script src="https://cdn.datatables.net/v/bs5/jszip-2.5.0/dt-1.13.4/b-2.3.6/b-html5-2.3.6/b-print-2.3.6/datatables.min.js"/>
14+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4Q6Gf2aSP4eDXB8Miphtr37CMZZQ5oXLH2yaXMJ2w8e2ZtHTl7GptT4jmndRuHDT" crossorigin="anonymous"/>
15+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/js/bootstrap.bundle.min.js" integrity="sha384-j1CDi7MgGQ12Z7Qab0qlWQ/Qqz24Gc6BM0thvEMVjHnfYGF0rmFCozFSxQBxwHKO" crossorigin="anonymous"/>
16+
<link href="https://cdn.datatables.net/v/bs5/jq-3.7.0/jszip-3.10.1/dt-2.3.1/b-3.2.3/b-colvis-3.2.3/b-html5-3.2.3/b-print-3.2.3/datatables.min.css" rel="stylesheet" integrity="sha384-ffA5YILdZwUQB7+HlHwFucF4hce41j8Tt6mvi1e0CLeZ0d9LqFUQJDx5vtwqZKah" crossorigin="anonymous"/>
17+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js" integrity="sha384-VFQrHzqBh5qiJIU0uGU5CIW3+OWpdGGJM9LBnGbuIH2mkICcFZ7lPd/AAtI7SNf7" crossorigin="anonymous"/>
18+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js" integrity="sha384-/RlQG9uf0M2vcTw3CX7fbqgbj/h8wKxw7C3zu9/GxcBPRKOEcESxaxufwRXqzq6n" crossorigin="anonymous"/>
19+
<script src="https://cdn.datatables.net/v/bs5/jq-3.7.0/jszip-3.10.1/dt-2.3.1/b-3.2.3/b-colvis-3.2.3/b-html5-3.2.3/b-print-3.2.3/datatables.min.js" integrity="sha384-C5Q/xdoW8seeaT5jRMV9lAiJQNoGaRaJkyJ/A7lEdXF4pYx8lQjdNBXQ/KlbQA83" crossorigin="anonymous"/>
2120
<title>PHPCPD Report</title>
2221
<link rel="icon" href="https://systemsdk.github.io/images/favicon.ico" sizes="32x32" />
2322

2423
</head>
25-
<body style="padding-top: 3.5rem;">
24+
<body style="padding-top: 4.5rem;">
2625
<nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark">
27-
<a class="navbar-brand" href="#"></a>
28-
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
29-
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
26+
<a class="navbar-brand" href="#"><img alt="Logo" src="https://systemsdk.github.io/images/logo-white-small.png"/></a>
27+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
3028
<span class="navbar-toggler-icon"></span>
3129
</button>
3230
<div class="collapse navbar-collapse" id="navbarNav">
@@ -45,7 +43,6 @@
4543
</li>
4644
</ul>
4745
</div>
48-
<img alt="Logo" src="https://systemsdk.github.io/images/logo-white-small.png" style="border-right: 20px solid;"/>
4946
</nav>
5047

5148
<div class="container">
@@ -105,20 +102,57 @@
105102
$("#nav_enable_datatable").hide();
106103
$(document).ready( function () {
107104
$('#data_table').DataTable({
108-
dom: "&lt;'row'&lt;'col-sm-12 col-md-4'B>&lt;'col-sm-12 col-md-4'l>&lt;'col-sm-12 col-md-4'f>>" +
109-
"&lt;'row'&lt;'col-sm-12'tr>>" +
110-
"&lt;'row'&lt;'col-sm-12 col-md-5'i>&lt;'col-sm-12 col-md-7'p>>",
105+
layout: {
106+
topStart: ['buttons', 'pageLength']
107+
},
111108
buttons: [
112-
'copy', 'csv', 'excel', 'pdf', 'print'
109+
{
110+
extend: 'copy',
111+
text: ' Copy',
112+
exportOptions: {
113+
trim: false,
114+
stripNewlines: false
115+
}
116+
},
117+
{
118+
extend: 'csv',
119+
text: ' CSV',
120+
exportOptions: {
121+
trim: false,
122+
stripNewlines: false
123+
}
124+
},
125+
{
126+
extend: 'excel',
127+
text: ' Excel',
128+
exportOptions: {
129+
trim: false,
130+
stripNewlines: false
131+
}
132+
},
133+
{
134+
extend: 'pdf',
135+
text: ' PDF',
136+
exportOptions: {
137+
trim: false,
138+
stripNewlines: false
139+
}
140+
},
141+
{
142+
extend: 'print',
143+
text: 'Print',
144+
exportOptions: {
145+
stripHtml: false,
146+
stripNewlines: false
147+
}
148+
}
113149
]
114-
}
115-
);
116-
} );
150+
});
151+
});
117152
} else {
118153
$("#nav_disable_datatable").hide();
119154
$("#nav_enable_datatable").show();
120155
}
121-
122156
</script>
123157

124158
</body>

‎src/Cli/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
final class Application
3030
{
31-
public const string VERSION = '8.2.2';
31+
public const string VERSION = '8.2.3';
3232

3333
/**
3434
* @param array<int, string> $argv

‎tools/01_phpunit/composer.lock

Lines changed: 48 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tools/02_phpstan/composer.lock

Lines changed: 21 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tools/03_ecs/composer.lock

Lines changed: 16 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tools/04_php-coveralls/composer.lock

Lines changed: 16 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.