@@ -258,7 +258,7 @@ protected function set(string $var, $value, ?string $tableName = null): void
258258 */
259259 protected function setRef (string $ foreignKeyName , ?AbstractTDBMObject $ bean , string $ tableName , string $ className , string $ resultIteratorClass ): void
260260 {
261- assert ($ bean === null || is_a ($ bean , $ className ), new TDBMInvalidArgumentException ('$bean should be `null` or ` ' . $ className . '`. ` ' . ($ bean === null ? 'null ' : get_class ( $ bean) ) . '` provided. ' ));
261+ assert ($ bean === null || is_a ($ bean , $ className ), new TDBMInvalidArgumentException ('$bean should be `null` or ` ' . $ className . '`. ` ' . ($ bean === null ? 'null ' : $ bean::class ) . '` provided. ' ));
262262
263263 if (!isset ($ this ->dbRows [$ tableName ])) {
264264 $ this ->registerTable ($ tableName );
@@ -479,7 +479,7 @@ private function getRelationshipStorage(string $pivotTableName): \SplObjectStora
479479 */
480480 private function getManyToOneAlterableResultIterator (string $ tableName , string $ foreignKeyName ): AlterableResultIterator
481481 {
482- $ key = $ tableName. '___ ' . $ foreignKeyName ;
482+ $ key = $ tableName . '___ ' . $ foreignKeyName ;
483483
484484 return $ this ->manyToOneRelationships [$ key ] ?? $ this ->manyToOneRelationships [$ key ] = new AlterableResultIterator ();
485485 }
@@ -522,8 +522,8 @@ private function removeManyToOneRelationship(string $tableName, string $foreignK
522522 */
523523 protected function retrieveManyToOneRelationshipsStorage (string $ tableName , string $ foreignKeyName , array $ searchFilter , ?string $ orderString , string $ resultIteratorClass ): AlterableResultIterator
524524 {
525- assert (is_a ($ resultIteratorClass , ResultIterator::class, true ), new TDBMInvalidArgumentException ('$resultIteratorClass should be a ` ' . ResultIterator::class. '`. ` ' . $ resultIteratorClass . '` provided. ' ));
526- $ key = $ tableName. '___ ' . $ foreignKeyName ;
525+ assert (is_a ($ resultIteratorClass , ResultIterator::class, true ), new TDBMInvalidArgumentException ('$resultIteratorClass should be a ` ' . ResultIterator::class . '`. ` ' . $ resultIteratorClass . '` provided. ' ));
526+ $ key = $ tableName . '___ ' . $ foreignKeyName ;
527527 $ alterableResultIterator = $ this ->getManyToOneAlterableResultIterator ($ tableName , $ foreignKeyName );
528528 if ($ this ->status === TDBMObjectStateEnum::STATE_DETACHED || $ this ->status === TDBMObjectStateEnum::STATE_NEW || (isset ($ this ->manyToOneRelationships [$ key ]) && $ this ->manyToOneRelationships [$ key ]->getUnderlyingResultIterator () !== null )) {
529529 return $ alterableResultIterator ;
@@ -646,9 +646,7 @@ abstract protected function getUsedTables(): array;
646646 /**
647647 * Method called when the bean is removed from database.
648648 */
649- protected function onDelete (): void
650- {
651- }
649+ protected function onDelete (): void {}
652650
653651 /**
654652 * Returns the foreign keys used by this bean.
@@ -660,7 +658,7 @@ protected static function getForeignKeys(string $tableName): ForeignKeys
660658
661659 public function _getManyToManyRelationshipDescriptor (string $ pathKey ): ManyToManyRelationshipPathDescriptor
662660 {
663- throw new TDBMException ('Could not find many to many relationship descriptor key for " ' . $ pathKey. '" ' );
661+ throw new TDBMException ('Could not find many to many relationship descriptor key for " ' . $ pathKey . '" ' );
664662 }
665663
666664 /**
0 commit comments