Code Duplication    Length = 6-6 lines in 3 locations

src/CompiledContainer.php 1 location

@@ 71-76 (lines=6) @@
68
     */
69
    public function has($name)
70
    {
71
        if (! is_string($name)) {
72
            throw new \InvalidArgumentException(sprintf(
73
                'The name parameter must be of type string, %s given',
74
                is_object($name) ? get_class($name) : gettype($name)
75
            ));
76
        }
77
78
        // The parent method is overridden to check in our array, it avoids resolving definitions
79
        if (isset(static::METHOD_MAPPING[$name])) {

src/Container.php 2 locations

@@ 173-178 (lines=6) @@
170
     */
171
    public function make($name, array $parameters = [])
172
    {
173
        if (! is_string($name)) {
174
            throw new InvalidArgumentException(sprintf(
175
                'The name parameter must be of type string, %s given',
176
                is_object($name) ? get_class($name) : gettype($name)
177
            ));
178
        }
179
180
        $definition = $this->getDefinition($name);
181
        if (! $definition) {
@@ 203-208 (lines=6) @@
200
     */
201
    public function has($name)
202
    {
203
        if (! is_string($name)) {
204
            throw new InvalidArgumentException(sprintf(
205
                'The name parameter must be of type string, %s given',
206
                is_object($name) ? get_class($name) : gettype($name)
207
            ));
208
        }
209
210
        if (array_key_exists($name, $this->resolvedEntries)) {
211
            return true;