original_string: private function getMutatorMethod(string $class, string $property): ?array
      {
          $ucProperty = ucfirst($property);
          $ucSingulars = (array) Inflector::singularize($ucProperty);
  
          foreach ($this->mutatorPrefixes as $prefix) {
              $names = [$ucProperty];
              if (\in_array($prefix, $this->arrayMutatorPrefixes)) {
                  $names = array_merge($names, $ucSingulars);
              }
  
              foreach ($names as $name) {
                  try {
                      $reflectionMethod = new \ReflectionMethod($class, $prefix.$name);
                      if ($reflectionMethod->isStatic()) {
                          continue;
                      }
  
                      // Parameter can be optional to allow things like: method(array $foo = null)
                      if ($reflectionMethod->getNumberOfParameters() >= 1) {
                          return [$reflectionMethod, $prefix];
                      }
                  } catch (\ReflectionException $e) {
                      // Try the next prefix if the method doesn't exist
                  }
              }
          }
  
          return null;
      }
code: private function getMutatorMethod(string $class, string $property): ?array
      {
          $ucProperty = ucfirst($property);
          $ucSingulars = (array) Inflector::singularize($ucProperty);
  
          foreach ($this->mutatorPrefixes as $prefix) {
              $names = [$ucProperty];
              if (\in_array($prefix, $this->arrayMutatorPrefixes)) {
                  $names = array_merge($names, $ucSingulars);
              }
  
              foreach ($names as $name) {
                  try {
                      $reflectionMethod = new \ReflectionMethod($class, $prefix.$name);
                      if ($reflectionMethod->isStatic()) {
                          continue;
                      }
  
                      // Parameter can be optional to allow things like: method(array $foo = null)
                      if ($reflectionMethod->getNumberOfParameters() >= 1) {
                          return [$reflectionMethod, $prefix];
                      }
                  } catch (\ReflectionException $e) {
                      // Try the next prefix if the method doesn't exist
                  }
              }
          }
  
          return null;
      }
code_tokens: private function getMutatorMethod ( string $ class , string $ property ) : ? array { $ ucProperty = ucfirst ( $ property ) ; $ ucSingulars = ( array ) Inflector :: singularize ( $ ucProperty ) ; foreach ( $ this -> mutatorPrefixes as $ prefix ) { $ names = [ $ ucProperty ] ; if ( \ in_array ( $ prefix , $ this -> arrayMutatorPrefixes ) ) { $ names = array_merge ( $ names , $ ucSingulars ) ; } foreach ( $ names as $ name ) { try { $ reflectionMethod = new \ ReflectionMethod ( $ class , $ prefix . $ name ) ; if ( $ reflectionMethod -> isStatic ( ) ) { continue ; } // Parameter can be optional to allow things like: method(array $foo = null) if ( $ reflectionMethod -> getNumberOfParameters ( ) >= 1 ) { return [ $ reflectionMethod , $ prefix ] ; } } catch ( \ ReflectionException $ e ) { // Try the next prefix if the method doesn't exist } } } return null ; }
docstring: Returns an array with a the instance of \ReflectionMethod as first key
  and the prefix of the method as second or null if not found.
docstring_tokens: Returns an array with a the instance of \ ReflectionMethod as first key and the prefix of the method as second or null if not found .