2017 © Pedro Peláez
 

library fqn-checker

image

mcmatters/fqn-checker

  • Wednesday, July 18, 2018
  • by MCMatters
  • Repository
  • 1 Watchers
  • 2 Stars
  • 92 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 77 % Grown

The README.md

PHP Fqn checker

Checks your php-code for the presence of un-imported functions and gives you information about where they are located., (*1)

Installation

composer require mcmatters/fqn-checker

Usage

<?php

declare(strict_types=1);

use McMatters\FqnChecker\FqnChecker;

require 'vendor/autoload.php';

$checker = new FqnChecker(file_get_contents(__DIR__.'/Wrong.php'));

print_r($checker->getNotImported());
print_r($checker->getImported());

Listing of Wrong.php, (*2)

<?php

declare(strict_types=1);

namespace Acme;

use function ucfirst;

class Wrong
{
    public function testArray()
    {
        return array_filter([], null);
    }

    public function testString()
    {
        return ucfirst('hello');
    }
}

Result, (*3)

[
    'constants' => [
        'Acme' => [
            'null' => [
                13,
            ],
        ],
    ],
    'functions' => [
        'Acme' => [
            'array_filter' => [
                13,
            ],
        ],
    ],
]

[
    'constants' => [],
    'functions' = [
        'Acme' => [
            'ucfirst' => true,
        ],
    ],
]

The Versions

18/07 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by Dmitry Borzyonok

18/07 2018

v1.0.3

1.0.3.0

  Sources   Download

MIT

The Requires

 

by Dmitry Borzyonok

22/03 2018

v1.0.2

1.0.2.0

  Sources   Download

MIT

The Requires

 

by Dmitry Borzyonok

21/03 2018

v1.0.1

1.0.1.0

  Sources   Download

MIT

The Requires

 

by Dmitry Borzyonok

13/03 2018

v1.0

1.0.0.0

  Sources   Download

MIT

The Requires

 

by Dmitry Borzyonok