<commit_before><?php

namespace phpSmug\Tests;

/**
 * @class
 * Test properties of our codebase rather than the actual code.
 */
class PsrComplianceTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function testPSR()
    {
        // If we can't find the command-line tool, we mark the test as skipped
        // so it shows as a warning to the developer rather than passing silently.
        if (!file_exists('vendor/bin/php-cs-fixer')) {
            $this->markTestSkipped(
                'Needs linter to check PSR compliance'
            );
        }

        // Let's check all PSR compliance for our code and tests.
        // Add any other pass you want to test to this array.
        /*foreach (array('lib/', 'examples/', 'test/') as $path) {
            // Run linter in dry-run mode so it changes nothing.
            exec(
                escapeshellcmd('vendor/bin/php-cs-fixer fix --diff -v --dry-run '.$_SERVER['PWD']."/$path"),
                $output,
                $return_var
            );

            // If we've got output, pop its first item ("Fixed all files...")
            // shift off the last two lines, and trim whitespace from the rest.
            if ($output) {
                array_pop($output);
                array_shift($output);
                array_shift($output);
                $output = array_map('trim', $output);
            }

            // Check shell return code: if nonzero, report the output as a failure.
            $this->assertEquals(
                0,
                $return_var,
                "PSR linter reported errors in $path: \n\t".implode("\n\t", $output)
            );
        }*/
        // Run linter in dry-run mode so it changes nothing.
        exec(
            escapeshellcmd('vendor/bin/php-cs-fixer fix --diff -v --dry-run .'),<commit_msg>Rename PSR compliance test and remove unused code<commit_after><?php

namespace phpSmug\Tests;

/**
 * @class
 * Test properties of our codebase rather than the actual code.
 */
class PsrComplianceTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function testPsrCompliance()
    {
        // If we can't find the command-line tool, we mark the test as skipped
        // so it shows as a warning to the developer rather than passing silently.
        if (!file_exists('vendor/bin/php-cs-fixer')) {
            $this->markTestSkipped(
                'Needs linter to check PSR compliance'
            );
        }
        
        // Run linter in dry-run mode so it changes nothing.
        exec(
            escapeshellcmd('vendor/bin/php-cs-fixer fix --diff -v --dry-run .'),
{'fraction_non_alphanumeric': 0.10902959910078681, 'fraction_numerical': 0.0003746721618583739, 'mean_word_length': 1.71617497456765, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '963681', 'n_tokens_mistral': 754, 'n_tokens_neox': 726, 'n_words': 250}