Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Dependency clean-up #59

@mavimo

Description

@mavimo

Summary

Actually we are using Doctrine inflector for string singularisation, and Zend filter for convert close.io parameter name to class name. Since the Doctrine inflector have the same feature (method classify) I like to reduce dependency by using only Doctrine inflector.

Code snippet that reproduces the problem

<?php

use Zend\Filter\Word\UnderscoreToCamelCase;
use Doctrine\Common\Inflector\Inflector;

class DemoTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @dataProvider dataProvider
     */
    public function testDifference($string)
    {
        $this->assertEquals((new UnderscoreToCamelCase)->filter($string), Inflector::classify($string));
    }

    public function dataProvider()
    {
        return [
            ["date_updated"],
            ["html_url"],
            ["created_by"],
            ["organization_id"],
            ["url"],
            ["opportunities"],
            ["updated_by"],
            ["date_created"],
            ["id"],
            ["description"],
            ["id"],
            ["first_name"],
            ["last_name"],
            ["date_created"],
            ["date_updated"],
            ["email"],
            ["image"],
            ["phone"],
            ["last_used_timezone"],
        ];
    }
}

More infos

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions