@@ -27,15 +27,13 @@ |
||
27 | 27 | use FacebookAds\Object\Fields\ObjectStorySpecFields; |
28 | 28 | use FacebookAds\Object\Traits\FieldValidation; |
29 | 29 | |
30 | -class ObjectStorySpec extends AbstractObject |
|
31 | -{ |
|
30 | +class ObjectStorySpec extends AbstractObject { |
|
32 | 31 | use FieldValidation; |
33 | 32 | |
34 | 33 | /** |
35 | 34 | * @return ObjectStorySpecFields |
36 | 35 | */ |
37 | - public static function getFieldsEnum() |
|
38 | - { |
|
36 | + public static function getFieldsEnum() { |
|
39 | 37 | return ObjectStorySpecFields::getInstance(); |
40 | 38 | } |
41 | 39 | } |
@@ -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 |
@@ -24,10 +24,8 @@ |
||
24 | 24 | |
25 | 25 | namespace FacebookAds\Object\Traits; |
26 | 26 | |
27 | -trait CannotCreate |
|
28 | -{ |
|
29 | - public function create(array $params = array()) |
|
30 | - { |
|
27 | +trait CannotCreate { |
|
28 | + public function create(array $params = array()) { |
|
31 | 29 | throw new \Exception( |
32 | 30 | __CLASS__.' does not have '.__FUNCTION__.' function.' |
33 | 31 | ); |
@@ -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 |
@@ -24,10 +24,8 @@ |
||
24 | 24 | |
25 | 25 | namespace FacebookAds\Object\Traits; |
26 | 26 | |
27 | -trait CannotUpdate |
|
28 | -{ |
|
29 | - public function update(array $params = array()) |
|
30 | - { |
|
27 | +trait CannotUpdate { |
|
28 | + public function update(array $params = array()) { |
|
31 | 29 | throw new \Exception( |
32 | 30 | __CLASS__.' does not have '.__FUNCTION__.' function.' |
33 | 31 | ); |
@@ -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 | /** |
28 | 28 | * @property array $changedFields |
29 | 29 | */ |
30 | -trait ObjectValidation |
|
31 | -{ |
|
30 | +trait ObjectValidation { |
|
32 | 31 | /** |
33 | 32 | * @param array $params |
34 | 33 | * @return $this |
@@ -40,8 +39,7 @@ discard block |
||
40 | 39 | * @return $this |
41 | 40 | * @throws \InvalidArgumentException |
42 | 41 | */ |
43 | - public function validate(array $params = array()) |
|
44 | - { |
|
42 | + public function validate(array $params = array()) { |
|
45 | 43 | $changed_fields = $this->changedFields; |
46 | 44 | $validate_flag = array( |
47 | 45 | 'execution_options' => array('validate_only') |
@@ -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 |
@@ -31,15 +31,13 @@ discard block |
||
31 | 31 | * @method Api getApi() |
32 | 32 | * @method string assureId() |
33 | 33 | */ |
34 | -trait AdLabelAwareCrudObjectTrait |
|
35 | -{ |
|
34 | +trait AdLabelAwareCrudObjectTrait { |
|
36 | 35 | /** |
37 | 36 | * Take ad label ids and format them correctly for the request |
38 | 37 | * @param array $adlabel_ids |
39 | 38 | * @return array |
40 | 39 | */ |
41 | - protected function formatParams(array $adlabel_ids) |
|
42 | - { |
|
40 | + protected function formatParams(array $adlabel_ids) { |
|
43 | 41 | foreach ($adlabel_ids as &$adlabel_id) { |
44 | 42 | $adlabel_id = array('id' => $adlabel_id); |
45 | 43 | } |
@@ -50,8 +48,7 @@ discard block |
||
50 | 48 | /** |
51 | 49 | * @param array $ad_label_ids |
52 | 50 | */ |
53 | - public function addAdLabels(array $ad_label_ids) |
|
54 | - { |
|
51 | + public function addAdLabels(array $ad_label_ids) { |
|
55 | 52 | $this->getApi()->call( |
56 | 53 | '/'.$this->assureId().'/adlabels', |
57 | 54 | RequestInterface::METHOD_POST, |
@@ -62,8 +59,7 @@ discard block |
||
62 | 59 | /** |
63 | 60 | * @param array $ad_label_ids |
64 | 61 | */ |
65 | - public function removeAdLabels(array $ad_label_ids) |
|
66 | - { |
|
62 | + public function removeAdLabels(array $ad_label_ids) { |
|
67 | 63 | $this->getApi()->call( |
68 | 64 | '/'.$this->assureId().'/adlabels', |
69 | 65 | RequestInterface::METHOD_DELETE, |
@@ -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 |
@@ -24,10 +24,8 @@ |
||
24 | 24 | |
25 | 25 | namespace FacebookAds\Object\Traits; |
26 | 26 | |
27 | -trait CannotDelete |
|
28 | -{ |
|
29 | - public function delete(array $params = array()) |
|
30 | - { |
|
27 | +trait CannotDelete { |
|
28 | + public function delete(array $params = array()) { |
|
31 | 29 | throw new \Exception( |
32 | 30 | __CLASS__.' does not have '.__FUNCTION__.' function.' |
33 | 31 | ); |
@@ -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 |
@@ -29,16 +29,14 @@ |
||
29 | 29 | /** |
30 | 30 | * @method static EnumInstanceInterface getFieldsEnum() |
31 | 31 | */ |
32 | -trait FieldValidation |
|
33 | -{ |
|
32 | +trait FieldValidation { |
|
34 | 33 | /** |
35 | 34 | * @param string $name |
36 | 35 | * @param mixed $value |
37 | 36 | * @throws \InvalidArgumentException |
38 | 37 | * @staticvar array $fields |
39 | 38 | */ |
40 | - public function __set($name, $value) |
|
41 | - { |
|
39 | + public function __set($name, $value) { |
|
42 | 40 | if (static::getFieldsEnum()->isValidValue($name)) { |
43 | 41 | parent::__set($name, $value); |
44 | 42 | } else { |
@@ -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 |
@@ -30,8 +30,7 @@ discard block |
||
30 | 30 | use FacebookAds\Object\Traits\CannotUpdate; |
31 | 31 | use FacebookAds\Object\Traits\FieldValidation; |
32 | 32 | |
33 | -class PartnerCategory extends AbstractCrudObject |
|
34 | -{ |
|
33 | +class PartnerCategory extends AbstractCrudObject { |
|
35 | 34 | use CannotCreate; |
36 | 35 | use CannotDelete; |
37 | 36 | use CannotUpdate; |
@@ -40,16 +39,14 @@ discard block |
||
40 | 39 | /** |
41 | 40 | * @return string |
42 | 41 | */ |
43 | - protected function getEndpoint() |
|
44 | - { |
|
42 | + protected function getEndpoint() { |
|
45 | 43 | return 'partnercategories'; |
46 | 44 | } |
47 | 45 | |
48 | 46 | /** |
49 | 47 | * @return PartnerCategoryFields |
50 | 48 | */ |
51 | - public static function getFieldsEnum() |
|
52 | - { |
|
49 | + public static function getFieldsEnum() { |
|
53 | 50 | return PartnerCategoryFields::getInstance(); |
54 | 51 | } |
55 | 52 | } |
@@ -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 |
@@ -30,8 +30,7 @@ discard block |
||
30 | 30 | use FacebookAds\Object\Traits\CannotDelete; |
31 | 31 | use FacebookAds\Object\Traits\CannotUpdate; |
32 | 32 | |
33 | -class LeadgenForm extends AbstractCrudObject |
|
34 | -{ |
|
33 | +class LeadgenForm extends AbstractCrudObject { |
|
35 | 34 | use CannotCreate; |
36 | 35 | use CannotUpdate; |
37 | 36 | use CannotDelete; |
@@ -39,16 +38,14 @@ discard block |
||
39 | 38 | /** |
40 | 39 | * @return string |
41 | 40 | */ |
42 | - protected function getEndpoint() |
|
43 | - { |
|
41 | + protected function getEndpoint() { |
|
44 | 42 | return 'leadgen_forms'; |
45 | 43 | } |
46 | 44 | |
47 | 45 | /** |
48 | 46 | * @return LeadgenFormFields |
49 | 47 | */ |
50 | - public static function getFieldsEnum() |
|
51 | - { |
|
48 | + public static function getFieldsEnum() { |
|
52 | 49 | return LeadgenFormFields::getInstance(); |
53 | 50 | } |
54 | 51 | |
@@ -58,8 +55,7 @@ discard block |
||
58 | 55 | * @return Cursor |
59 | 56 | */ |
60 | 57 | public function getLeads( |
61 | - array $fields = array(), array $params = array()) |
|
62 | - { |
|
58 | + array $fields = array(), array $params = array()) { |
|
63 | 59 | return $this->getManyByConnection( |
64 | 60 | Lead::className(), $fields, $params); |
65 | 61 | } |