@@ -28,15 +28,13 @@ discard block |
||
| 28 | 28 | use FacebookAds\Object\CustomAudienceNormalizers\ValueNormalizerInterface; |
| 29 | 29 | use FacebookAds\Object\Fields\CustomAudienceMultikeySchemaFields; |
| 30 | 30 | |
| 31 | -class FirstNameNormalizer implements ValueNormalizerInterface |
|
| 32 | -{ |
|
| 31 | +class FirstNameNormalizer implements ValueNormalizerInterface { |
|
| 33 | 32 | /** |
| 34 | 33 | * @param string $key |
| 35 | 34 | * @param string $key_value |
| 36 | 35 | * @return boolean |
| 37 | 36 | */ |
| 38 | - public function shouldNormalize($key, $key_value) |
|
| 39 | - { |
|
| 37 | + public function shouldNormalize($key, $key_value) { |
|
| 40 | 38 | return $key === CustomAudienceMultikeySchemaFields::FIRST_NAME; |
| 41 | 39 | } |
| 42 | 40 | |
@@ -45,8 +43,7 @@ discard block |
||
| 45 | 43 | * @param string $key_value |
| 46 | 44 | * @return string |
| 47 | 45 | */ |
| 48 | - public function normalize($key, $key_value) |
|
| 49 | - { |
|
| 46 | + public function normalize($key, $key_value) { |
|
| 50 | 47 | return preg_replace('/[^a-zA-Z]/', '', strtolower(trim($key_value))); |
| 51 | 48 | } |
| 52 | 49 | } |
@@ -1,26 +1,26 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | - * |
|
| 5 | - * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | - * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | - * form for use in connection with the web services and APIs provided by |
|
| 8 | - * Facebook. |
|
| 9 | - * |
|
| 10 | - * As with any software that integrates with the Facebook platform, your use |
|
| 11 | - * of this software is subject to the Facebook Developer Principles and |
|
| 12 | - * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | - * shall be included in all copies or substantial portions of the software. |
|
| 14 | - * |
|
| 15 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | - * DEALINGS IN THE SOFTWARE. |
|
| 22 | - * |
|
| 23 | - */ |
|
| 3 | + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | + * |
|
| 5 | + * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | + * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | + * form for use in connection with the web services and APIs provided by |
|
| 8 | + * Facebook. |
|
| 9 | + * |
|
| 10 | + * As with any software that integrates with the Facebook platform, your use |
|
| 11 | + * of this software is subject to the Facebook Developer Principles and |
|
| 12 | + * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | + * shall be included in all copies or substantial portions of the software. |
|
| 14 | + * |
|
| 15 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | + * DEALINGS IN THE SOFTWARE. |
|
| 22 | + * |
|
| 23 | + */ |
|
| 24 | 24 | |
| 25 | 25 | namespace FacebookAds\Object\Fields; |
| 26 | 26 | |
@@ -1,26 +1,26 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | - * |
|
| 5 | - * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | - * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | - * form for use in connection with the web services and APIs provided by |
|
| 8 | - * Facebook. |
|
| 9 | - * |
|
| 10 | - * As with any software that integrates with the Facebook platform, your use |
|
| 11 | - * of this software is subject to the Facebook Developer Principles and |
|
| 12 | - * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | - * shall be included in all copies or substantial portions of the software. |
|
| 14 | - * |
|
| 15 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | - * DEALINGS IN THE SOFTWARE. |
|
| 22 | - * |
|
| 23 | - */ |
|
| 3 | + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | + * |
|
| 5 | + * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | + * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | + * form for use in connection with the web services and APIs provided by |
|
| 8 | + * Facebook. |
|
| 9 | + * |
|
| 10 | + * As with any software that integrates with the Facebook platform, your use |
|
| 11 | + * of this software is subject to the Facebook Developer Principles and |
|
| 12 | + * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | + * shall be included in all copies or substantial portions of the software. |
|
| 14 | + * |
|
| 15 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | + * DEALINGS IN THE SOFTWARE. |
|
| 22 | + * |
|
| 23 | + */ |
|
| 24 | 24 | |
| 25 | 25 | namespace FacebookAds\Object\Fields; |
| 26 | 26 | |
@@ -28,15 +28,13 @@ discard block |
||
| 28 | 28 | use FacebookAds\Object\CustomAudienceNormalizers\ValueNormalizerInterface; |
| 29 | 29 | use FacebookAds\Object\Fields\CustomAudienceMultikeySchemaFields; |
| 30 | 30 | |
| 31 | -class BirthYearNormalizer implements ValueNormalizerInterface |
|
| 32 | -{ |
|
| 31 | +class BirthYearNormalizer implements ValueNormalizerInterface { |
|
| 33 | 32 | /** |
| 34 | 33 | * @param string $key |
| 35 | 34 | * @param string $key_value |
| 36 | 35 | * @return boolean |
| 37 | 36 | */ |
| 38 | - public function shouldNormalize($key, $key_value) |
|
| 39 | - { |
|
| 37 | + public function shouldNormalize($key, $key_value) { |
|
| 40 | 38 | return $key === CustomAudienceMultikeySchemaFields::BIRTH_YEAR; |
| 41 | 39 | } |
| 42 | 40 | |
@@ -45,8 +43,7 @@ discard block |
||
| 45 | 43 | * @param string $key_value |
| 46 | 44 | * @return string |
| 47 | 45 | */ |
| 48 | - public function normalize($key, $key_value) |
|
| 49 | - { |
|
| 46 | + public function normalize($key, $key_value) { |
|
| 50 | 47 | return preg_replace('/[^0-9]/', '', $key_value); |
| 51 | 48 | } |
| 52 | 49 | } |
@@ -1,26 +1,26 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | - * |
|
| 5 | - * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | - * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | - * form for use in connection with the web services and APIs provided by |
|
| 8 | - * Facebook. |
|
| 9 | - * |
|
| 10 | - * As with any software that integrates with the Facebook platform, your use |
|
| 11 | - * of this software is subject to the Facebook Developer Principles and |
|
| 12 | - * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | - * shall be included in all copies or substantial portions of the software. |
|
| 14 | - * |
|
| 15 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | - * DEALINGS IN THE SOFTWARE. |
|
| 22 | - * |
|
| 23 | - */ |
|
| 3 | + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | + * |
|
| 5 | + * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | + * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | + * form for use in connection with the web services and APIs provided by |
|
| 8 | + * Facebook. |
|
| 9 | + * |
|
| 10 | + * As with any software that integrates with the Facebook platform, your use |
|
| 11 | + * of this software is subject to the Facebook Developer Principles and |
|
| 12 | + * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | + * shall be included in all copies or substantial portions of the software. |
|
| 14 | + * |
|
| 15 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | + * DEALINGS IN THE SOFTWARE. |
|
| 22 | + * |
|
| 23 | + */ |
|
| 24 | 24 | |
| 25 | 25 | namespace FacebookAds\Object\Fields; |
| 26 | 26 | |
@@ -28,15 +28,13 @@ discard block |
||
| 28 | 28 | use FacebookAds\Object\CustomAudienceNormalizers\ValueNormalizerInterface; |
| 29 | 29 | use FacebookAds\Object\Fields\CustomAudienceMultikeySchemaFields; |
| 30 | 30 | |
| 31 | -class PhoneNormalizer implements ValueNormalizerInterface |
|
| 32 | -{ |
|
| 31 | +class PhoneNormalizer implements ValueNormalizerInterface { |
|
| 33 | 32 | /** |
| 34 | 33 | * @param string $key |
| 35 | 34 | * @param string $key_value |
| 36 | 35 | * @return boolean |
| 37 | 36 | */ |
| 38 | - public function shouldNormalize($key, $key_value) |
|
| 39 | - { |
|
| 37 | + public function shouldNormalize($key, $key_value) { |
|
| 40 | 38 | return $key === CustomAudienceMultikeySchemaFields::PHONE; |
| 41 | 39 | } |
| 42 | 40 | |
@@ -45,8 +43,7 @@ discard block |
||
| 45 | 43 | * @param string $key_value |
| 46 | 44 | * @return string |
| 47 | 45 | */ |
| 48 | - public function normalize($key, $key_value) |
|
| 49 | - { |
|
| 46 | + public function normalize($key, $key_value) { |
|
| 50 | 47 | return preg_replace('/[^0-9]/', '', trim($key_value)); |
| 51 | 48 | } |
| 52 | 49 | } |
@@ -1,26 +1,26 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | - * |
|
| 5 | - * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | - * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | - * form for use in connection with the web services and APIs provided by |
|
| 8 | - * Facebook. |
|
| 9 | - * |
|
| 10 | - * As with any software that integrates with the Facebook platform, your use |
|
| 11 | - * of this software is subject to the Facebook Developer Principles and |
|
| 12 | - * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | - * shall be included in all copies or substantial portions of the software. |
|
| 14 | - * |
|
| 15 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | - * DEALINGS IN THE SOFTWARE. |
|
| 22 | - * |
|
| 23 | - */ |
|
| 3 | + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | + * |
|
| 5 | + * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | + * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | + * form for use in connection with the web services and APIs provided by |
|
| 8 | + * Facebook. |
|
| 9 | + * |
|
| 10 | + * As with any software that integrates with the Facebook platform, your use |
|
| 11 | + * of this software is subject to the Facebook Developer Principles and |
|
| 12 | + * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | + * shall be included in all copies or substantial portions of the software. |
|
| 14 | + * |
|
| 15 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | + * DEALINGS IN THE SOFTWARE. |
|
| 22 | + * |
|
| 23 | + */ |
|
| 24 | 24 | |
| 25 | 25 | namespace FacebookAds\Object\Fields; |
| 26 | 26 | |
@@ -28,15 +28,13 @@ discard block |
||
| 28 | 28 | use FacebookAds\Object\CustomAudienceNormalizers\ValueNormalizerInterface; |
| 29 | 29 | use FacebookAds\Object\Fields\CustomAudienceMultikeySchemaFields; |
| 30 | 30 | |
| 31 | -class ZipNormalizer implements ValueNormalizerInterface |
|
| 32 | -{ |
|
| 31 | +class ZipNormalizer implements ValueNormalizerInterface { |
|
| 33 | 32 | /** |
| 34 | 33 | * @param string $key |
| 35 | 34 | * @param string $key_value |
| 36 | 35 | * @return boolean |
| 37 | 36 | */ |
| 38 | - public function shouldNormalize($key, $key_value) |
|
| 39 | - { |
|
| 37 | + public function shouldNormalize($key, $key_value) { |
|
| 40 | 38 | return $key === CustomAudienceMultikeySchemaFields::ZIP; |
| 41 | 39 | } |
| 42 | 40 | |
@@ -45,8 +43,7 @@ discard block |
||
| 45 | 43 | * @param string $key_value |
| 46 | 44 | * @return string |
| 47 | 45 | */ |
| 48 | - public function normalize($key, $key_value) |
|
| 49 | - { |
|
| 46 | + public function normalize($key, $key_value) { |
|
| 50 | 47 | return explode( |
| 51 | 48 | '-', |
| 52 | 49 | preg_replace('/[ ]/', '', strtolower(trim($key_value))) |
@@ -1,26 +1,26 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | - * |
|
| 5 | - * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | - * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | - * form for use in connection with the web services and APIs provided by |
|
| 8 | - * Facebook. |
|
| 9 | - * |
|
| 10 | - * As with any software that integrates with the Facebook platform, your use |
|
| 11 | - * of this software is subject to the Facebook Developer Principles and |
|
| 12 | - * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | - * shall be included in all copies or substantial portions of the software. |
|
| 14 | - * |
|
| 15 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | - * DEALINGS IN THE SOFTWARE. |
|
| 22 | - * |
|
| 23 | - */ |
|
| 3 | + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | + * |
|
| 5 | + * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | + * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | + * form for use in connection with the web services and APIs provided by |
|
| 8 | + * Facebook. |
|
| 9 | + * |
|
| 10 | + * As with any software that integrates with the Facebook platform, your use |
|
| 11 | + * of this software is subject to the Facebook Developer Principles and |
|
| 12 | + * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | + * shall be included in all copies or substantial portions of the software. |
|
| 14 | + * |
|
| 15 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | + * DEALINGS IN THE SOFTWARE. |
|
| 22 | + * |
|
| 23 | + */ |
|
| 24 | 24 | |
| 25 | 25 | namespace FacebookAds\Object\Fields; |
| 26 | 26 | |
@@ -27,8 +27,7 @@ discard block |
||
| 27 | 27 | use FacebookAds\Object\CustomAudienceMultiKey; |
| 28 | 28 | use FacebookAds\Object\CustomAudienceNormalizers\ValueNormalizerInterface; |
| 29 | 29 | |
| 30 | -class HashNormalizer implements ValueNormalizerInterface |
|
| 31 | -{ |
|
| 30 | +class HashNormalizer implements ValueNormalizerInterface { |
|
| 32 | 31 | /** |
| 33 | 32 | * @var string |
| 34 | 33 | */ |
@@ -39,8 +38,7 @@ discard block |
||
| 39 | 38 | * @param string $key_value |
| 40 | 39 | * @return boolean |
| 41 | 40 | */ |
| 42 | - public function shouldNormalize($key, $key_value) |
|
| 43 | - { |
|
| 41 | + public function shouldNormalize($key, $key_value) { |
|
| 44 | 42 | return true; |
| 45 | 43 | } |
| 46 | 44 | |
@@ -49,8 +47,7 @@ discard block |
||
| 49 | 47 | * @param string $key_value |
| 50 | 48 | * @return string |
| 51 | 49 | */ |
| 52 | - public function normalize($key, $key_value) |
|
| 53 | - { |
|
| 50 | + public function normalize($key, $key_value) { |
|
| 54 | 51 | return hash(self::HASH_TYPE_SHA256, $key_value); |
| 55 | 52 | } |
| 56 | 53 | } |
@@ -1,26 +1,26 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | - * |
|
| 5 | - * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | - * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | - * form for use in connection with the web services and APIs provided by |
|
| 8 | - * Facebook. |
|
| 9 | - * |
|
| 10 | - * As with any software that integrates with the Facebook platform, your use |
|
| 11 | - * of this software is subject to the Facebook Developer Principles and |
|
| 12 | - * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | - * shall be included in all copies or substantial portions of the software. |
|
| 14 | - * |
|
| 15 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | - * DEALINGS IN THE SOFTWARE. |
|
| 22 | - * |
|
| 23 | - */ |
|
| 3 | + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | + * |
|
| 5 | + * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | + * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | + * form for use in connection with the web services and APIs provided by |
|
| 8 | + * Facebook. |
|
| 9 | + * |
|
| 10 | + * As with any software that integrates with the Facebook platform, your use |
|
| 11 | + * of this software is subject to the Facebook Developer Principles and |
|
| 12 | + * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | + * shall be included in all copies or substantial portions of the software. |
|
| 14 | + * |
|
| 15 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | + * DEALINGS IN THE SOFTWARE. |
|
| 22 | + * |
|
| 23 | + */ |
|
| 24 | 24 | |
| 25 | 25 | namespace FacebookAds\Object\Fields; |
| 26 | 26 | |
@@ -28,15 +28,13 @@ discard block |
||
| 28 | 28 | use FacebookAds\Object\CustomAudienceNormalizers\ValueNormalizerInterface; |
| 29 | 29 | use FacebookAds\Object\Fields\CustomAudienceMultikeySchemaFields; |
| 30 | 30 | |
| 31 | -class LastNameNormalizer implements ValueNormalizerInterface |
|
| 32 | -{ |
|
| 31 | +class LastNameNormalizer implements ValueNormalizerInterface { |
|
| 33 | 32 | /** |
| 34 | 33 | * @param string $key |
| 35 | 34 | * @param string $key_value |
| 36 | 35 | * @return boolean |
| 37 | 36 | */ |
| 38 | - public function shouldNormalize($key, $key_value) |
|
| 39 | - { |
|
| 37 | + public function shouldNormalize($key, $key_value) { |
|
| 40 | 38 | return $key === CustomAudienceMultikeySchemaFields::LAST_NAME; |
| 41 | 39 | } |
| 42 | 40 | |
@@ -45,8 +43,7 @@ discard block |
||
| 45 | 43 | * @param string $key_value |
| 46 | 44 | * @return string |
| 47 | 45 | */ |
| 48 | - public function normalize($key, $key_value) |
|
| 49 | - { |
|
| 46 | + public function normalize($key, $key_value) { |
|
| 50 | 47 | return preg_replace('/[^a-zA-Z]/', '', strtolower(trim($key_value))); |
| 51 | 48 | } |
| 52 | 49 | } |
@@ -1,26 +1,26 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | - * |
|
| 5 | - * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | - * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | - * form for use in connection with the web services and APIs provided by |
|
| 8 | - * Facebook. |
|
| 9 | - * |
|
| 10 | - * As with any software that integrates with the Facebook platform, your use |
|
| 11 | - * of this software is subject to the Facebook Developer Principles and |
|
| 12 | - * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | - * shall be included in all copies or substantial portions of the software. |
|
| 14 | - * |
|
| 15 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | - * DEALINGS IN THE SOFTWARE. |
|
| 22 | - * |
|
| 23 | - */ |
|
| 3 | + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | + * |
|
| 5 | + * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | + * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | + * form for use in connection with the web services and APIs provided by |
|
| 8 | + * Facebook. |
|
| 9 | + * |
|
| 10 | + * As with any software that integrates with the Facebook platform, your use |
|
| 11 | + * of this software is subject to the Facebook Developer Principles and |
|
| 12 | + * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | + * shall be included in all copies or substantial portions of the software. |
|
| 14 | + * |
|
| 15 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | + * DEALINGS IN THE SOFTWARE. |
|
| 22 | + * |
|
| 23 | + */ |
|
| 24 | 24 | |
| 25 | 25 | namespace FacebookAds\Object\Fields; |
| 26 | 26 | |
@@ -28,15 +28,13 @@ discard block |
||
| 28 | 28 | use FacebookAds\Object\CustomAudienceNormalizers\ValueNormalizerInterface; |
| 29 | 29 | use FacebookAds\Object\Fields\CustomAudienceMultikeySchemaFields; |
| 30 | 30 | |
| 31 | -class MadidNormalizer implements ValueNormalizerInterface |
|
| 32 | -{ |
|
| 31 | +class MadidNormalizer implements ValueNormalizerInterface { |
|
| 33 | 32 | /** |
| 34 | 33 | * @param string $key |
| 35 | 34 | * @param string $key_value |
| 36 | 35 | * @return boolean |
| 37 | 36 | */ |
| 38 | - public function shouldNormalize($key, $key_value) |
|
| 39 | - { |
|
| 37 | + public function shouldNormalize($key, $key_value) { |
|
| 40 | 38 | return $key === CustomAudienceMultikeySchemaFields::MADID; |
| 41 | 39 | } |
| 42 | 40 | |
@@ -45,8 +43,7 @@ discard block |
||
| 45 | 43 | * @param string $key_value |
| 46 | 44 | * @return string |
| 47 | 45 | */ |
| 48 | - public function normalize($key, $key_value) |
|
| 49 | - { |
|
| 46 | + public function normalize($key, $key_value) { |
|
| 50 | 47 | return strtolower(trim($key_value)); |
| 51 | 48 | } |
| 52 | 49 | } |
@@ -1,26 +1,26 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | - * |
|
| 5 | - * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | - * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | - * form for use in connection with the web services and APIs provided by |
|
| 8 | - * Facebook. |
|
| 9 | - * |
|
| 10 | - * As with any software that integrates with the Facebook platform, your use |
|
| 11 | - * of this software is subject to the Facebook Developer Principles and |
|
| 12 | - * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | - * shall be included in all copies or substantial portions of the software. |
|
| 14 | - * |
|
| 15 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | - * DEALINGS IN THE SOFTWARE. |
|
| 22 | - * |
|
| 23 | - */ |
|
| 3 | + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | + * |
|
| 5 | + * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | + * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | + * form for use in connection with the web services and APIs provided by |
|
| 8 | + * Facebook. |
|
| 9 | + * |
|
| 10 | + * As with any software that integrates with the Facebook platform, your use |
|
| 11 | + * of this software is subject to the Facebook Developer Principles and |
|
| 12 | + * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | + * shall be included in all copies or substantial portions of the software. |
|
| 14 | + * |
|
| 15 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | + * DEALINGS IN THE SOFTWARE. |
|
| 22 | + * |
|
| 23 | + */ |
|
| 24 | 24 | |
| 25 | 25 | namespace FacebookAds\Object\Fields; |
| 26 | 26 | |
@@ -28,15 +28,13 @@ discard block |
||
| 28 | 28 | use FacebookAds\Object\CustomAudienceNormalizers\ValueNormalizerInterface; |
| 29 | 29 | use FacebookAds\Object\Fields\CustomAudienceMultikeySchemaFields; |
| 30 | 30 | |
| 31 | -class StateNormalizer implements ValueNormalizerInterface |
|
| 32 | -{ |
|
| 31 | +class StateNormalizer implements ValueNormalizerInterface { |
|
| 33 | 32 | /** |
| 34 | 33 | * @param string $key |
| 35 | 34 | * @param string $key_value |
| 36 | 35 | * @return boolean |
| 37 | 36 | */ |
| 38 | - public function shouldNormalize($key, $key_value) |
|
| 39 | - { |
|
| 37 | + public function shouldNormalize($key, $key_value) { |
|
| 40 | 38 | return $key === CustomAudienceMultikeySchemaFields::STATE; |
| 41 | 39 | } |
| 42 | 40 | |
@@ -45,8 +43,7 @@ discard block |
||
| 45 | 43 | * @param string $key_value |
| 46 | 44 | * @return string |
| 47 | 45 | */ |
| 48 | - public function normalize($key, $key_value) |
|
| 49 | - { |
|
| 46 | + public function normalize($key, $key_value) { |
|
| 50 | 47 | return preg_replace('/[^a-zA-Z]/', '', strtolower(trim($key_value))); |
| 51 | 48 | } |
| 52 | 49 | } |
@@ -1,26 +1,26 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | - * |
|
| 5 | - * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | - * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | - * form for use in connection with the web services and APIs provided by |
|
| 8 | - * Facebook. |
|
| 9 | - * |
|
| 10 | - * As with any software that integrates with the Facebook platform, your use |
|
| 11 | - * of this software is subject to the Facebook Developer Principles and |
|
| 12 | - * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | - * shall be included in all copies or substantial portions of the software. |
|
| 14 | - * |
|
| 15 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | - * DEALINGS IN THE SOFTWARE. |
|
| 22 | - * |
|
| 23 | - */ |
|
| 3 | + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. |
|
| 4 | + * |
|
| 5 | + * You are hereby granted a non-exclusive, worldwide, royalty-free license to |
|
| 6 | + * use, copy, modify, and distribute this software in source code or binary |
|
| 7 | + * form for use in connection with the web services and APIs provided by |
|
| 8 | + * Facebook. |
|
| 9 | + * |
|
| 10 | + * As with any software that integrates with the Facebook platform, your use |
|
| 11 | + * of this software is subject to the Facebook Developer Principles and |
|
| 12 | + * Policies [http://developers.facebook.com/policy/]. This copyright notice |
|
| 13 | + * shall be included in all copies or substantial portions of the software. |
|
| 14 | + * |
|
| 15 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
| 16 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
| 17 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
|
| 18 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
| 19 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
| 20 | + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
|
| 21 | + * DEALINGS IN THE SOFTWARE. |
|
| 22 | + * |
|
| 23 | + */ |
|
| 24 | 24 | |
| 25 | 25 | namespace FacebookAds\Object\Fields; |
| 26 | 26 | |
@@ -28,15 +28,13 @@ discard block |
||
| 28 | 28 | use FacebookAds\Object\CustomAudienceNormalizers\ValueNormalizerInterface; |
| 29 | 29 | use FacebookAds\Object\Fields\CustomAudienceMultikeySchemaFields; |
| 30 | 30 | |
| 31 | -class FirstNameInitialNormalizer implements ValueNormalizerInterface |
|
| 32 | -{ |
|
| 31 | +class FirstNameInitialNormalizer implements ValueNormalizerInterface { |
|
| 33 | 32 | /** |
| 34 | 33 | * @param string $key |
| 35 | 34 | * @param string $key_value |
| 36 | 35 | * @return boolean |
| 37 | 36 | */ |
| 38 | - public function shouldNormalize($key, $key_value) |
|
| 39 | - { |
|
| 37 | + public function shouldNormalize($key, $key_value) { |
|
| 40 | 38 | return $key === CustomAudienceMultikeySchemaFields::FIRST_NAME_INITIAL; |
| 41 | 39 | } |
| 42 | 40 | |
@@ -45,8 +43,7 @@ discard block |
||
| 45 | 43 | * @param string $key_value |
| 46 | 44 | * @return string |
| 47 | 45 | */ |
| 48 | - public function normalize($key, $key_value) |
|
| 49 | - { |
|
| 46 | + public function normalize($key, $key_value) { |
|
| 50 | 47 | return preg_replace( |
| 51 | 48 | '/[^a-zA-Z]/', |
| 52 | 49 | '', |