Skip to content

Generates a browsable representation of PHP code where sections with violations found by quality assurance tools such as PHP_CodeSniffer or PHPMD are highlighted.

License

Notifications You must be signed in to change notification settings

mayflower/PHP_CodeBrowser

This branch is 495 commits ahead of elger/PHP_CodeBrowser:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0835029 · Mar 19, 2024
Jan 30, 2023
Mar 19, 2024
Mar 11, 2024
Jan 30, 2023
Jan 2, 2014
Jan 9, 2014
Jan 2, 2014
Dec 7, 2017
Mar 19, 2024
Jan 2, 2014
Apr 18, 2023
Oct 24, 2018
Jan 30, 2023
Jan 30, 2023
Mar 11, 2024
Jun 15, 2021

Repository files navigation

PHP_CodeBrowser

Latest Stable Version Build Status Scrutinizer Quality Score Code Coverage SensioLabsInsight

Structure

|--> bin/           PHP_CodeBrowser scripts
|--> src/           Source files for PHP_CodeBrowser
|   |--> Plugins/   Plugins for different error handling/types
|
|--> templates/     Template files for PHP_CodeBrowser
|   |--> css/       Used CSS by templates, Color definition for errors
|   |--> img/       Used images for PHP_CodeBrowser
|   |--> js/        Used javascript for PHP_CodeBrowser
|
|--> tests/         PHPUnit test suite
|
|--> package.xml    PEAR package information file
|
|--> LICENCE        Licence information
|--> README         Structure and install information
|--> CHANGELOG      Update information

Installation

Git Checkout

$ git clone git://github.com/Mayflower/PHP_CodeBrowser.git

Installation via Composer

Add this line to the require section in composer.json:

"mayflower/php-codebrowser": "~1.1"

Or to install it globally

composer global require "mayflower/php-codebrowser=~1.1"

Get PHAR

see Releases

Usage

Shell Usage

Try ./bin/phpcb.php -h for usage information.

Integration in Jenkins, CruiseControl and Hudson

...
<!-- phpcb should be called after xml file generation -->
<target name="build" depends="...,phpcb" />
...
<target name="phpcb">
    <exec executable="phpcb">
        <arg line="--log path/to/log/dir
                   --output path/to/output/dir/
                   --source path/to/source/dir/" />
    </exec>
</target>
...

View the Results

Webbrowser

Open /path/to/defined/output/index.html.

CruiseControl

config.xml

<publishers>
  <artifactspublisher dir="path/to/output" dest="artifacts/${project.name}" subdirectory="PhpCbIdentifier" />
  ...
</publishers>

main.jsp

<cruisecontrol:tab name="PHP_CodeBrowser" label="PHP_CodeBrowser">
  <cruisecontrol:artifactsLink>
     <iframe src="<%=request.getContextPath() %>/<%= artifacts_url %>/PhpCbIdentifier/index.html" class="tab-content">
     </iframe>
  </cruisecontrol:artifactsLink>
</cruisecontrol:tab>

Jenkins/Hudson

Have a look at the standard template for Jenkins jobs for PHP projects to see how PHP_CodeBrowser can be used together with Jenkins.

Contact Information

If you have any questions you may get in contact with: Elger Thiele or Thorsten Rinne

About

Generates a browsable representation of PHP code where sections with violations found by quality assurance tools such as PHP_CodeSniffer or PHPMD are highlighted.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 50.5%
  • JavaScript 41.3%
  • CSS 5.1%
  • Smarty 2.5%
  • Batchfile 0.6%