@@ -219,6 +219,7 @@ public function endpoint($endpoint = null)
219219 }
220220 $ this ->_endpoint = Inflector::underscore ($ endpoint );
221221 }
222+
222223 return $ this ->_endpoint ;
223224 }
224225
@@ -264,6 +265,7 @@ public function registryAlias($registryAlias = null)
264265 if ($ this ->_registryAlias === null ) {
265266 $ this ->_registryAlias = $ this ->alias ();
266267 }
268+
267269 return $ this ->_registryAlias ;
268270 }
269271
@@ -305,11 +307,13 @@ public function schema($schema = null)
305307 ->describe ($ this ->endpoint ())
306308 );
307309 }
310+
308311 return $ this ->_schema ;
309312 }
310313 if (is_array ($ schema )) {
311314 $ schema = new Schema ($ this ->table (), $ schema );
312315 }
316+
313317 return $ this ->_schema = $ schema ;
314318 }
315319
@@ -352,6 +356,7 @@ protected function _initializeSchema(Schema $schema)
352356 public function hasField ($ field )
353357 {
354358 $ schema = $ this ->schema ();
359+
355360 return $ schema ->column ($ field ) !== null ;
356361 }
357362
@@ -377,6 +382,7 @@ public function primaryKey($key = null)
377382 }
378383 $ this ->_primaryKey = $ key ;
379384 }
385+
380386 return $ this ->_primaryKey ;
381387 }
382388
@@ -406,6 +412,7 @@ public function displayField($key = null)
406412 $ this ->_displayField = 'name ' ;
407413 }
408414 }
415+
409416 return $ this ->_displayField ;
410417 }
411418
@@ -495,6 +502,7 @@ public function webservice($webservice = null)
495502 public function find ($ type = 'all ' , $ options = [])
496503 {
497504 $ query = $ this ->query ()->read ();
505+
498506 return $ this ->callFinder ($ type , $ query , $ options );
499507 }
500508
@@ -623,6 +631,7 @@ protected function _setFieldMatchers($options, $keys)
623631 foreach ($ fields as $ field ) {
624632 $ matches [] = $ row [$ field ];
625633 }
634+
626635 return implode ('; ' , $ matches );
627636 };
628637 }
@@ -724,6 +733,7 @@ public function findOrCreate($search, callable $callback = null)
724733 if ($ callback ) {
725734 $ callback ($ entity );
726735 }
736+
727737 return $ this ->save ($ entity ) ?: $ entity ;
728738 }
729739
@@ -855,6 +865,7 @@ public function save(EntityInterface $resource, $options = [])
855865 }
856866
857867 $ className = get_class ($ resource );
868+
858869 return new $ className ($ resource ->toArray (), [
859870 'markNew ' => false ,
860871 'markClean ' => true
@@ -949,6 +960,7 @@ protected function _dynamicFinder($method, $args)
949960 foreach ($ fields as $ field ) {
950961 $ conditions [$ this ->aliasField ($ field )] = array_shift ($ args );
951962 }
963+
952964 return $ conditions ;
953965 };
954966
@@ -1019,9 +1031,11 @@ public function newEntity($data = null, array $options = [])
10191031 if ($ data === null ) {
10201032 $ class = $ this ->resourceClass ();
10211033 $ entity = new $ class ([], ['source ' => $ this ->registryAlias ()]);
1034+
10221035 return $ entity ;
10231036 }
10241037 $ marshaller = $ this ->marshaller ();
1038+
10251039 return $ marshaller ->one ($ data , $ options );
10261040 }
10271041
@@ -1031,6 +1045,7 @@ public function newEntity($data = null, array $options = [])
10311045 public function newEntities (array $ data , array $ options = [])
10321046 {
10331047 $ marshaller = $ this ->marshaller ();
1048+
10341049 return $ marshaller ->many ($ data , $ options );
10351050 }
10361051
@@ -1055,6 +1070,7 @@ public function newEntities(array $data, array $options = [])
10551070 public function patchEntity (EntityInterface $ entity , array $ data , array $ options = [])
10561071 {
10571072 $ marshaller = $ this ->marshaller ();
1073+
10581074 return $ marshaller ->merge ($ entity , $ data , $ options );
10591075 }
10601076
@@ -1080,6 +1096,7 @@ public function patchEntity(EntityInterface $entity, array $data, array $options
10801096 public function patchEntities ($ entities , array $ data , array $ options = [])
10811097 {
10821098 $ marshaller = $ this ->marshaller ();
1099+
10831100 return $ marshaller ->mergeMany ($ entities , $ data , $ options );
10841101 }
10851102
@@ -1129,6 +1146,7 @@ public function implementedEvents()
11291146 }
11301147 $ events [$ event ] = $ method ;
11311148 }
1149+
11321150 return $ events ;
11331151 }
11341152
@@ -1151,6 +1169,7 @@ public function buildRules(RulesChecker $rules)
11511169 public function __debugInfo ()
11521170 {
11531171 $ conn = $ this ->connection ();
1172+
11541173 return [
11551174 'registryAlias ' => $ this ->registryAlias (),
11561175 'alias ' => $ this ->alias (),
0 commit comments