Skip to content

Migrate from plural to singular names in namespaces #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2019

Conversation

krlv
Copy link
Contributor

@krlv krlv commented Oct 7, 2019

Description

Renamed following namespaces:

  • doganoo\PHPAlgorithms\Datastructure\Lists\{ArrayLists => ArrayList}\ArrayList
  • doganoo\PHPAlgorithms\Datastructure\Lists\{ArrayLists => ArrayList}\StringBuilder
  • doganoo\PHPAlgorithms\Datastructure\Lists\{LinkedLists => LinkedList}\DoublyLinkedList
  • doganoo\PHPAlgorithms\Datastructure\Lists\{LinkedLists => LinkedList}\SinglyLinkedList
  • doganoo\PHPAlgorithms\Datastructure\{Maps => Map}\HashMap
  • doganoo\PHPAlgorithms\Datastructure\{Maps => Map}\IntegerVector
  • doganoo\PHPAlgorithms\Datastructure\{Maps => Map}\Map
  • doganoo\PHPAlgorithms\Datastructure\{Sets => Set}\HashSet
  • doganoo\PHPAlgorithms\{Maps => Map}\HashMapTest
  • doganoo\PHPAlgorithms\{Maps => Map}\NodeTest
  • doganoo\PHPAlgorithms\{Sets => Set}\HashSetTest

Related Issue

#6

Motivation and Context

#6

NB! Following namespace left in plural names:

  • doganoo\PHPAlgorithms\Datastructure\Lists
  • doganoo\PHPAlgorithms\Common\Abstracts
  • doganoo\PHPAlgorithms\Common\Interfaces

These namespaces cannot be renamed to singular form, because list, abstract and interface are reserved words in PHP

How Has This Been Tested?

By running PHPUnit tests

$ phpunit
PHPUnit 6.5.0 by Sebastian Bergmann and contributors.

.....S...........S............................................... 65 / 94 ( 69%)
.............................                                     94 / 94 (100%)

Copy link
Owner

@doganoo doganoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey

thank you for this PR.
Could you please add a author tag to each files header that you have changed?

like this:

@author Firstname Lastname <mail [at] example.com>

Thank you for contributing to PHPAlgorithms 😊

@krlv krlv force-pushed the plural_to_singular_namespaces branch from c81cf04 to 5ef71b0 Compare October 8, 2019 03:11
@krlv
Copy link
Contributor Author

krlv commented Oct 8, 2019

Hey @doganoo ! Thank you for the awesome repo!

Regarding your change request - PHPDoc has dedicated @copyright tag for that matter. Do you want me to add it as well?

/**
 * Class Map
 *
 * @package doganoo\PHPAlgorithms\Datastructure\Map
 * @author Dogan Ucar, <[email protected]>
 * @copyright 2019 Dogan Ucar
 */

Let me know what you think

@doganoo
Copy link
Owner

doganoo commented Oct 8, 2019

Hey @krlv

thank you for contributing to this repo! 😊

my aim is to mention and thank all contributors. Therefore, you it would be great if you add your own name like:

/**
 * MIT License
 *
 * Copyright (c) 2018 Dogan Ucar, <[email protected]>
 * 
 * @author Eugene Kirillov <[email protected]>

@krlv krlv force-pushed the plural_to_singular_namespaces branch from 5ef71b0 to 1d29ac3 Compare October 8, 2019 17:40
@krlv
Copy link
Contributor Author

krlv commented Oct 8, 2019

Hey @doganoo! Sorry, I got a wrong idea that you want to add PHPDoc @author tags.

my aim is to mention and thank all contributors

That's very generous of you! I'd be honored to add my name to changed files!

@krlv krlv requested a review from doganoo October 8, 2019 17:41
@krlv krlv force-pushed the plural_to_singular_namespaces branch from 1d29ac3 to 424f770 Compare October 9, 2019 07:03
@doganoo doganoo merged commit c95ed00 into doganoo:master Oct 9, 2019
@doganoo
Copy link
Owner

doganoo commented Oct 9, 2019

@krlv thanks for this PR.

Merging this PR into master, we reached our milestone for 1.0.0, which is going to be released ASAP 🎉

@krlv krlv deleted the plural_to_singular_namespaces branch October 9, 2019 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants