Skip to content

Commit 9722621

Browse files
author
Paul
committed
Merged KeyAware into MapperAware and similarly for MapperAwareTrait.
1 parent 9c5b994 commit 9722621

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/MapperAware.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
namespace ScriptFUSION\Mapper;
33

4-
interface MapperAware
4+
interface MapperAware extends KeyAware
55
{
66
/**
77
* Sets the mapper to the specified mapper instance.

src/MapperAwareTrait.php

+10-6
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,22 @@
33

44
trait MapperAwareTrait
55
{
6-
/** @var Mapper */
6+
use KeyAwareTrait;
7+
8+
/**
9+
* @var Mapper
10+
*/
711
private $mapper;
812

13+
protected function getMapper()
14+
{
15+
return $this->mapper;
16+
}
17+
918
public function setMapper(Mapper $mapper)
1019
{
1120
$this->mapper = $mapper;
1221

1322
return $this;
1423
}
15-
16-
protected function getMapper()
17-
{
18-
return $this->mapper;
19-
}
2024
}

src/Strategy/Delegate.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
<?php
22
namespace ScriptFUSION\Mapper\Strategy;
33

4-
use ScriptFUSION\Mapper\KeyAware;
5-
use ScriptFUSION\Mapper\KeyAwareTrait;
64
use ScriptFUSION\Mapper\MapperAware;
75
use ScriptFUSION\Mapper\MapperAwareTrait;
86
use ScriptFUSION\Mapper\Mapping;
97

10-
abstract class Delegate implements Strategy, MapperAware, KeyAware
8+
abstract class Delegate implements Strategy, MapperAware
119
{
12-
use MapperAwareTrait, KeyAwareTrait;
10+
use MapperAwareTrait;
1311

1412
private $expression;
1513

0 commit comments

Comments
 (0)