Skip to content
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

Added $startIndex param to Pos method #1225

Open
wants to merge 1 commit into
base: 6
Choose a base branch
from

Conversation

nedmas
Copy link

@nedmas nedmas commented Jul 25, 2024

Description

I've added $startIndex param to the Pos method with a default value of 1.

Manual testing steps

Loop through elements in an elemental area and print the results of $Pos(1).

Issues

Pull request checklist

  • The target branch is correct
  • All commits are relevant to the purpose of the PR (e.g. no debug statements, unrelated refactoring, or arbitrary linting)
    • Small amounts of additional linting are usually okay, but if it makes it hard to concentrate on the relevant changes, ask for the unrelated changes to be reverted, and submitted as a separate PR.
  • The commit messages follow our commit message guidelines
  • The PR follows our contribution guidelines
  • Code changes follow our coding conventions
  • This change is covered with tests (or tests aren't necessary for this change)
  • Any relevant User Help/Developer documentation is updated; for impactful changes, information is added to the changelog for the intended release
  • CI is green

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this PR.

You ticked the "The commit messages follow our commit message guidelines" and "This change is covered with tests (or tests aren't necessary for this change)" checkboxes, but the commit message is wrong and there are no tests.

Please add the API prefix to the commit message and add unit tests.

Please also check if there's any documentation in this repo that needs to be updated, and submit a pull request to the 6 branch of https://github.com/silverstripe/developer-docs to update the CMS 6 changelog.

* @return int
*/
public function Pos()
public function Pos($startIndex = 1)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
public function Pos($startIndex = 1)
public function Pos(int $startIndex = 1)

@GuySartorelli GuySartorelli self-assigned this Jul 28, 2024
@GuySartorelli
Copy link
Member

@nedmas Are you still interested in having this feature added to CMS 6? If so, please make the requested changes.
If the changes aren't made, the PR may be closed.

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