src/PropifierTrait.php
private static function remapProperties(callable $inflector, array $properties): array {
    $mapped = [];

    foreach($properties as $property) {
      $prop_name = $inflector(substr($property->name, 3));

      if(!isset($mapped[$prop_name])) {
        $mapped[$prop_name] = ['get' => null, 'set' => null, 'itr' => null];
      }

      $mapped[$prop_name][substr($property->name, 0, 3)] = $property;
    }

    return $mapped;
  }
private static function remapProperties(callable $inflector, array $properties): array {
    $mapped = [];

    foreach($properties as $property) {
      $prop_name = $inflector(substr($property->name, 3));

      if(!isset($mapped[$prop_name])) {
        $mapped[$prop_name] = ['get' => null, 'set' => null, 'itr' => null];
      }

      $mapped[$prop_name][substr($property->name, 0, 3)] = $property;
    }

    return $mapped;
  }
private static function remapProperties ( callable $ inflector , array $ properties ) : array { $ mapped = [ ] ; foreach ( $ properties as $ property ) { $ prop_name = $ inflector ( substr ( $ property -> name , 3 ) ) ; if ( ! isset ( $ mapped [ $ prop_name ] ) ) { $ mapped [ $ prop_name ] = [ 'get' => null , 'set' => null , 'itr' => null ] ; } $ mapped [ $ prop_name ] [ substr ( $ property -> name , 0 , 3 ) ] = $ property ; } return $ mapped ; }
Transforms property names and pairs them up where applicable

@param  callable            $inflector   An instance of Inflector to transform property names
@param  ReflectionMethod[]  $properties  The properties to transform

@return  ReflectionMethod[][]  The properties after transformation and pairing
Transforms property names and pairs them up where applicable