PHP Classes

File: resources/views/inspect.blade.php

Recommend this page to a friend!
  Classes of DeGraciaMathieu   PHP Wording Detector   resources/views/inspect.blade.php   Download  
File: resources/views/inspect.blade.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Wording Detector
Generate reports on the usage of words in classes
Author: By
Last change:
Date: 1 year ago
Size: 1,148 bytes
 

Contents

Class file image Download
<div>
    @if($words)
    <table>
        <thead>
        <tr>
            <th>total words</th>
            <th>total distincts words</th>
            <th>average use</th>
        </tr>
        </thead>
        <tr>
            <td>{{ number_format(array_sum($words), 0, ".", "'") }}</td>
            <td>{{ count($words) }}</td>
            <td>{{ number_format(array_sum($words) / count($words)) }}</td>
        </tr>
    </table>
    <table>
        <thead>
        <tr>
            <th>words</th>
            <th>usage</th>
            <th>pourcentage</th>
        </tr>
        </thead>
        @foreach(array_slice($words, 0, 20) as $name => $usage)
        <tr>
            <td>{{ $name }}</td>
            <td>{{ $usage }}</td>
            <td>
                @php
                    $percentage = $usage * 100 / array_sum($words);
                @endphp
                @if($percentage < 1)
                    under 1%
                @else
                    {{ number_format($percentage) }}%
                @endif
            </td>
        </tr>
        @endforeach
    </table>
    @else
        No files found.
    @endif
</div>