Code Duplication    Length = 10-13 lines in 3 locations

web/ckfinder/core/connector/php/vendor/microsoft/azure-storage/src/Common/Internal/RestProxy.php 2 locations

@@ 102-111 (lines=10) @@
99
     *
100
     * @return void
101
     */
102
    protected function addOptionalQueryParam(array &$queryParameters, $key, $value)
103
    {
104
        Validate::isArray($queryParameters, 'queryParameters');
105
        Validate::isString($key, 'key');
106
        Validate::isString($value, 'value');
107
                
108
        if (!is_null($value) && Resources::EMPTY_STRING !== $value) {
109
            $queryParameters[$key] = $value;
110
        }
111
    }
112
    
113
    /**
114
     * Adds optional header.
@@ 124-133 (lines=10) @@
121
     *
122
     * @return void
123
     */
124
    protected function addOptionalHeader(array &$headers, $key, $value)
125
    {
126
        Validate::isArray($headers, 'headers');
127
        Validate::isString($key, 'key');
128
        Validate::isString($value, 'value');
129
                
130
        if (!is_null($value) && Resources::EMPTY_STRING !== $value) {
131
            $headers[$key] = $value;
132
        }
133
    }
134
}
135

web/ckfinder/core/connector/php/vendor/microsoft/azure-storage/src/Common/Internal/Utilities.php 1 location

@@ 728-740 (lines=13) @@
725
     *
726
     * @return void
727
     */
728
    public static function validateMetadata(array $metadata = null)
729
    {
730
        if (!is_null($metadata)) {
731
            Validate::isArray($metadata, 'metadata');
732
        } else {
733
            $metadata = array();
734
        }
735
736
        foreach ($metadata as $key => $value) {
737
            Validate::isString($key, 'metadata key');
738
            Validate::isString($value, 'metadata value');
739
        }
740
    }
741
742
    /**
743
     * Append the content to file.