2017 © Pedro Peláez
 

library brobdingnagian-detector

Detects if your class and methods are too big and suggest to extract responsibilities and collaborators

image

elfiggo/brobdingnagian-detector

Detects if your class and methods are too big and suggest to extract responsibilities and collaborators

  • Saturday, October 8, 2016
  • by Elfiggo
  • Repository
  • 2 Watchers
  • 19 Stars
  • 12 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 4 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

brobdingnagian-detector-phpspec-extension

Detects if your class and methods are too big and suggest to extract responsibilities and collaborators, (*2)

Installation

     "require-dev": {
        "elfiggo/brobdingnagian-detector":"^0.1.0"
      }

Enable the extension

Add the following to your phpspec.yml under extensions, (*3)

extensions:
    - Elfiggo\Brobdingnagian\Extension

See PhpSpec Extension Documentation if you are having trouble, (*4)

Parameters

brobdingnagian:
    class-size: 300
    method-size: 10
    number-of-methods: 5
    filter-methods:
       static: true
       public: true
       protected: true
       private: true
       abstract: true
       final: true
    dependencies: 4
    list-brob: true
    create-csv: false
    number-of-interfaces: 3
    number-of-traits: 1

Usage

Use as normal with phpspec, if you want to disable exceptions for Brobdingnagian and list the classes, methods or dependencies instead, then pass the following flag, this has precedence over the phpspec.yml parameter., (*5)

phpspec r --list-brob=true (Turns Exceptions Off)
phpspec r --list-brob=false (Turns Exceptions On)

Filter Methods

Turn off checks for methods that are private or final by setting to false, (*6)

You can remove the filter-methods arguments entirely/, (*7)

Turning off final but not public on methods that are final and public will still appear as they conform to a public signiture., (*8)

See ReflectionClass::getMethods for more information., (*9)

Supported PHP Versions

Currently PHP 5.5 and above, (*10)

Follows php security support release cycle for minimum supported versions, (*11)

To Do - Brobdingnagian

  1. Ship It! (East Croydon)
  2. Add Dictionary of suggestible class names for roles
  3. Ship it! (Blackpool)
  4. Ask to split class/methods into a helper class
    • Create New Helper class with Spec stubs of current class
  5. Ship it! (Derby)

The Versions

08/10 2016

dev-feature/tweak-travis-ci

dev-feature/tweak-travis-ci

Detects if your class and methods are too big and suggest to extract responsibilities and collaborators

  Sources   Download

MIT

The Development Requires

by Avatar Elfiggo

08/10 2016

dev-master

9999999-dev

Detects if your class and methods are too big and suggest to extract responsibilities and collaborators

  Sources   Download

MIT

The Development Requires

by Avatar Elfiggo

07/10 2016

dev-feature/update-readme

dev-feature/update-readme

Detects if your class and methods are too big and suggest to extract responsibilities and collaborators

  Sources   Download

MIT

The Development Requires

by Avatar Elfiggo

16/11 2015

0.2.0-alpha

0.2.0.0-alpha

Detects if your class and methods are too big and suggest to extract responsibilities and collaborators

  Sources   Download

MIT

The Development Requires

by Avatar Elfiggo

04/09 2015

0.1.0-alpha

0.1.0.0-alpha

Detects if your class and methods are too big and suggest to extract responsibilities and collaborators

  Sources   Download

MIT

The Development Requires

by Avatar Elfiggo