<commit_before>Feature: Object Completion
    As a user
    I want to have class properties and methods completion after -> or ::
    So that I can quickly choose name I need

    Scenario: Gettings all properties for $this
        Given there is a file with:
        """
        <?php

        class SomeClass
        {
            public function method1()
            {

            }
            public function method2()
            {

            }
            private function somePrivateMethod()
            {

            }
            private $someDep;
            public $someApi;
        }
        """
        When I type "$this->" on the 7 line
        And ask for completion
        Then I should get:
            | Name |
            | method1 |
            | method2 |
            | someApi |
            | someDep |
            | somePrivateMethod |

    Scenario: Accessing only public properties out of class
        Given there is a file with:
        """
        <?php

        class SomeClass
        {
            public function method1()
            {

            }
            public function method2()
            {

            }
            private function somePrivateMethod()
            {

            }
            private $someDep;
            public $someApi;
        }
        """
        When I type "$a = new SomeClass;" on the 20 line
        And I type "$a->" on the 21 line
        And ask for completion
        Then I should get:
            | Name |
            | method1 |
            | method2 |
            | someApi |<commit_msg>fixed scenario names and added return check scenario<commit_after>Feature: Object Completion
    As a user
    I want to have class properties and methods completion after -> or ::
    So that I can quickly choose name I need

    Scenario: Gettings all methods and properties for $this
        Given there is a file with:
        """
        <?php

        class SomeClass
        {
            public function method1()
            {

            }
            public function method2()
            {

            }
            private function somePrivateMethod()
            {

            }
            private $someDep;
            public $someApi;
        }
        """
        When I type "$this->" on the 7 line
        And ask for completion
        Then I should get:
            | Name |
            | method1 |
            | method2 |
            | someApi |
            | someDep |
            | somePrivateMethod |

    Scenario: Accessing only public methods and properties out of class
        Given there is a file with:
        """
        <?php

        class SomeClass
        {
            public function method3()
            {

            }
            public function method4()
            {

            }
            private function somePrivateMethod()
            {

            }
            private $someDep;
            public $someApi;
        }
        """
        When I type "$a = new SomeClass;" on the 20 line
        And I type "$a->" on the 21 line
        And ask for completion
        Then I should get:
            | Name |
            | method3 |
            | method4 |
            | someApi |

    Scenario: Accessing only public methods and properties for return
        Given there is a file with:
        """
        <?php

        class SomeOtherClass
        {
            public function methodOfOtherClass()
            {

            }
            public function otherMethodOfOtherClass()
            {

            }
            private function privateMethodOfOtherClass()
            {

            }
            public $aPublicProperty;
        }
        class SomeClass
        {
            /**
             * @return SomeOtherClass
             */
            public function method1()
            {

            }
            public function method2()
            {

            }
            private function somePrivateMethod()
            {

            }
            private $someDep;
            public $someApi;
        }
        """
        When I type "$a = new SomeClass;" on the 39 line
        And I type "$a->method1()->" on the 40 line
        And ask for completion
        Then I should get:
            | Name |
            | aPublicProperty |
            | methodOfOtherClass |
            | otherMethodOfOtherClass |
{'fraction_non_alphanumeric': 0.06349931475559616, 'fraction_numerical': 0.007537688442211055, 'mean_word_length': 1.0753554502369669, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3084674', 'n_tokens_mistral': 1035, 'n_tokens_neox': 992, 'n_words': 359}