Skip to content

Commit

Permalink
Fix AbstractMappingTransformer::transform to be public instead of pro…
Browse files Browse the repository at this point in the history
…tected
  • Loading branch information
Awkan committed Mar 2, 2018
1 parent 700fcf5 commit bddd06b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Make `AbstractMappingTransformer::transform()` public instead of protected

## [0.1] - 2018-03-02
### Added
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractMappingTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct($accessor = null)
* @param array $data
* @return mixed
*/
abstract protected function transform(array $data);
abstract public function transform(array $data);

/**
* Generate output array by given mapping & input array
Expand Down
2 changes: 1 addition & 1 deletion tests/AbstractMappingTransformerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function testTransformFromToDefaultFunction()

class ProxyDummyTransformer extends AbstractMappingTransformer
{
protected function transform(array $data) { return null; }
public function transform(array $data) { return null; }

public function transformFromMapping(array $mapping, array $data)
{
Expand Down

0 comments on commit bddd06b

Please sign in to comment.