Code Duplication    Length = 21-21 lines in 2 locations

application/modules/xbanners/models/Base/BannerImageI18nQuery.php 1 location

@@ 141-161 (lines=21) @@
138
     *
139
     * @return ChildBannerImageI18n|array|mixed the result, formatted by the current formatter
140
     */
141
    public function findPk($key, ConnectionInterface $con = null)
142
    {
143
        if ($key === null) {
144
            return null;
145
        }
146
        if ((null !== ($obj = BannerImageI18nTableMap::getInstanceFromPool(serialize([(null === $key[0] || is_scalar($key[0]) || is_callable([$key[0], '__toString']) ? (string) $key[0] : $key[0]), (null === $key[1] || is_scalar($key[1]) || is_callable([$key[1], '__toString']) ? (string) $key[1] : $key[1])])))) && !$this->formatter) {
147
            // the object is already in the instance pool
148
            return $obj;
149
        }
150
        if ($con === null) {
151
            $con = Propel::getServiceContainer()->getReadConnection(BannerImageI18nTableMap::DATABASE_NAME);
152
        }
153
        $this->basePreSelect($con);
154
        if ($this->formatter || $this->modelAlias || $this->with || $this->select
155
         || $this->selectColumns || $this->asColumns || $this->selectModifiers
156
         || $this->map || $this->having || $this->joins) {
157
            return $this->findPkComplex($key, $con);
158
        } else {
159
            return $this->findPkSimple($key, $con);
160
        }
161
    }
162
163
    /**
164
     * Find object by primary key using raw SQL to go fast.

application/modules/xbanners/models/Base/BannersI18nQuery.php 1 location

@@ 126-146 (lines=21) @@
123
     *
124
     * @return ChildBannersI18n|array|mixed the result, formatted by the current formatter
125
     */
126
    public function findPk($key, ConnectionInterface $con = null)
127
    {
128
        if ($key === null) {
129
            return null;
130
        }
131
        if ((null !== ($obj = BannersI18nTableMap::getInstanceFromPool(serialize([(null === $key[0] || is_scalar($key[0]) || is_callable([$key[0], '__toString']) ? (string) $key[0] : $key[0]), (null === $key[1] || is_scalar($key[1]) || is_callable([$key[1], '__toString']) ? (string) $key[1] : $key[1])])))) && !$this->formatter) {
132
            // the object is already in the instance pool
133
            return $obj;
134
        }
135
        if ($con === null) {
136
            $con = Propel::getServiceContainer()->getReadConnection(BannersI18nTableMap::DATABASE_NAME);
137
        }
138
        $this->basePreSelect($con);
139
        if ($this->formatter || $this->modelAlias || $this->with || $this->select
140
         || $this->selectColumns || $this->asColumns || $this->selectModifiers
141
         || $this->map || $this->having || $this->joins) {
142
            return $this->findPkComplex($key, $con);
143
        } else {
144
            return $this->findPkSimple($key, $con);
145
        }
146
    }
147
148
    /**
149
     * Find object by primary key using raw SQL to go fast.