@@ 32-45 (lines=14) @@ | ||
29 | /** |
|
30 | * @inheritdoc |
|
31 | */ |
|
32 | public function find($identifier, string $toScenario = null) |
|
33 | { |
|
34 | ||
35 | if ($model = parent::find($identifier, $toScenario)) { |
|
36 | return $model; |
|
37 | } |
|
38 | ||
39 | if (!is_numeric($identifier)) { |
|
40 | return null; |
|
41 | } |
|
42 | ||
43 | return $this->findById($identifier, $toScenario); |
|
44 | ||
45 | } |
|
46 | ||
47 | ||
48 | /******************************************* |
@@ 26-39 (lines=14) @@ | ||
23 | /** |
|
24 | * @inheritdoc |
|
25 | */ |
|
26 | public function find($identifier, string $toScenario = null) |
|
27 | { |
|
28 | ||
29 | if ($model = parent::find($identifier, $toScenario)) { |
|
30 | return $model; |
|
31 | } |
|
32 | ||
33 | if (!is_string($identifier)) { |
|
34 | return null; |
|
35 | } |
|
36 | ||
37 | return $this->findByString($identifier, $toScenario); |
|
38 | ||
39 | } |
|
40 | ||
41 | /******************************************* |
|
42 | * CACHE |
@@ 32-45 (lines=14) @@ | ||
29 | /** |
|
30 | * @inheritdoc |
|
31 | */ |
|
32 | public function find($identifier, string $toScenario = null) |
|
33 | { |
|
34 | ||
35 | if ($object = parent::find($identifier, $toScenario)) { |
|
36 | return $object; |
|
37 | } |
|
38 | ||
39 | if (!is_numeric($identifier)) { |
|
40 | return null; |
|
41 | } |
|
42 | ||
43 | return $this->findById($identifier, $toScenario); |
|
44 | ||
45 | } |
|
46 | ||
47 | /******************************************* |
|
48 | * CACHE |
@@ 26-39 (lines=14) @@ | ||
23 | /** |
|
24 | * @inheritdoc |
|
25 | */ |
|
26 | public function find($identifier, string $toScenario = null) |
|
27 | { |
|
28 | ||
29 | if ($model = parent::find($identifier, $toScenario)) { |
|
30 | return $model; |
|
31 | } |
|
32 | ||
33 | if (!is_string($identifier)) { |
|
34 | return null; |
|
35 | } |
|
36 | ||
37 | return $this->findByString($identifier, $toScenario); |
|
38 | ||
39 | } |
|
40 | ||
41 | /******************************************* |
|
42 | * CACHE |